How mybitbox/bitbox works
Main Components
A. Frontend Layer:
• As a client-side block containing:
• Static content (HTML/CSS)
• JavaScript modules
• External components (Monaco Editor, Toast UI Editor)
• Different pages (dashboard, quiz, interview, etc.)
B. Backend Layer:
• FastAPI application structure:
• API Routes (/api/auth, /api/users, etc.)
• Core Services (database, logging, OpenAI integration)
• Data Models and Schemas
• Business Logic
C. External Services:
• OpenAI API for AI feedback
• Database (SQLite3)
[Client Layer]
• ↕️ HTTP/REST
[Application Layer]
• ↕️
[Data Layer]
Specific Component Details
Frontend Section:
• Pages (login, dashboard, quiz, etc.)
• Static assets (CSS, JS)
• External editors (Monaco, Toast UI)
Backend Section:
• API Gateway (FastAPI)
• Core Services:
• Authentication Service
• Quiz Management
• Content Type Management
• User Management
• Database Access Layer (SQLAlchemy)
Data Layer:
• SQLite database
• Tables for:
• Users
• Quizzes
• Subjects
• Content Types
• Answers
Connection Flows
• User interactions from frontend to backend
• API calls between components
• Database operations
• External API calls to OpenAI
• Authentication flows
Additional Elements
Include:
• Security layer (showing auth flow)
• API endpoints with major HTTP methods
• Data flow directions
• Caching mechanisms (if any)
• Error handling paths
Specific Implementation Notes
• The separation between frontend static content and backend API
• The role of FastAPI in handling requests
• The integration with OpenAI for AI-based feedback
• The data flow for different learning content types
• The user authentication and session management