Skip to content

About

Code Flow Visualizer is a React + TypeScript app for mapping software architecture as connected blocks before generating code.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Code Flow Visualizer

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.

Features

  • 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.

Tech Stack

  • React 19
  • TypeScript
  • Vite
  • Lucide React
  • PrismJS + react-simple-code-editor

Getting Started

1. Install dependencies

pnpm install

2. Run development server

pnpm dev

3. Build for production

pnpm build

4. Preview production build

pnpm preview

Scripts

  • pnpm dev - start Vite dev server
  • pnpm build - type-check and build
  • pnpm lint - run ESLint
  • pnpm preview - preview the production build

Data Model And Storage

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.

Export Formats

Model JSON

Designed for AI coding models:

  • Lean block and connection payload.
  • No connector side noise.
  • Includes architecture and implementation guidance fields.
  • Includes block info only when it differs from the default for that block type.

Session JSON

Designed for backup and re-import:

  • Includes full canvas state.
  • Contains format marker cfv-session.

Import 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.

Project Structure

  • src/components/canvas - board, node cards, inspector, edge rendering
  • src/components/home - home dashboard and recent sessions
  • src/components/export - export UI and copy/download actions
  • src/lib - types, storage, export payload builders, sample data

Notes

  • This project is intentionally local-first and currently uses browser local storage.
  • Imports and exports are JSON-based for portability and model-friendly workflows.

About

Code Flow Visualizer is a React + TypeScript app for mapping software architecture as connected blocks before generating code.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages