How kyrylolvov/invoice-builder works
Main System Components
a) Client-Side Layer
• Next.js Frontend (App Router)
• Theme Management
• Form Components
• UI Components Library
b) Server-Side Layer
• Next.js API Routes
• PDF Generation Service
c) Core Features
• Invoice Generation
• PDF Processing
• Theme Switching
• Form Management
Component Organization
Frontend Components:
• Page Components
• Root Layout (layout.tsx)
• Home Page (page.tsx)
• Form Components
• Invoice Form
• Line Items
• Invoice Subtotal
• UI Components
• Button
• Form
• Inputs
• Text Area
• Theme Management
• Theme Provider
API Layer:
• /api
• Route Handler
• PDF Template
• PDF Utils
Use these visual elements:
• Blue: Client-side components
• Green: Server-side components
• Purple: Shared utilities
• Orange: External services/APIs
• Double lines: API calls
Key Relationships to Highlight
• How the Invoice Form component connects to the PDF generation API
• Theme context provider's influence on UI components
• Demonstrate the flow from form submission to PDF generation and download
Important Architectural Patterns
Emphasize:
• Next.js App Router architecture
• Server Components vs Client Components
• API Routes structure
• Context-based theme management
Technical Stack Indicators
• Next.js 13+
• TypeScript
• Tailwind CSS
• PDF Generation library