How devasudant/volume-project works
Purpose and Entry Points
This is a Next.js 14/React TypeScript single-page tool for interactively compiling book/content fragments into JSON snippets: chapters, headings, paragraphs, poems, images, tables, footers, and Tamil page numbers. The runtime entry is the App Router root at src/app/layout.tsx; the primary application screen is src/app/page.tsx.
Application Shell
src/app/layout.tsx establishes the shared document/layout boundary, while src/app/globals.css supplies global styling. src/app/page.tsx composes the compiler-oriented UI and owns the top-level interactive workflow. Styling is Tailwind-based, configured through tailwind.config.ts.
Content Compiler Interfaces
The core domain is represented by dedicated form/compiler interfaces under src/components/component-interfaces/. These components gather content-specific fields, apply local React-hook state, and produce JSON-oriented output/preview:
• src/components/component-interfaces/chapter-interface.tsx
• src/components/component-interfaces/heading-interface.tsx
• src/components/component-interfaces/paragraph-interface.tsx
• src/components/component-interfaces/poem-interface.tsx
• src/components/component-interfaces/image-interface.tsx
• src/components/component-interfaces/footer-interface.tsx
• src/components/component-interfaces/tamil-page-interface.tsx
The main boundary is client-side: user-entered text and selections are transformed directly into serialized content structures rather than persisted through a visible backend layer.
Table and Page-Number Compilation
Table handling is a specialized branch of the compilation workflow. src/components/table-compiler.tsx accepts and compiles table content, with src/components/component-interfaces/table-interface.tsx providing its domain-facing interface. src/components/tamil-page-number-compiler.tsx separately generates Tamil book page-number JSON, likely encapsulating the number-to-language/content transformation.
Assembly and Presentation Controls
src/components/component-toolbar.tsx is the likely cross-compiler control surface for selecting or coordinating compilation actions. Reusable primitives in src/components/ui/ provide dialogs, form inputs, selects, tabs, tables, toast feedback, and responsive layout building blocks; this is the presentation boundary around otherwise domain-specific compiler forms.
Runtime, Hosting, and Integrations
The app runs under Node.js 18+ using Next.js App Router and React 18. Deployment configuration is present in apphosting.yaml, indicating Firebase App Hosting infrastructure. The README references Firebase configuration, though no Firebase client/server source is visible in the provided tree. next.config.ts defines Next runtime/build behavior.
AI Boundary
src/ai/genkit.ts and src/ai/dev.ts establish an isolated Genkit AI integration/dev entry area. No flow files are present, so AI appears scaffolded or minimally integrated rather than part of the visible primary compiler path.
Supporting Shared Behavior
src/lib/utils.ts contains shared utility logic, while src/hooks/use-toast.ts and src/hooks/use-mobile.tsx support notification and responsive UI behavior. These support the interactive compilation experience without defining the content model itself.
Main entry points: page.tsx Compiler screen · component-toolbar.tsx Component toolbar · layout.tsx App layout · chapter-interface.tsx Content interfaces
Components 18
Next.js App
- App layout · Shared document and layout boundary.
src/app/layout.tsx - Compiler screen · Owns the top-level interactive workflow.
src/app/page.tsx - Global styles
src/app/globals.css - Tailwind config
tailwind.config.ts - Next runtime config
next.config.ts
Content Compilation
- Component toolbar · Coordinates content compilation actions.
src/components/component-toolbar.tsx - Content interfaces · Chapter, heading, paragraph, poem, image, footer, and Tamil page forms serialize user input.
src/components/component-interfaces/chapter-interface.tsx - Table interface
src/components/component-interfaces/table-interface.tsx - Table compiler · Compiles table content into JSON-oriented output.
src/components/table-compiler.tsx - Tamil page compiler · Generates Tamil book page-number JSON.
src/components/tamil-page-number-compiler.tsx - Serialized snippets · Content is transformed in-browser with no visible persistence backend.
UI Support
- UI primitives · Dialogs, inputs, selects, tabs, tables, toast, and responsive building blocks.
- Toast state
src/hooks/use-toast.ts - Mobile state
src/hooks/use-mobile.tsx - Shared utilities
src/lib/utils.ts
AI Integration
Scaffolded Genkit area outside the visible compiler flow.
- Genkit setup
src/ai/genkit.ts - Genkit dev entry
src/ai/dev.ts
Other components
- Firebase App Hosting
apphosting.yaml
Connections 20
- App layout → Compiler screen: renders
- App layout → Global styles: loads
- Global styles → Tailwind config: uses
- Compiler screen → Component toolbar: composes
- Compiler screen → Content interfaces: hosts
- Compiler screen → Table interface: hosts
- Compiler screen → Tamil page compiler: hosts
- Component toolbar → Content interfaces: selects
- Component toolbar → Table interface: selects
- Content interfaces → Serialized snippets: serializes
- Table interface → Table compiler: provides input
- Table compiler → Serialized snippets: compiles
- Tamil page compiler → Serialized snippets: generates
- Compiler screen → UI primitives: uses
- UI primitives → Toast state: uses
- UI primitives → Mobile state: uses
- Compiler screen → Shared utilities: uses
- Genkit dev entry → Genkit setup: initializes
- Next runtime config → App layout: configures runtime
- Firebase App Hosting → Next runtime config: deploys