How elliott-chong/quizmify works
Main System Components
a) Frontend Layer:
• Next.js Application (App Router architecture)
• UI Components (/src/components)
• Client-side State Management
• Theme System
b) Backend Layer:
• Next.js API Routes (/src/app/api)
• Authentication System (NextAuth.js)
• Database Layer (Prisma ORM)
• GPT Integration (/src/lib/gpt.ts)
┌─ Client Layer ─────────────────────┐
• Pages (Dashboard, Quiz, History) │
• UI Components │
• Form Schemas │
• ┘
┌─ API Routes ──────────────────┐
• Auth Routes │
• Game Routes │
• Question Routes │
• ┘
┌─ Services ───────────────┐
• Database (Prisma) │
• GPT Integration │
• Authentication │
• ┘
Component Relationships
• User authentication flow
• Quiz creation and submission
• Question generation via GPT
• Data persistence flow
Specific Implementation Details
• Next.js 13+ App Router architecture
• Prisma as ORM
• NextAuth.js for authentication
• Tailwind CSS for styling
• GPT integration for question generation
Key Features to Highlight
Application features:
• Multiple quiz types (MCQ, Open-ended)
• Real-time scoring
• History tracking
• Statistics and analytics
• User authentication
Data Flow Patterns
Primary data flows:
Quiz Taking → Scoring → Statistics
[User Interface Layer]
• ↕
[Next.js App Router]
• ↕
[API Routes Layer]
• ↕
[Service Layer (Auth, GPT, DB)]
Important Considerations:
Demonstrate GPT service integration
This system design should effectively communicate the application's architecture while maintaining the appropriate level of detail for a principal software engineer to understand the complete system flow.