MonoForge follows a unidirectional data flow architecture designed for zero state drift and instant compilation speed:
┌─────────────────────────────────────────────────────────┐
│ USER INTERFACE │
│ [ Visual Studio ] [ Monaco IDE ] [ Telemetry ] [ SVG ]│
└───────────────────────────┬─────────────────────────────┘
│ Read / Write
▼
┌─────────────────────────────────────────────────────────┐
│ SINGLE ZUSTAND STORE │
│ (src/store/useReadmeStore.ts) │
└───────────────────────────┬─────────────────────────────┘
│ Pure Input
▼
┌─────────────────────────────────────────────────────────┐
│ PURE COMPILER PIPELINE │
│ (src/lib/buildMarkdown.ts) │
└───────────────────────────┬─────────────────────────────┘
│ Deterministic Markdown
▼
┌─────────────────────────────────────────────────────────┐
│ OUTPUT & DISTRIBUTION │
│ [ Live Preview ] [ Clipboard ] [ GitHub 1-Click Push ] │
└─────────────────────────────────────────────────────────┘
src/
├── app/ # Next.js App Router (locale routing, API endpoints)
│ ├── [locale]/ # Localized pages (developer, templates, telemetry, docs)
│ └── api/ # API routes (enrichment, telemetry, schema)
├── components/ # UI components
│ ├── developer/ # Monaco editor, plugin panel, live preview, export bar
│ ├── docs/ # Documentation layout, sidebar, TOC, search modal
│ ├── studio/ # Visual studio controls, hero, bento grid
│ └── sync/ # GitHub OAuth, diff preview, commit modal
├── lib/ # Core engines and utilities
│ ├── buildMarkdown.ts # Pure markdown compiler (unit tested)
│ ├── plugins/ # Plugin registry and individual plugin modules
│ └── forge-telemetry/ # 47+ telemetry engines catalog and SVG builders
├── store/ # Unified Zustand store (useReadmeStore.ts)
└── content/docs/ # Documentation source data and metadata