How ngkhang/airbnb-nextjs works
Main Components
A. Client-Side Components:
• Browser/User Interface
• Client-side Runtime (Next.js Client)
• React Components Layer
B. Server-Side Components:
• Next.js Server Runtime
• Server Components
• File-based Routing System
C. Build-time Components:
• Next.js Build System
• Asset Optimization Pipeline
• Font Optimization System
┌─────────────────────────────────────┐
• Client Layer │
• ┘
• ↕
┌─────────────────────────────────────┐
• Server Layer │
• ┘
• ↕
┌─────────────────────────────────────┐
• Build/Static Layer │
• ┘
Specific Component Details
A. Client Layer (Blue tones):
• Rectangle: Browser viewport
• Rounded Rectangle: React Components
• Hexagon: Client-side Runtime
B. Server Layer (Green tones):
• Rectangle: Next.js Server
• Diamonds: Server Components
• Circles: API Routes
C. Build Layer (Orange tones):
• Rectangle: Build System
• Parallelograms: Asset Pipeline
• Octagons: Configuration
Important Relationships
• File-based routing system connecting to both server and client components
• Build pipeline's connection to both static assets and server components
• Demonstrate the font optimization system's integration with the build process
Technical Stack Highlights
• Next.js 13+ App Router
• React Server Components
• TailwindCSS
• TypeScript
• Font Optimization (next/font)
Key Architectural Patterns to Emphasize
• File-system Based Routing (show how src/app structure maps to routes)
• Server/Client Component Separation
• Static and Dynamic Rendering Paths
• Asset Optimization Flow