A role-based AI-powered interview practice platform that simulates real technical interviews with structured feedback.
Interview Copilot helps developers practice interviews in a focused and structured way.
Instead of random AI chat, the system enforces:
- One question at a time
- Immediate structured feedback
- Controlled interview flow
Each response is evaluated with:
- Score
- Strengths
- Weaknesses
- Ideal Answer
- 🎭 Role-based interviews (Frontend, Backend, DSA)
- 🧠 AI-generated questions & evaluation
- 📊 Real-time scoring and progress tracking
- ⏱️ Session timer
- 📱 Fully responsive UI
- 🔁 Controlled interview flow (fixed number of questions)
- 🧹 Cleaned and structured AI output (no messy formatting)
Frontend
- Next.js 15 (App Router)
- Tailwind CSS
Backend
- Next.js API Routes
AI
- Google Gemini API (
@google/genai)
The application is built with a clear separation of concerns:
- Handles UI rendering, chat state, and user interaction
- Parses and displays structured feedback
- Controls interview flow (question → answer → feedback)
- Limits total number of questions
- Formats and validates AI responses
- Generates interview questions
- Evaluates answers based on structured prompts
⚠️ AI does NOT control application logic. The backend ensures deterministic behavior.
git clone https://github.com/krishna7054/chat-bot.git
cd chat-botnpm installCreate a .env.local file:
GEMINI_API_KEY=your_api_key_herenpm run devTo avoid unreliable AI outputs ("AI slop"), the system follows strict principles:
AI is forced to return responses in a fixed format:
- Score
- Strengths
- Weaknesses
- Ideal Answer
- Next Question
Responses are parsed and split into:
- Feedback
- Next Question
Only required data is extracted.
- Score extracted using regex
- Missing or malformed responses are handled safely
- Removes markdown artifacts (*, #, etc.)
- Ensures clean UI rendering
- Interview flow is NOT controlled by AI
- Backend enforces:
- Question count
- Interview completion
- Response sequencing
💡 AI is treated as a tool, not a source of truth.
- User selects a role
- AI generates Question 1
- User submits answer
- AI evaluates response
- Feedback is displayed
- Next question is asked
- Process repeats until completion