How handikatriarlan/our-beautiful-summer-api works
Main Components
A. Client Layer
• External clients (Mobile/Web applications)
• Interaction through REST API endpoints
B. API Layer (NestJS)
• Controllers (MemoriesController)
• Services (MemoriesService, AppService)
• DTOs (Memory DTOs)
• Modules organization (AppModule, DatabaseModule, MemoriesModule)
C. Storage Layer
• Supabase Database
• Supabase Storage (for photos)
┌─ Client Layer ─────────────────────┐
• Mobile/Web Clients │
• (Consuming REST API) │
• ┬───────────────────┘
• ↓
┌─ API Layer ────────────────────────┐
• ┌─ NestJS Application ───────────┐ │
• ┌─ Controllers ──────────────┐ │ │
• MemoriesController │ │ │
• ┬────────────┘ │ │
• ↓ │ │
• ┌─ Services ───────────────┐ │ │
• MemoriesService │ │ │
• SupabaseService │ │ │
• ┬──────────┘ │ │
• ┼─────────────┘ │
• ┼───────────────┘
• ↓
┌─ Storage Layer ──────────────────┐
• ┌─ Supabase ─────────────────┐ │
• Database (memories table) │ │
• Storage (photos bucket) │ │
• ┘ │
• ┘
Important Relationships to Highlight
• REST API endpoints from MemoriesController:
• POST /api/memories
• GET /api/memories
• GET /api/memories/:id
• /api/memories/:id
• DELETE /api/memories/:id
• Service Layer Interactions:
• MemoriesService → SupabaseService
• SupabaseService → Supabase Database/Storage
Additional Elements
• API endpoint details in a side panel
• Validation flow through DTOs
• Error handling paths
• Security boundaries (Supabase RLS)
Technical Details
• NestJS Modules structure
• Supabase integration points
• File upload flow for photos
• Database schema reference
• Environment configuration dependencies
Implementation Notes
• Separation of concerns between modules
• TypeScript integration
• Testing boundaries
• Deployment-specific components (Vercel configuration)