A comprehensive AI-powered platform for conducting live coding interviews with real-time code analysis, intelligent hints, and detailed performance reporting. Features separate Admin Portal and Candidate Portal with role-based access control.
- Admin Portal: AI interview dashboard with comprehensive analytics and reporting
- Candidate Portal: Interactive coding interview with CodeSage chat interface
- Role-Based Authentication: Separate login flows for admins and candidates
- Hardcoded Test Users: Pre-configured users for easy testing
- Real-time Code Analysis: AI-powered analysis of code as candidates type
- Intelligent Hint System: Progressive hint system (Nudge โ Guide โ Direction)
- AI Chat Interface: Interactive CodeSage with follow-up questions
- Live Test Execution: Real-time code testing with comprehensive test cases
- Comprehensive Scoring: Multi-dimensional performance evaluation
- Session Tracking: Complete interview session monitoring and analytics
- Multi-language Support: JavaScript, Python, C++ (restricted to these three)
- Code Quality Assessment: Syntax checking, logic analysis, and best practices
- Test Execution: Automated test case running and validation
- Performance Metrics: Code complexity, readability, and efficiency analysis
- AI Interaction Tracking: Complete database logging of all AI interactions
- Detailed Reporting: Comprehensive interview reports and analytics
- Modern UI: Clean, responsive interface built with Tailwind CSS
- Code Editor: Monaco Editor with syntax highlighting and IntelliSense
- Real-time Updates: WebSocket-based live updates
- Mobile Responsive: Works on desktop, tablet, and mobile devices
- Auto-popup Chat: AI responses automatically open in chat interface
- RESTful API: RESTful endpoints for all operations
- WebSocket Server: Real-time communication using Socket.IO
- AI Integration: OpenAI GPT-4 for code analysis and hints (with fallback)
- Database: MongoDB for data persistence
- Authentication: JWT-based authentication system
- AI Interaction Tracking: Comprehensive logging of all AI interactions
- Component-based: Modular React components
- State Management: Context API for state management
- Real-time Updates: Socket.IO client for live updates
- Code Editor: Monaco Editor integration
- Charts & Analytics: Recharts for data visualization
- Dual Portal System: Separate admin and candidate interfaces
- Code Analysis: Real-time syntax and logic analysis
- Hint Generation: Context-aware hint suggestions
- Performance Scoring: Multi-dimensional scoring system
- Feedback Generation: Comprehensive interview feedback
- Test-based Analysis: AI analysis based on test results
- Interview Assessment: Complete performance evaluation
- Node.js 18+
- MongoDB 6.0+
- OpenAI API Key (optional - has fallback)
- Git
-
Clone the repository
git clone <repository-url> cd ai_interviewer
-
Install dependencies
# Install backend dependencies cd server npm install # Install frontend dependencies cd ../client npm install cd ..
-
Environment Setup
# Copy environment template (optional) cp .env.example .env # Edit .env file with your configuration (optional) nano .env
-
Configure Environment Variables (Optional - defaults provided)
# Server Configuration PORT=5000 NODE_ENV=development # Database MONGODB_URI=mongodb://localhost:27017/ai-interviewer # OpenAI Configuration (optional - has fallback) OPENAI_API_KEY=your_openai_api_key_here # JWT Secret JWT_SECRET=your_jwt_secret_here
-
Start MongoDB
# Using Docker docker run -d -p 27017:27017 --name mongodb mongo:6.0 # Or install MongoDB locally # Follow MongoDB installation guide for your OS
-
Start the application
# Start backend server cd server node index.js # In a new terminal, start frontend cd client npm run dev
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- API Health Check: http://localhost:5000/api/health
Admin Account:
- Email:
admin@gmail.com - Password:
admin123 - Role: Administrator
- Access: Full admin dashboard with analytics and reporting
Test Candidate Accounts:
- Email:
user1@gmail.com| Password:user1 - Email:
user2@gmail.com| Password:user2 - Email:
user3@gmail.com| Password:user3 - Role: Candidate
- Access: Coding interview interface
- Login: Use one of the test candidate accounts
- Start Interview: AI interviewer will ask initial questions
- Coding Round: Transition to coding editor after 5-second countdown
- Code Solution: Write code in C++ (language restricted)
- Run Tests: Test your solution against provided test cases
- AI Feedback: Receive real-time AI analysis and hints
- Complete Interview: Submit final solution
- Login: Use admin account (
admin@gmail.com/admin123) - Dashboard Overview: View recent interviews and analytics
- Reports Section: Access comprehensive interview completion data
- AI Insights: View detailed AI interaction metrics
- Performance Analysis: Review candidate performance summaries
- Duration: 45 minutes total
- Problems: 2 LeetCode problems (3Sum, Product of Array Except Self)
- Languages: C++ only
- AI Assistance: Progressive hints (max 3 per problem)
- Auto-progression: Moves to next problem after 2 minutes of inactivity
- users: User accounts and profiles
- interviews: Interview sessions and data
- interviewSessions: Detailed interview tracking
- chatMessages: AI chat conversation history
- aiInteractions: Comprehensive AI interaction logging
code_analysis: Real-time code analysistest_feedback: Test result analysishint: AI-generated hintssystem_message: System notificationsinterview_completion: Complete interview summary
POST /api/auth/login- User login (supports hardcoded users)POST /api/auth/register- Register new userGET /api/auth/me- Get current user
GET /api/interview-sessions/sessions- Get all interview sessionsGET /api/interview-sessions/:id- Get specific sessionGET /api/interview-sessions/analytics- Get session analytics
GET /api/ai-interactions/candidate/:email- Get candidate interactionsGET /api/ai-interactions/session/:sessionId- Get session interactionsGET /api/ai-interactions/metrics- Get aggregated metricsGET /api/ai-interactions/interview-completions- Get completed interviewsGET /api/ai-interactions/interview-analytics- Get interview analyticsPUT /api/ai-interactions/:id- Update interaction record
GET /api/reports/analytics- Get basic analyticsGET /api/reports/comprehensive-analytics- Get detailed analytics
start_interview_session- Start interview trackingcode_change- Send code changesrun_tests- Execute test casescomplete_interview_session- Complete interviewtest_connection- Test socket connectivity
- AdminDashboard: Main dashboard with analytics
- AdminLogin: Admin authentication
- Reports Section: Comprehensive interview data
- AI Insights: AI interaction metrics and summaries
- CandidateLogin: Candidate authentication
- CandidateCoding: Main coding interface
- ChatInterface: CodeSage chat
- TestResults: Test execution results
- CodeEditor: Monaco editor integration
- Read-only Interface: Candidates cannot send messages
- Auto-popup: Opens automatically when AI responds
- Progressive Hints: Nudge โ Guide โ Direction system
- Follow-up Questions: AI asks probing questions
- Session Messages: Local storage, resets on refresh
- Code Monitoring: Continuous code analysis
- Performance Metrics: Big O, maintainability, execution time
- Error Detection: Syntax and logic error identification
- Test Execution: Real-time test case running
- AI Feedback: Contextual suggestions and hints
- Interview Completion Data: Complete session summaries
- AI Interaction Metrics: Detailed AI assistance tracking
- Performance Analytics: Multi-dimensional scoring
- Human-readable Summaries: AI-generated performance assessments
- Candidate Comparison: Side-by-side performance analysis
- Set strong JWT secret
- Configure production MongoDB
- Set up SSL/TLS certificates
- Configure environment variables
- Set up monitoring and logging
- Configure backup strategy
- Set up CI/CD pipeline
- Enable MongoDB indexing
- Configure Redis caching (optional)
- Set up CDN for static assets
- Optimize Docker images
- Configure load balancing
- Admin Login: Test admin dashboard functionality
- Candidate Login: Test interview flow with each test user
- Code Analysis: Verify real-time analysis works
- Test Execution: Confirm test cases run correctly
- AI Interactions: Check AI responses and chat interface
- Reports: Verify admin reports show candidate data
- Use pre-configured test accounts
- Complete interviews to generate test data
- Check admin dashboard for data display
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly with both portals
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue in the repository
- Check the documentation
- Contact the development team
- Video interview support
- Additional programming languages
- Advanced AI models integration
- Mobile app development
- Integration with popular IDEs
- Advanced analytics and insights
- Multi-tenant support
- API rate limiting
- Advanced security features
- โ Separated admin and candidate portals
- โ Implemented role-based authentication
- โ Added comprehensive AI interaction tracking
- โ Created detailed reporting system
- โ Integrated AI chat interface
- โ Added real-time test execution
- โ Implemented progressive hint system
- โ Added interview session tracking
- โ Created human-readable performance summaries
Built with โค๏ธ by the CortexCoders Team