Micro-Mystery Maker

A bite-sized interactive story builder where users assemble a “case” by picking suspects, clues, locations, and twists, then play through the generated mystery as a short choose-your-path narrative. It includes a simple scene editor (cards for suspects/clues), a story preview/play mode with branching choices, and a randomizer that can auto-generate a coherent mini-mystery from saved elements. All cases are saved locally (localStorage), with reusable component boundaries like Case Library, Card Editor, Branch Builder, and Play Viewer.

To Do30
Scaffold app stack

Run: npm create vite@latest . -- --template react-ts && npm i && npm i -D tailwindcss postcss autoprefixer && npx tailwindcss init -p && npm i class-variance-authority clsx tailwind-merge lucide-react && npx shadcn@latest init

by system

Add Tailwind styles

Configure tailwind.config and src/index.css with Tailwind directives and a basic design-friendly base.

by system

Add app layout shell

Create src/App.tsx with a header, main container, and placeholder content areas.

by system

Set up router

Add React Router and define routes for Library, Editor, Builder, and Play pages.

by system

Create nav header

Implement a header nav component with links to the four routes using shadcn/ui.

by system

Define domain types

Create src/types/mystery.ts defining Case, ElementCard (suspect/clue/location/twist), SceneNode, and Choice types.

by system

LocalStorage utilities

Create src/lib/storage.ts with get/set helpers, versioning, and safe JSON parsing.

by system

Cases store hook

Create src/state/useCasesStore.ts as a small hook managing cases list and active case id synced to localStorage.

by system

Active case selector

Add a small component to select and display the active case from the store.

by system

Case library page

Create src/pages/LibraryPage.tsx to list saved cases and open one as active.

by system

New case dialog

Add a shadcn Dialog component to create a new case with title and optional description.

by system

Rename case action

Add inline rename/edit UI for a case title in the library list.

by system

Delete case action

Add a delete button with confirmation for removing a case from localStorage.

by system

Card editor page

Create src/pages/EditorPage.tsx with tabs/sections for Suspects, Clues, Locations, and Twists.

by system

Element card list

Create a component to render a list of element cards with edit and delete controls.

by system

Element card form

Create a reusable form component to add/edit an element card (name, description, tags).

by system

Card CRUD wiring

Connect the element card form and list to the active case data in the store.

by system

Card search filter

Add a search input that filters element cards by name/tags within the editor.

by system

Branch builder page

Create src/pages/BuilderPage.tsx with a scene list sidebar and a scene editor panel.

by system

Scene node types

Add helper functions in src/lib/scene.ts for creating nodes, ids, and validating links.

by system

Scene list sidebar

Implement a component to add/select/delete scene nodes for the active case.

by system

Scene editor panel

Build a component to edit a scene’s title, narrative text, and associated element references.

by system

Choice editor component

Create a component to add/remove/edit choices (label + target scene id) for the selected scene.

by system

Branch validation banner

Show warnings for missing start scene, dead ends, or choices pointing to deleted scenes.

by system

Play viewer page

Create src/pages/PlayPage.tsx to render the mystery starting at the case start scene.

by system

Play scene renderer

Implement a component that displays current scene text, referenced cards, and choice buttons.

by system

Play state hook

Create a hook that manages current scene id, history stack, and restart/back actions.

by system

Story preview panel

Add a read-only preview component that shows a linearized outline of reachable scenes from start.

by system

Randomizer generator

Create src/lib/randomizer.ts to generate a coherent mini-mystery (scenes + choices) from saved elements.

by system

Randomize case button

Add a button in BuilderPage that runs the generator and overwrites the current case after confirmation.

by system

In Progress0
In Review0
Done0