How bhancockio/youtube-idea-generator-nextjs works
Main Components
A. Frontend Layer:
• Pages (app directory structure)
• Home Page (page.tsx)
• Videos Page
• Video Detail Page
• Ideas Page
• Components Layer
• UI Components (shadcn/ui components)
• Custom Components (VideoList, VideoDetail, IdeaList, etc.)
• Client-side Hooks
B. Server Layer:
• Server Actions
• Ideas Actions
• YouTube Actions
• Mutations
• Queries
• API Routes/Handlers
C. Database Layer:
• A "Database" section showing:
• Drizzle ORM
• Database Schema
• Database Connections
D. External Services:
• A "Third-party Services" section:
• YouTube API Integration
Component Relationships
• Client Components → Server Actions (data mutations)
• Server Components → Database (data queries)
• Server Actions → External Services (YouTube API calls)
• Pages → Components (composition)
Specific Implementation Details
Architectural elements:
• Next.js App Router Structure
• Server-side Rendering Flow
• Client-side State Management
• Database Schema Relationships
• API Integration Points
[Client Layer (Browser)]
• ↕
[Next.js App Router]
• ↕
[Server Components/Actions]
• ↕
[Database Layer]
• ↕
[External Services]
Additional Elements
Supporting components:
• Middleware (authentication/authorization)
• Static Assets (public directory)
• Configuration Files
• Build/Deploy Pipeline
Technical Stack Callouts
Key technologies:
• Next.js 13+ (App Router)
• TypeScript
• Tailwind CSS
• Drizzle ORM
• shadcn/ui Components
Remember to:
• Use consistent symbols and notation
• Brief annotations for complex interactions
• Both synchronous and asynchronous flows
• Data flow directions clearly