How sungbinlee/mock-interviewer-be works
Main Components
a) Client-Side (Frontend):
• GitHub Pages hosting
• Speech-to-Text (STT) component
• User Interface components
• Token management system
b) Server-Side (Backend):
• Django application server
• Authentication system
• Chat management system
• Text-to-Speech (TTS) engine
• Database (for user data and chat history)
c) External Services:
• OpenAI API integration
• AWS EC2 deployment environment
• Nginx reverse proxy
• Gunicorn WSGI server
Component Relationships
a) Presentation Layer:
• Web browser interface
• Frontend components (React/JavaScript)
• Audio input/output handling
b) API Gateway Layer:
• Nginx reverse proxy
• API endpoints (/api/user/, /api/chat/)
c) Application Layer:
• Django application server
• Authentication middleware
• Chat processing logic
• TTS conversion service
d) External Services Layer:
• OpenAI API connection
• Cloud services (AWS)
Data Flow Representation
• User requests flow
• Authentication token flow
• Chat message processing
• Audio conversion paths
• Database interactions
Specific Elements
a) User Flow:
• Registration/Login process
• Chat interaction flow
• Voice input/output processing
b) Security Layer:
• Token authentication
• Daily chat limits
• API security
c) Database Schema:
• User model
• Chat history storage
• Daily limit tracking
Technical Details to Highlight
• Django REST framework endpoints
• Token-based authentication system
• OpenAI API integration points
• Audio processing pipeline
• Database relationships
Deployment Architecture
• AWS EC2 instance
• Nginx configuration
• Gunicorn worker processes
• Static file serving
Annotations for key technical decisions, such as the choice of Token Authentication and the daily chat limit implementation. This will help other developers understand the architectural decisions made in the project.