Skip to content

Commit 2fd1dfb

Browse files
authored
Merge pull request #10 from adewale/claude/sharing-publishing-model-017PXwprURbfXrDaVRha4N2m
Document sharing and publishing model coverage
2 parents 2ceb5bd + 0d60f60 commit 2fd1dfb

File tree

5 files changed

+879
-77
lines changed

5 files changed

+879
-77
lines changed

specs/ROADMAP.md

Lines changed: 67 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ Track: Lead [M] [-][+3][+] [16] [▼]
343343

344344
Complete the sharing model defined in [SESSION-LIFECYCLE.md](./SESSION-LIFECYCLE.md).
345345

346-
> **Note:** The original "Sessions vs Beats" concept has been moved to Phase 12 (Publishing Platform) for reconsideration. The current Invite/Send Copy/Remix model covers core sharing needs.
346+
> **Note:** The sharing model has been simplified. See [SHARING-AND-PUBLISHING.md](./SHARING-AND-PUBLISHING.md) for the current Publish/Invite/Remix/New model. Phase 18 implements publishing (immutable sessions) without the complexity of a separate "Beat" type.
347347
348348
#### Remaining Tasks
349349

@@ -1419,81 +1419,90 @@ Allow multiplayer users to share recorded samples in real-time.
14191419

14201420
---
14211421

1422-
### Phase 24: Publishing Platform (Beats)
1422+
### Phase 24: Publishing (Immutable Sessions)
14231423

1424-
> ⚠️ **NEEDS RETHINKING** — This phase was originally "Sessions vs Beats" but requires reconsideration. The core sharing model (Invite/Send Copy/Remix) already handles most use cases. This phase should only be pursued if there's clear demand for a publishing/social platform.
1424+
> **Spec:** See [SHARING-AND-PUBLISHING.md](./SHARING-AND-PUBLISHING.md) for the complete specification.
14251425
1426-
#### The Original Idea
1426+
#### Summary
14271427

1428-
Distinguish between:
1429-
- **Session** — "Come make music with me" (mutable, collaborative)
1430-
- **Beat** — "Listen to what I made" (immutable, presentational)
1428+
Replace "Send Copy" with "Publish" — a single action that creates an immutable copy safe for 1:many broadcast.
14311429

1432-
#### Why It Was Deferred
1430+
#### The Simplified Model
14331431

1434-
1. **"Send Copy" already creates snapshots** — Recipient gets a frozen copy at that moment
1435-
2. **Immutability adds complexity** — Separate `/b/` URLs, readonly views, Beat data type
1436-
3. **Against UI Philosophy** — Mode switching, separate views, extra flows
1437-
4. **It's really a platform feature** — Publishing implies social features, discoverability, attribution
1432+
| Before | After |
1433+
|--------|-------|
1434+
| Session + Beat (two types) | Session only (one type) |
1435+
| accessMode toggle | `immutable` flag (set at birth) |
1436+
| Send Copy (creates editable) | Publish (creates immutable) |
1437+
| Complex lineage linking | Text-only lineage |
14381438

1439-
#### What "Beats" Actually Requires
1439+
#### Four Actions
14401440

1441-
If pursued, this is not just "readonly sessions" — it's a publishing platform:
1441+
| Action | Creates | Immutable? | Use Case |
1442+
|--------|---------|:----------:|----------|
1443+
| **Publish** | Copy | Yes | 1:many broadcast (Twitter, Discord) |
1444+
| **Remix** | Copy | No | Fork for yourself |
1445+
| **New** | Empty | No | Start fresh |
1446+
| **Invite** | Nothing | N/A | Real-time collaboration |
14421447

1443-
| Feature | Scope |
1444-
|---------|-------|
1445-
| **Immutable snapshots** | New data type, separate URL scheme (`/b/{id}`) |
1446-
| **Readonly playback UI** | Simplified player-only interface |
1447-
| **Attribution** | Artist name, track title, description |
1448-
| **Social features** | Play count, likes, comments |
1449-
| **Discoverability** | Browse, search, featured beats |
1450-
| **User profiles** | "My published beats" gallery |
1448+
#### Button Order
14511449

