Skip to content

feat: project-directory storage with TOML manifest, root node, and as… - #6

Merged
john-basilio merged 1 commit into
mainfrom
feat/project-dir-storage
Jul 15, 2026
Merged

feat: project-directory storage with TOML manifest, root node, and as…#6
john-basilio merged 1 commit into
mainfrom
feat/project-dir-storage

Conversation

@john-basilio

Copy link
Copy Markdown
Owner
  • Revamped project.json it's now project.toml it now houses only project-related metadata (Author, Project Name, starting-node UUID, etc.)
  • Users are now required to create a new project first if no existing project is currently open.
  • Nodes, characters, and other assets now live in their own directories. Each node/character = their own file
  • Images used in Character's avatar are copy-on-use. Located in /assets/image
  • Project directory now looks like:
project-dir/
       - project.toml
       - canvas.json <- contains node mapping data
       - script/
              - New_Node-3ac7bfe3.json <- Sample names, to make it readable yet unique
       - characters/
              -Sample-772fcbe5.json 
       - assets/
              - images/
                     - image.png
  • Now able to assign the root node

…set import

A project is now a directory instead of a single JSON file: a
project.toml manifest holding only metadata (plus the root node's id),
canvas.json for editor state (camera and node positions — size is
fixed in-app and no longer persisted), and one JSON file per story
node and character under scripts/ and characters/. Files are named
Encoded_name-<short-id>.json — whitespace as underscores, cut at 32
chars, suffixed with the first UUID segment — so the folder reads like
the story while identity stays with the full id inside each file.
Saves sync the directory (atomic temp+rename writes, stale app-named
files removed, renames handled) and pre-create the assets/ tree;
loading treats the directory as the source of truth. Legacy
single-project.json projects still load and migrate on their next
save, parking the old file as project.json.bak.

The app never runs project-less anymore: a New Project modal (name,
location, author, comment) blocks at startup when nothing reopens,
with an "Open existing…" escape into the Load picker, and replaces
File → New's silent reset with a cancellable version of the same
dialog. Projects are written to disk at creation, so Save and autosave
always have a target.

Every story gets an entry point: the first node created becomes the
root node (recorded in the manifest by UUID), a hover star button
reassigns it, and the canvas marks it with a badge and accent border;
deleting it hands the marker to the next node.

Paths inside a project are stored project-relative. Picked avatar
images are copied into assets/images/ at pick time (identical re-picks
dedupe, name clashes get numbered suffixes); in memory paths stay
absolute so render sites are untouched, and external absolute paths
from old saves keep working.
@john-basilio
john-basilio merged commit 95f6aa3 into main Jul 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant