Skip to content

Commit 2055009

Browse files
authored
Merge pull request #61 from boostcampwm-snu-2026-1/feat/59-multi-project-management
feat: add multi-project management
2 parents b342f9b + 6cbf337 commit 2055009

10 files changed

Lines changed: 1368 additions & 135 deletions

File tree

docs/architecture.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ The main rule is separation of concerns: UI rendering, persistence, and audio sc
5252
- Store sample references by stable IDs or metadata, not decoded buffers.
5353
- Handle browser file import boundaries for user-provided audio files.
5454
- Keep `File`, `Blob`, object URL, IndexedDB handles, and decoded audio buffers out of model data.
55-
- Persist the active browser project and imported sample blobs through IndexedDB.
56-
- Persist a browser-local project collection when multi-project management exists.
55+
- Persist browser-local project documents and imported sample blobs through IndexedDB.
56+
- Persist a browser-local project collection for create/select/rename/delete workflows.
5757
- Store the active project ID separately from the project document.
5858
- Export rendered arrangement audio as WAV without storing runtime audio objects in project JSON.
5959

@@ -96,7 +96,11 @@ Imported browser files are also runtime or persistence-layer data. Project JSON
9696

9797
IndexedDB may store imported sample blobs or bytes outside the project JSON document. The model should reference those blobs by stable sample IDs so the audio engine can rebuild decoded runtime caches after restore.
9898

99-
When multiple local projects exist, each persisted project should have a stable project ID. Imported sample blobs should be scoped to the owning project, for example with a composite key such as `${projectId}:${sampleId}` or an equivalent indexed record shape. Switching projects should stop live playback and preview before replacing app state. Autosave must write to the intended project ID and must not accidentally overwrite another project after a switch.
99+
Each persisted project has a stable project ID. Imported sample blobs are scoped
100+
to the owning project with project-aware records and composite blob keys.
101+
Switching projects should stop live playback and preview before replacing app
102+
state. Autosave must write to the intended project ID and must not accidentally
103+
overwrite another project after a switch.
100104

101105
Mixer settings such as volume, mute, solo, and master volume are serializable project or app-model data once real mixer routing exists. Mixer runtime data, including `GainNode`, `AnalyserNode`, effect nodes, meter buffers, and active routing graphs, belongs to the audio engine runtime and must not be stored in project JSON.
102106

docs/data-model.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ The initial transport UI range is 60 to 180 BPM. Implementations should validate
4040

4141
## Project Collection
4242

43-
The app should support multiple browser-local projects after the multi-project management feature.
43+
The app supports multiple browser-local projects through IndexedDB project
44+
documents plus separate collection metadata.
4445

4546
`Project` remains the serializable document for one song or sketch. Each project should have a stable ID and contain the musical data already documented in this file: clips, arrangement tracks, clip instances, arrangement length, loop range, sample metadata, tempo, mixer settings, and related project fields.
4647

@@ -60,9 +61,15 @@ export interface ProjectCollectionState {
6061
}
6162
```
6263

63-
The current implementation may still have one active project in memory at a time. The multi-project feature should make the active project ID serializable browser-local state so a refresh restores the last selected project.
64+
The current implementation keeps one active project in memory at a time. The
65+
active project ID is serializable browser-local state so a refresh restores the
66+
last selected project.
6467

65-
Imported sample blobs are not project JSON. In a multi-project store, imported blob records must be scoped to the owning project so two projects can safely have the same local `sampleId`. A composite key such as `${projectId}:${sampleId}` is acceptable, or the persistence layer may add a `projectId` field and an IndexedDB index if that keeps deletion and migration clearer.
68+
Imported sample blobs are not project JSON. Imported blob records are scoped to
69+
the owning project so two projects can safely have the same local `sampleId`.
70+
The first implementation stores imported blobs in a project-scoped IndexedDB
71+
store keyed by a composite ID such as `${projectId}::${sampleId}` and also keeps
72+
the `projectId` on the record for deletion by project.
6673

6774
Switching projects should not mutate the outgoing project document except for an intentional save or autosave flush. Runtime UI selection, decoded sample caches, active source nodes, transport state, and audio preview state should be reset or rebuilt for the newly active project.
6875

@@ -165,7 +172,11 @@ The model should keep these concepts separate:
165172

166173
Imported file bytes and decoded sample data are not project JSON. IndexedDB persistence may store imported blobs outside the project document and connect them back through stable sample IDs. Until that persistence feature exists, imported audio clips may be session-only and should be documented in the UI.
167174

168-
The first IndexedDB persistence implementation stores the active project document separately from imported sample blobs. The project document may include clips, arrangement tracks, clip instances, loop range, sample metadata, tempo, track mixer state, and master mixer state. Imported sample blobs are stored in a blob store keyed by `sampleId` and are not embedded inside the project document.
175+
The IndexedDB persistence implementation stores each project document separately
176+
from imported sample blobs. The project document may include clips, arrangement
177+
tracks, clip instances, loop range, sample metadata, tempo, track mixer state,
178+
and master mixer state. Imported sample blobs are stored in a project-scoped blob
179+
store and are not embedded inside the project document.
169180

170181
Illustrative shape:
171182

docs/features/22-multi-project-management.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Feature: 22 Multi-project Management
22

33
## Status
4-
Planned
4+
In Review
55

66
## Goal
77

0 commit comments

Comments
 (0)