1452-
#### Data Model (If Implemented)
1453-
1454-
```typescript
1455-
interface Beat {
1456-
id: string; // UUID v4
1457-
sourceSessionId: string; // Session it was created from
1458-
createdAt: number;
1459-
createdBy: string | null; // User ID (requires auth)
1460-
1461-
// Metadata
1462-
name: string; // Track title (required)
1463-
description: string | null;
1464-
tags: string[];
1465-
1466-
// State
1467-
state: SessionState; // Frozen copy
1468-
1469-
// Social
1470-
playCount: number;
1471-
likeCount: number;
1472-
isPublic: boolean; // Listed in browse/search
1473-
}
14741450
```
1451+
[Publish] [Remix] [New] [Invite]
1452+
───────────────────────── ─────────
1453+
Filled (safe) Outline (exposes session)
1454+
```
1455+
1456+
Invite is visually separated and styled differently because it's the only action that exposes your editable session. Safe actions (which create copies) are grouped and prominent.
1457+
1458+
#### Key Design Decisions
14751459

1476-
#### Questions to Answer First
1460+
1. **Immutability at birth** — Published sessions are frozen forever, not toggleable
1461+
2. **No separate URL scheme** — All sessions use `/s/{id}`, behavior determined by `immutable` flag
1462+
3. **Text-only lineage** — "Remixed from X" shown as text, not a clickable link (prevents traversal attacks)
1463+
4. **Teaching affordances** — Published sessions show prompts guiding users to Remix if they want to edit
1464+
5. **Invite is distinct** — Outline style + separation signals "different intent" for collaboration
14771465

1478-
1. Is there demand for public publishing, or is private sharing enough?
1479-
2. Do we want to become a "platform" with user-generated content moderation needs?
1480-
3. What's the minimum viable version that adds value beyond Send Copy?
1481-
4. Should beats be tied to user accounts, or allow anonymous publishing?
1466+
#### Implementation Tasks
14821467

1483-
#### Possible Minimal Version
1468+
**Data & API:**
1469+
- [ ] Add `immutable: boolean` field to Session data model
1470+
- [ ] Implement `POST /api/sessions/{id}/publish` endpoint
1471+
- [ ] Block updates on immutable sessions (return 403)
14841472

1485-
Instead of a full platform, consider a simpler "readonly mode" on sessions:
1473+
**Desktop UI:**
1474+
- [ ] Replace "Send Copy" with "Publish", reorder to: Publish, Remix, New, Invite
1475+
- [ ] Style Invite as outline button with visual separation
1476+
- [ ] Create published session UI (disabled editing, educational prompts)
1477+
- [ ] Convert lineage links to text-only
1478+
1479+
**Mobile UI:**
1480+
- [ ] Bottom action bar with icon + label buttons
1481+
- [ ] Responsive breakpoints (480px, 768px)
1482+
- [ ] Bottom sheet for click interception modal
1483+
1484+
#### Data Model Change
14861485

14871486
```typescript
14881487
interface Session {
1489-
// ...existing
1490-
isLocked: boolean; // Owner can lock; others can only view/remix
1488+
// ... existing fields
1489+
immutable: boolean; // true = published (frozen forever)
14911490
}
14921491
```
14931492

1494-
This gives "view-only sharing" without the platform complexity.
1493+
#### Published Session UI
1494+
1495+
```
1496+
┌─────────────────────────────────────────────────────────────────┐
1497+
│ 🎵 Funky Beat [Remix][New] │
1498+
│ 📢 Published • 47 remixes │
1499+
├─────────────────────────────────────────────────────────────────┤
1500+
│ [Step grid visible but not interactive] │
1501+
│ 💡 Want to edit? Click Remix to create your own copy │
1502+
└─────────────────────────────────────────────────────────────────┘
1503+
```
14951504

1496-
**Outcome:** TBD — requires product decision on whether Keyboardia should become a publishing platform or remain focused on collaboration.
1505+
**Outcome:** Safe 1:many sharing without the complexity of a separate "Beat" type or publishing platform.
14971506

14981507
---
14991508

@@ -2183,10 +2192,10 @@ npx wrangler deploy
21832192
| **19** | **Session Name API Fix** | **POST /api/sessions accepts name** | KV ||
21842193
| **20** | **QR Code Sharing** | **?qr=1 modifier, mobile optimized** |||
21852194
| 21 | Polish & production | Loading states, performance, docs | All | Next |
2186-
| 22 | Auth & ownership | Claim sessions, lock to readonly | D1 + BetterAuth ||
2195+
| 22 | Auth & ownership | Claim sessions, ownership model | D1 + BetterAuth ||
21872196
| 23 | Shared sample recording | Shared custom sounds | R2 ||
2188-
| 24 | ⚠️ Publishing platform | Beats, social features (TBD) | KV + D1 ||
2189-
| 25 | ⚠️ Advanced Synthesis (incl. effects) | Rich instruments, reverb, delay | R2 ||
2197+
| 24 | **Publishing** | **Immutable sessions for 1:many sharing** | KV ||
2198+
| 25 | Advanced Synthesis (incl. effects) | Rich instruments, reverb, delay | R2 ||
21902199
| 26 | Session Provenance | Rich clipboard, family tree | KV ||
21912200
| 27 | Beat-Quantized Changes | Musical sync for remote edits | DO ||
21922201
| 28 | Playwright E2E Testing | Multi-client, cross-browser, network tests | All ||

specs/SESSION-LIFECYCLE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Session Lifecycle & Sharing Specification
22

3+
> **Note:** For the simplified sharing model (Publish/Invite/Remix/New), see [SHARING-AND-PUBLISHING.md](./SHARING-AND-PUBLISHING.md). This document covers the session state machine, orphan handling, and admin observability requirements. The sharing flows below will be updated to align with the new model.
4+
35
## Overview
46

57
This document defines the session state machine, sharing modes, remix lineage, orphan handling, and admin observability requirements.

specs/SESSION-SHARING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Session Sharing Specification
22

3+
> ⚠️ **DEPRECATED** — This spec has been superseded by [SHARING-AND-PUBLISHING.md](./SHARING-AND-PUBLISHING.md), which defines a simplified model with Publish/Invite/Remix/New actions. The information below is retained for historical context but should not be used for new implementation work.
4+
35
> **See also:** [SESSION-LIFECYCLE.md](./SESSION-LIFECYCLE.md) for the full session state machine, sharing modes (Remix vs Share Session vs Share Snapshot), and admin dashboard requirements.
46
57
## Overview

0 commit comments

Comments
 (0)