How lucenmae/meeples-landing works
Main System Components
A. Client Layer
• Components from src/components/* (UI, layout, admin, home)
• Key client-side features: Admin Dashboard, Game Management, Login System
B. Next.js Application Layer
• In the middle
• App Router structure (from src/app/*)
• API Routes (src/app/api/*)
• Authentication flow
C. Data & Services Layer
• At the bottom
• MongoDB connection
• External services (BoardGameGeek API integration)
Component Relationships
A. Frontend Flow
User Interface (Components) → App Routes → API Routes → Data Layer
B. Authentication Flow
Login Component → NextAuth → MongoDB (Users)
C. Game Management Flow
Admin Components → API Routes → MongoDB (Games) ↔ BGG API
Specific Implementation Details
Key architectural elements:
A. Authentication & Authorization
• NextAuth.js implementation (src/app/api/auth/[...nextauth])
• Session management
• Admin role verification (src/hooks/useAdmin.ts)
B. Data Management
• MongoDB models (User, Game)
• API route handlers
• BGG integration service
C. Frontend Architecture
• Component hierarchy
• UI component library
• Client-side state management
Additional Elements
Supporting components:
• Configuration files (next.config.js, tailwind.config.ts)
• Public assets structure
• Environment variables flow
• Type definitions (src/types/*)
Specific Notes for This Project
• The separation between admin and public interfaces
• The game inventory management system
• The authentication and authorization flow
• The integration with BoardGameGeek's API
• The MongoDB data model structure
Technical Stack Highlights
Key technologies:
• Next.js 13+ (App Router)
• MongoDB
• NextAuth.js
• Tailwind CSS
• TypeScript
Remember to:
• Clear data flow directions
• Notes for important configuration points
• Security boundaries
• Error handling paths