Refactored the interview application from a single-page design to a multi-page wizard flow with the following pages:
- Interview Form Page (
/) - Generate questions - Question Answer Page (
/interview/:interviewId) - Answer questions one at a time - Results Page (
/results/:interviewId) - View overall score and detailed feedback
-
Separate Pages
- Question generation form is now its own dedicated page
- Questions are answered on a separate page
- Results are shown on a final summary page
-
One Question at a Time
- Each question is displayed individually with navigation
- Clean, focused UI without distractions
- Progress bar shows completion status
-
Database Storage
- Questions generated by AI are stored immediately in DB
- Questions are fetched one-by-one from the backend
- All answers are persisted to database
-
Auto-Save & Evaluate
- User clicks "Save & Next" button
- Answer is saved to DB
- AI evaluation happens in background (fire-and-forget)
- User is immediately navigated to next question
- No waiting for evaluation to complete
-
Results at the End
- Evaluation results are NOT shown immediately
- After last question, user is redirected to results page
- Results page shows:
- Overall score with animated circular progress indicator
- Grade badge (Excellent, Good, Average, etc.)
- Detailed breakdown for each question
- Individual AI feedback (expandable cards)
-
Auto-Navigation
- After saving answer, automatically moves to next question
- No manual "next" button click needed
- Smooth transition between questions
Start Interview Form
↓
Enter Details & Generate Questions
↓
Questions Saved to DB
↓
Redirect to /interview/:id?question=0
↓
Answer Question 1
↓
Click "Save & Next"
↓
Save to DB + Trigger Background Evaluation
↓
Auto-Navigate to Question 2
↓
... (repeat for all questions)
↓
On Last Question: Click "Save & View Results"
↓
Redirect to /results/:id
↓
View Overall Score & Detailed Feedback
Location: web/src/app/components/question-answer/
Features:
- Displays one question at a time
- Progress bar (e.g., "Question 3 of 10 - 30% Complete")
- Large textarea with character count validation (max 5000)
- Navigation buttons:
- Previous (go back to previous question)
- Skip Question (skip without answering)
- Save & Next (save answer and move forward)
- Auto-navigation after successful save
- Query param management (
?question=0) - Background AI evaluation (non-blocking)
Routes:
/interview/:interviewId- Main entry point/interview/:interviewId?question=2- Specific question
Location: web/src/app/components/results/
Features:
- Animated circular progress indicator
- Overall score calculation (average of all question scores)
- Color-coded grade badge:
- Excellent: 9-10 (Green gradient)
- Good: 7-8.9 (Purple gradient)
- Average: 5-6.9 (Yellow gradient)
- Below Average: 3-4.9 (Orange gradient)
- Poor: 0-2.9 (Red gradient)
- Statistics cards:
- Questions Answered
- Total Questions
- Success Rate (percentage)
- Detailed breakdown with expandable cards:
- Each question shows score badge
- Click to expand and view:
- Your answer
- AI evaluation feedback
- Strengths and improvements
- Action buttons:
- Retake Interview (restart from first question)
- Start New Interview (go to home page)
Route: /results/:interviewId
const routes: Routes = [
{ path: '', component: InterviewFormComponent },
{ path: 'interview/:interviewId', component: QuestionAnswerComponent },
{ path: 'results/:interviewId', component: ResultsComponent },
{ path: '**', redirectTo: '' }
];POST /api/interview/generate
- Creates interview and questions in DB
- Returns
interview_id - Frontend redirects to
/interview/:interviewId
GET /api/interview/questions/:interviewId
- Fetches all questions for the interview
- Returns questions with any existing answers
- Used by both QuestionAnswerComponent and ResultsComponent
POST /api/interview/answer
{
"question_id": 123,
"answer_text": "User's answer..."
}- Saves or updates answer in DB
- Returns
answer_id - Frontend then triggers evaluation
POST /api/interview/evaluate/:answerId
- Calls Gemini AI to evaluate the answer
- Updates DB with score and feedback
- Called in background - response not awaited
- Glassmorphism effects on progress bars and tips sections
- Gradient backgrounds (purple/blue theme throughout)
- Smooth animations:
- Slide up on page load
- Fade in for messages
- Slide down for expandable sections
- Loading states with spinners
- Error handling with user-friendly messages
- Character counter with color coding (green → yellow → red)
- Responsive design for mobile devices
- Primary: Purple gradient (#667eea → #764ba2)
- Success: Green gradient (#11998e → #38ef7d)
- Warning: Yellow gradient (#f7971e → #ffd200)
- Error: Red gradient (#ee0979 → #ff6a00)
- Secondary: Gray (#6c757d)
- Stores all questions in memory after fetching
- Tracks current question index
- Updates URL query params (
?question=N) - Manages loading and saving states per question
- Fetches questions fresh from API
- Calculates overall score from all questions
- Manages expanded/collapsed state for details
-
Background Evaluation
- Evaluation happens asynchronously
- User doesn't wait for AI response
- Fire-and-forget pattern for better UX
-
Smart Navigation
- Query params preserve state
- User can refresh and stay on same question
- Back button works correctly
-
Lazy Data Loading
- Questions loaded once and cached
- Only fetch when necessary
- Minimal API calls
-
Start Backend
cd interviewi-api python app.py -
Start Frontend
cd web npm start -
Test Flow
- Open http://localhost:4200
- Fill in interview form
- Click "Generate Questions"
- Should redirect to
/interview/:id?question=0 - Answer first question
- Click "Save & Next"
- Should auto-navigate to question 2
- Continue until last question
- Click "Save & View Results"
- Should redirect to
/results/:id - Verify overall score and feedback are displayed
- Click on question cards to expand details
- Test "Retake Interview" button
- Test "Start New Interview" button
- Chrome/Edge: ✅ Full support
- Firefox: ✅ Full support
- Safari: ✅ Full support (with backdrop-filter)
- Mobile browsers: ✅ Responsive design
- Add timer for each question
- Save draft answers automatically while typing
- Add ability to flag questions for review
- Export results as PDF
- Email results to user
- Add interview history dashboard
- Implement answer comparison (show improvement over time)
- Add hints/tips for difficult questions
- Real-time collaborative interviews
- Video recording for answers