Code Flow Visualizer is a React + TypeScript app for mapping software architecture as connected blocks before generating code.
It supports multiple saved sessions, export formats for AI model prompting and full backup/import, and a canvas workflow focused on rapid iteration.
- Visual canvas with draggable blocks and directional connections.
- Multiple saved sessions in local storage with recent-session management.
- Session lock/unlock, selection, and batch delete from Home.
- Home quick actions:
- Create New Canvas
- Open Starter Blueprint
- Resume Last Workspace
- Import Session (from exported session JSON)
- Export view with two payload types:
- Model JSON (lean payload for Claude/ChatGPT)
- Session JSON (full backup/import payload)
- JSON copy flow with centered modal preview.
- Keyboard shortcut support including save shortcut with compact success toast.
- React 19
- TypeScript
- Vite
- Lucide React
- PrismJS + react-simple-code-editor
pnpm installpnpm devpnpm buildpnpm previewpnpm dev- start Vite dev serverpnpm build- type-check and buildpnpm lint- run ESLintpnpm preview- preview the production build
Sessions are stored in browser local storage:
- Session index and metadata for the Home list.
- Per-session canvas payloads.
- Active session id for resume behavior.
Designed for AI coding models:
- Lean block and connection payload.
- No connector side noise.
- Includes architecture and implementation guidance fields.
- Includes block
infoonly when it differs from the default for that block type.
Designed for backup and re-import:
- Includes full canvas state.
- Contains format marker
cfv-session.
Home page includes an Import Session action.
- Accepts JSON files exported in Session JSON format.
- Validates file shape (
format: "cfv-session"and canvas id). - Opens imported canvas as a normal editable session.
src/components/canvas- board, node cards, inspector, edge renderingsrc/components/home- home dashboard and recent sessionssrc/components/export- export UI and copy/download actionssrc/lib- types, storage, export payload builders, sample data
- This project is intentionally local-first and currently uses browser local storage.
- Imports and exports are JSON-based for portability and model-friendly workflows.