How zackproser/portfolio works
Main System Components
a) Frontend Layer:
• Next.js Application (App Router)
• Client Components
• Server Components
• MDX Content
• Static Pages
b) API Layer:
• Authentication endpoints (/api/auth)
• Chat functionality (/api/chat)
• Embeddings service (/api/embeddings)
• Payment processing (/api/checkout-sessions)
• OpenGraph image generation (/api/og)
c) External Services Integration:
• Authentication service (NextAuth)
• Vector database integration (Pinecone)
• Payment processing (Stripe)
• Comments system (Giscus)
• Newsletter service (likely Postmark based on postmark.ts)
Data Flow Architecture
Key interactions:
a) Content Management:
• MDX files → Static Generation
• Blog posts
• Courses
• Videos
• Newsletters
b) Dynamic Features:
• Authentication flow
• Chat functionality
• Vector search
• Payment processing
Specific Implementation Details
Architectural patterns:
a) Next.js App Router Structure:
• Route groups
• API routes
• Static pages
• Dynamic routes
b) Data Services:
• Embeddings generation
• Vector search
• Content indexing
Key Relationships to Highlight
• Content pipeline: MDX → Static Generation → Pages
• Search functionality: Content → Embeddings → Vector DB → Search Results
• Authentication flow: User → NextAuth → Protected Routes
• Payment processing: Checkout → Stripe → Success/Failure
[Client Browser] ←→ [Next.js App]
• ↓ ↓
[Static Content] ←→ [API Layer]
• ↙ ↓ ↘
• [Auth] [Payments] [Vector Search]