How nangua-qwq/signgenerator works
sign-generator is a browser-based road-sign editor: users manage sign designs in a workspace, choose a sign template, edit its data, and inspect a generated SVG preview. The principal runtime path runs from the editor through workspace state to the selected-sign preview and template renderer. Font loading and reusable SVG/text rendering support that path; saved workspace state and the completion page are separate product surfaces. The README is only a project title, so feature details beyond the sampled runtime are limited to source names and references.
Main entry points: generator.tsx Template dispatcher · FontContext.tsx Font context · two-lane-interchange-exit.tsx Exit signs · entrance-preview-two-directions.tsx Interchange signs
Components 20
Sign editing
- Editor page
src/app/page.tsx - Preview toolbar
src/app/PreviewToolbar/index.tsx - Created page
src/app/created/page.tsx
Workspace state
- Workspace actions
src/app/state/sign-workspace-store.ts - Workspace persistence
src/app/state/workspace-storage.ts - Sign normalization
src/app/lib/sign-model.ts
SVG rendering
- Sign preview
src/app/SignPreview.tsx - Template dispatcher
src/app/generators/generator.tsx - Exit signs
src/app/generators/exit/two-lane-interchange-exit.tsx - Interchange signs
src/app/generators/interchange/entrance-preview-two-directions.tsx - Road fork sign
src/app/generators/interchange/road-fork-preview.tsx - Expressway sign
src/app/generators/sign/expressway.tsx - Ordinary road sign
src/app/generators/sign/ordinary_road.tsx - Raw SVG wrapper
src/app/generators/raw-svg.tsx - Outlined text
src/app/generators/svg-text.tsx
Font services
- Font provider
src/app/fonts/FontsProvider.tsx - Font context
src/app/fonts/FontContext.tsx - Font buffers
src/app/fonts/loadFontBuffers.ts - Font route
src/app/fonts/[font]/route.ts
Other components
- Sign editor
Connections 29
- Sign editor → Editor page: edits signs
src/app/page.tsx - Editor page → Workspace actions: updates workspace
src/app/page.tsx - Preview toolbar → Workspace actions: reads workspace
src/app/PreviewToolbar/index.tsx - Workspace actions → Workspace persistence: persists state
src/app/state/sign-workspace-store.ts - Workspace persistence → Sign normalization: restores signs
src/app/state/workspace-storage.ts - Sign preview → Workspace actions: selects sign
src/app/SignPreview.tsx - Sign preview → Template dispatcher: renders sign
src/app/SignPreview.tsx - Template dispatcher → Exit signs: dispatches template
src/app/generators/generator.tsx - Template dispatcher → Interchange signs: dispatches template
src/app/generators/generator.tsx - Template dispatcher → Road fork sign: dispatches template
src/app/generators/generator.tsx - Template dispatcher → Expressway sign: dispatches template
src/app/generators/generator.tsx - Template dispatcher → Ordinary road sign: dispatches template
src/app/generators/generator.tsx - Exit signs → Raw SVG wrapper: wraps SVG
src/app/generators/exit/two-lane-interchange-exit.tsx - Interchange signs → Raw SVG wrapper: wraps SVG
src/app/generators/interchange/entrance-preview-two-directions.tsx - Road fork sign → Raw SVG wrapper: wraps SVG
src/app/generators/interchange/road-fork-preview.tsx - Exit signs → Expressway sign: renders route shields
src/app/generators/exit/two-lane-interchange-exit.tsx - Interchange signs → Expressway sign: renders route shields
src/app/generators/interchange/entrance-preview-two-directions.tsx - Road fork sign → Expressway sign: renders route shields
src/app/generators/interchange/road-fork-preview.tsx - Exit signs → Outlined text: renders labels
src/app/generators/exit/two-lane-interchange-exit.tsx - Interchange signs → Outlined text: renders labels
src/app/generators/interchange/entrance-preview-two-directions.tsx - Road fork sign → Outlined text: renders labels
src/app/generators/interchange/road-fork-preview.tsx - Expressway sign → Outlined text: lays out glyphs
src/app/generators/sign/expressway.tsx - Font provider → Font context: provides fonts
src/app/fonts/FontsProvider.tsx - Font context → Font buffers: uses buffers
src/app/fonts/FontContext.tsx - Font route → Font buffers: serves fonts
src/app/fonts/[font]/route.ts - Sign preview → Font context: checks font readiness
src/app/SignPreview.tsx - Exit signs → Font context: gets fonts
src/app/generators/exit/two-lane-interchange-exit.tsx - Interchange signs → Font context: gets fonts
src/app/generators/interchange/entrance-preview-two-directions.tsx - Road fork sign → Font context: gets fonts
src/app/generators/interchange/road-fork-preview.tsx