An AI-powered mock interview platform that connects job seekers with experienced interviewers and provides intelligent question generation, real-time feedback, and performance scoring.
- Overview
- Key Features
- Architecture
- Microservices
- Technology Stack
- Getting Started
- API Documentation
- Database Schema
- Environment Variables
- Deployment
- Contributing
Interview Trainer is a comprehensive platform designed to help job seekers prepare for technical and behavioral interviews through:
- AI-Generated Questions: Smart question generation based on industry and role
- Peer-to-Peer Interviews: Connect with experienced interviewers
- Real-Time AI Feedback: Get instant analysis and scoring
- Performance Tracking: Monitor progress over time
The platform serves two primary user types:
- Interviewees: Job seekers looking to practice and improve their interview skills
- Interviewers: Experienced professionals offering mock interview sessions
- AI-Powered Mock Interviews - Practice with dynamically generated questions tailored to specific roles and industries
- Real Person Interviews - Schedule and conduct live video interviews with experienced interviewers
- Performance Analytics - Track confidence scores, completion rates, and overall performance metrics
- Session Recording & Review - Access past interviews for self-assessment
- Smart Scheduling - Book interviews with available interviewers based on expertise
- Expert Profile Management - Showcase expertise, industry focus, and availability
- Rating & Review System - Build reputation through candidate feedback
- Flexible Scheduling - Set available time slots for mock interviews
- Performance Insights - View interview statistics and impact metrics
- Gemini AI Integration - Advanced question generation and answer analysis
- Automated Scoring - AI-powered performance evaluation
- Real-Time Processing - Live feedback during interview sessions
The platform follows a microservices architecture with service discovery, API gateway, and event-driven communication patterns.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Client Applications β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β API Gateway (Port: 8081) β
β - Request Routing - Load Balancing β
β - Authentication - Rate Limiting β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Service Registry (Eureka) β
β (Port: 8761) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββΌββββββββββββββββββββββ
β β β
βΌ βΌ βΌ
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β User Service β β Interview β β Question β
β (8085) β β Session β β Generation β
β β β (8090) β β (8087) β
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β β β
βΌ βΌ βΌ
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
βAuth Service β β Feedback & β β Processing β
β (8088) β β Scoring β β (8084) β
β β β (8082) β β β
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β β β
βΌ βΌ βΌ
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β Notification β β Storage β β β
β (8083) β β (8086) β β β
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
| Service | Port | Description | Database | Key Technologies |
|---|---|---|---|---|
| Service Registry | 8761 | Eureka server for service discovery | N/A | Netflix Eureka |
| API Gateway | 8081 | Spring Cloud Gateway for routing | N/A | Spring Gateway, WebFlux |
| User Service | 8085 | User management, authentication, profiles | PostgreSQL | JPA, Redis, JWT |
| Auth Service | 8088 | OAuth2, JWT token management, Cloudinary | N/A | Spring Security, Cloudinary |
| Interview Session Service | 8090 | Session scheduling, LiveKit integration, WebSocket | PostgreSQL (R2DBC) | WebSocket, LiveKit, Kafka |
| Question Generation Service | 8087 | AI-powered question generation | PostgreSQL | Gemini AI |
| Processing Service | 8084 | Video/audio processing, Flask integration | PostgreSQL | Multipart, Async |
| Feedback & Scoring Service | 8082 | AI analysis and scoring | PostgreSQL | Keycloak |
| Notification Service | 8083 | Email notifications | PostgreSQL | JavaMail |
| Storage Service | 8086 | File storage management | PostgreSQL | Keycloak |
- Java 21 - Latest LTS version with virtual threads support
- Spring Boot 3.4.2 - Microservices framework
- Spring Cloud 2024.0.0 - Service discovery, gateway, Feign clients
- Spring Security - JWT and OAuth2 authentication
- Spring Data JPA/R2DBC - Data persistence
- PostgreSQL - Primary relational database
- Redis - Distributed caching and session management
- Google Gemini AI - Question generation and answer analysis
- LiveKit - Real-time video/audio for interviews
- Cloudinary - Image upload and management
- Flask API - Python-based media processing
- Kafka - Event streaming for async processing
- WebSocket - Real-time chat and notifications
- Spring OpenFeign - Inter-service communication
- Netflix Eureka - Service registry and discovery
- Spring Cloud Gateway - API gateway with reactive programming
- Maven - Build and dependency management
- Java 21 or higher
- Maven 3.8+
- PostgreSQL 14+
- Redis 7+
- Kafka (for event streaming)
-
Clone the repository
git clone https://github.com/Leul120/interview-trainer.git cd interview-trainer -
Start Infrastructure Services
# Start PostgreSQL # Start Redis # Start Kafka (if using event streaming)
-
Set Environment Variables Create a
.envfile or set the following environment variables:export DB_URL=jdbc:postgresql://localhost:5432/interview-trainer export DB_USER=postgres export DB_PWD=your-password export EUREKA_CLIENT_SERVICE_URL=http://localhost:8761/eureka export REDIS_HOST=localhost export GEMINI_API_KEY=your-gemini-api-key export LIVE_KIT_API_KEY=your-livekit-key export LIVE_KIT_API_SECRET=your-livekit-secret export CLOUDINARY_CLOUD_NAME=your-cloud-name export CLOUDINARY_API_KEY=your-api-key export CLOUDINARY_API_SECRET=your-api-secret export FLASK_API=http://localhost:5000 export MAIL_PASSWORD=your-email-password
-
Build All Services
# Build each service cd service-registry && mvn clean install cd ../apiGateway && mvn clean install cd ../userService && mvn clean install cd ../authService && mvn clean install cd ../interviewSessionService && mvn clean install cd ../questionGenerationService && mvn clean install cd ../processingService && mvn clean install cd ../feedbackAndScoringService && mvn clean install cd ../notificationService && mvn clean install cd ../storageService && mvn clean install
-
Run Services (Start in order)
# 1. Service Registry cd service-registry && mvn spring-boot:run # 2. API Gateway cd apiGateway && mvn spring-boot:run # 3. Other Services (in any order) cd userService && mvn spring-boot:run cd authService && mvn spring-boot:run cd interviewSessionService && mvn spring-boot:run # ... etc
| Method | Endpoint | Description |
|---|---|---|
| POST | /signup |
Register new user |
| POST | /signin |
Authenticate user |
| POST | /refresh |
Refresh JWT token |
| GET | /get-user/{email} |
Get user by email |
| GET | /get-user-by-id |
Get current user |
| GET | /public/get-interviewers |
List all interviewers |
| POST | /update-user/{id} |
Update user profile |
| GET | /online-status/{status} |
Set online status |
| Method | Endpoint | Description |
|---|---|---|
| GET | /start-session/{scheduleId} |
Start interview session |
| GET | /start-ai-session/{title} |
Start AI-powered session |
| GET | /join-session/{scheduleId}/{sessionId} |
Join scheduled interview |
| GET | /end-session/{sessionId} |
End interview session |
| POST | /schedule-interview |
Schedule new interview |
| GET | /get-my-sessions |
Get user's sessions (paginated) |
| GET | /get-my-scheduled-interviews |
Get scheduled interviews |
User
βββ id (UUID, PK)
βββ email (String, Unique)
βββ password (String)
βββ name (String)
βββ role (Enum: ADMIN, INTERVIEWEE)
βββ type (UserType)
βββ profilePicture (String)
βββ expertise (List<String>)
βββ industry (String)
βββ availabilityStatus (Enum)
βββ averageRating (Double)
βββ reviewCount (Integer)
βββ completedInterviews (Integer)
βββ overallPerformanceScore (Double)
βββ confidenceScore (Double)
βββ isSubscribed (Boolean)
βββ createdAt (Timestamp)
βββ updatedAt (Timestamp)
InterviewSession
βββ id (UUID, PK)
βββ title (String)
βββ intervieweeId (UUID, FK)
βββ interviewerId (UUID, FK)
βββ status (Enum: SCHEDULED, ONGOING, COMPLETED, CANCELED)
βββ room (String)
βββ token (String)
βββ startedAt (Timestamp)
βββ endedAt (Timestamp)
ScheduledInterview
βββ id (UUID, PK)
βββ intervieweeId (UUID, FK)
βββ interviewerId (UUID, FK)
βββ scheduledAt (Timestamp)
βββ duration (Duration)
| Variable | Required | Description |
|---|---|---|
DB_URL |
Yes | PostgreSQL connection string |
DB_USER |
Yes | Database username |
DB_PWD |
Yes | Database password |
EUREKA_CLIENT_SERVICE_URL |
Yes | Eureka server URL |
REDIS_HOST |
Yes | Redis server hostname |
GEMINI_API_KEY |
Yes | Google Gemini API key |
LIVE_KIT_API_KEY |
For video | LiveKit API key |
LIVE_KIT_API_SECRET |
For video | LiveKit API secret |
CLOUDINARY_CLOUD_NAME |
For images | Cloudinary cloud name |
CLOUDINARY_API_KEY |
For images | Cloudinary API key |
CLOUDINARY_API_SECRET |
For images | Cloudinary API secret |
FLASK_API |
For processing | Flask processing service URL |
MAIL_PASSWORD |
For emails | Email service password |
- Service Registry: Deploy first and ensure it's accessible to all services
- Database: Use managed PostgreSQL (AWS RDS, Azure Database, etc.)
- Redis: Use managed Redis (Redis Cloud, AWS ElastiCache)
- API Gateway: Configure SSL/TLS and rate limiting
- Monitoring: Implement health checks and metrics collection
The service registry is deployed at:
- URL:
https://service-registry-46p5.onrender.com
Individual services can be deployed to Render, AWS, or any cloud provider supporting Java applications.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support, email codeetgo@gmail.com or open an issue in the repository.
- Spring Boot and Spring Cloud teams for the excellent microservices framework
- Google Gemini AI for powering intelligent question generation
- LiveKit for real-time video infrastructure