How amiturfriend007/interviewai works
Project Type & Purpose
• This is a full-stack AI interview platform ("Interview AI") consisting of a React frontend and a Django backend.
• Frontend hosts three main UI modules (Dashboard, Interview Engine, Question Bank).
• Backend provides an admin console, user management, and an NLP API (/api/interact) that leverages a BERT model.
• Nginx serves both the frontend static assets and reverse-proxies to Django.
• The entire solution is deployed to Azure Cloud.
Key Components
a. Client Browser & React Frontend
• Components: Dashboard.tsx, InterviewEngine.tsx, QuestionBank.tsx
• Static assets served by Nginx (HTML/CSS/JS)
b. Nginx Reverse Proxy
• Serves React build (static files)
• Proxies API calls (e.g. /api/interact) to Django backend
c. Django Backend
• Admin interface (built-in Django Admin)
• User module (authentication, authorization)
• API module “api/interact” invoking the BERT NLP model
d. BERT NLP Service
• Either embedded within Django or as a separate microservice/container
e. Database
• Stores user profiles, question bank data, interview sessions, logs
• e.g., PostgreSQL or Azure SQL Database
f. Azure Cloud Infrastructure
• Azure App Service or Virtual Machines (hosting Nginx + Django)
• Optional: Azure Kubernetes Service (if containerized)
• Azure Blob Storage (for any large assets or model artifacts)
• Azure Load Balancer or Azure Front Door (for traffic distribution)
Relationships & Data Flows
• User → Browser (React UI)
• Browser → Nginx (static file GET)
• Browser → Nginx → Django API (POST /api/interact, GET /api/users, etc.)
• Django → Database (ORM queries for users, questions)
• Django → BERT Model (invoke NLP pipeline)
• Responses flow back up the chain: BERT → Django → Nginx → Browser → User
Architectural Patterns & Principles
• Separation of Concerns: clearly decoupled UI, application logic, and data layers
• MVC (Django’s default pattern for admin & user modules)
• API-driven Communication: frontend ↔ backend via REST or GraphQL
• Reverse Proxy Pattern: Nginx front ends both static hosting and API routing
• Scalability via Azure services (scale out frontend/backend independently)