Skip to content

TuneCamp Collab ​

Collab lets multiple artists on the same instance build a track together: upload stems, save version snapshots, and iterate β€” no separate app, no realtime, no ZEN.

Why native, not a Lab app ​

Collab needs rich relational data (projects, versions, permissions) and dedicated pages (list, detail, version history) β€” the Lab SDK is designed for stateless one-shot tools embedded via iFrame, not this. Collab is a first-class TuneCamp feature with its own tables and routes.

Data model ​

  • collab_projects β€” title, description, owner_id, visibility (shared | private).
  • collab_versions β€” append-only, never overwritten (UNIQUE(project_id, version)). Each row is a snapshot (state, opaque JSON), authored by whoever saved it.
  • collab_stems β€” raw in-progress audio layers, deliberately separate from tracks/samples (no publish/curation semantics).

See architecture-backend.md for the full schema list.

Permissions ​

Reuses the existing publishing gate β€” no new permission system:

  • Read: requires login; visibility='shared' projects are readable by any logged-in user, private only by the owner.
  • Write (create project, upload stem, save version): requires VisibilityGuardian.canPublishContent() β€” same gate as releases, sample packs, and every other publish endpoint.
  • Delete: project creator (owner_id match) only.
  • Open collaboration v1: any artist on the instance who passes canPublishContent can write to a shared project β€” no invite/collaborator list.

API ​

MethodRouteNotes
GET/api/collabList shared projects (?mine=true for the caller's own).
POST/api/collabCreate a project.
GET/api/collab/:idProject + versions + stems.
DELETE/api/collab/:idOwner only.
POST/api/collab/:id/versionsSave a version snapshot (state, optional note).
POST/api/collab/:id/stemsUpload an audio stem (multipart file).
GET/api/collab/:id/stems/:stemId/downloadStream a stem's audio.
DELETE/api/collab/:id/stems/:stemIdStem author or project owner.

All routes require login (authMiddleware.requireUser).

Webapp ​

  • /collab β€” list shared projects, create new ones (if canPublishContent).
  • /collab/:id β€” stems (upload/play/delete), version history, save-snapshot form.

Not (yet) realtime ​

No live cursors/presence β€” versioning (append-only rows) covers the collaboration need. Live presence is deferred to the already-planned "Phase C" ZEN-via-worker_thread-RPC work (ephemeral presence / real-time collaborative playlists) documented in the repo's session rules β€” Collab does not duplicate or depend on it.

Released under the MIT License.