Skip to content

Built at Mac-a-thon: an AI interviewer using Gemini and ElevenLabs to evaluate answers, expose weaknesses, and push targeted improvement.

Notifications You must be signed in to change notification settings

muhibali/NextRound

Repository files navigation

NextRound 🎯

Get to the next round.
Practice interviews with rubric-based AI feedback and targeted follow-ups.

NextRound is an AI-powered interview simulator designed for job seekers, students, and professionals. It evaluates your interview answers across multiple dimensions, identifies your biggest weakness, and generates personalized follow-up questions to help you improve.

πŸ”— Live Demo & Project Details β€’ Built with Next.js & Gemini AI


πŸš€ What is NextRound?

NextRound transforms interview practice with structured AI feedback that goes beyond generic chatbots:

βœ… Rubric-Based Scoring - Get detailed feedback across 5 dimensions (Structure, Clarity, Depth, Relevance, Impact)
βœ… Weakness Detection - Instantly identify your lowest-scoring area to focus improvement
βœ… Answer Improvement - See a better version of your response with rewrite options (Concise, Confident, Technical)
βœ… Targeted Practice Loop - Receive customized follow-up questions addressing your weakness
βœ… Session Mode - Complete 5-question mock interviews with comprehensive coaching summary
βœ… Voice Mode - AI interviewer reads questions and feedback aloud for realistic practice
βœ… Session History - Review past interviews and track your progress over time
βœ… Low-Effort Filter - Smart detection prevents meaningless answers from wasting API tokens


πŸ’‘ How It Works

  1. Configure your interview - Choose role (PM, Engineer, Designer), type (Behavioral, Technical, System Design), and difficulty
  2. Answer the question - Type your response (minimum 50 words, or use voice input)
  3. Get AI evaluation - Receive structured feedback with rubric scores (0-10 scale)
  4. Review your weakness - See your biggest area for improvement highlighted
  5. Improve your answer - Rewrite with AI suggestions (Concise, Confident, Technical styles)
  6. Apply & Re-score - See your score improvement in real-time
  7. Practice targeted follow-up - Answer a new question designed to address your weakness
  8. Repeat and improve - Build confidence through deliberate practice

✨ Key Features

🎯 Single Question Mode

  • Practice one question at a time with instant feedback
  • Rewrite and re-evaluate answers to see score improvements
  • Generate targeted follow-up questions based on weaknesses

πŸ“ Session Mode (5-Question Mock Interview)

  • Complete structured interview sessions with progress tracking
  • Adaptive question generation based on your performance
  • Comprehensive coaching summary with score trends and action items
  • Question counter and progress indicator

🎀 Voice Interviewer Mode

  • AI reads questions aloud for realistic interview simulation
  • Hear your feedback summary in natural speech
  • Auto-play options for hands-free practice
  • Audio controls: Stop/Resume anytime

πŸ” Smart Low-Effort Filter

  • Detects meaningless answers ("idk", "not sure", empty responses)
  • Saves API tokens by not evaluating low-quality submissions
  • Provides coaching tips specific to interview type
  • Encourages detailed, thoughtful responses

πŸ“Š Interactive Answer Improvement

  • Compare original vs. improved answers side-by-side
  • Rewrite in different styles: Concise, Confident, Technical
  • Copy improved answers to clipboard
  • Apply changes and see score delta

πŸ“ˆ Session History & Analytics

  • Review all past interview sessions
  • Track scores across different interview types
  • Export history for external analysis
  • Filter by date, role, or interview type

πŸ› οΈ Tech Stack

  • Next.js 16 - React framework with App Router and Turbopack
  • TypeScript - Type-safe development
  • Tailwind CSS - Utility-first styling with dark mode support
  • Framer Motion - Smooth animations and transitions
  • Google Gemini 2.0 Flash - Advanced AI evaluation with structured outputs
  • ElevenLabs API - High-quality text-to-speech for voice mode
  • Zod - Runtime schema validation
  • localStorage - Client-side session persistence (no backend required)

Architecture Highlights:

  • Singleton Audio Manager for reliable voice playback
  • LRU cache for evaluation results (30-min TTL, 50-item capacity)
  • AbortController for cancellable AI requests
  • React Context API for global voice mode state
  • Responsive design with reduced-motion support

⚑ Setup Instructions

Prerequisites

Installation

# 1. Clone the repository
git clone https://github.com/muhibali/NextRound.git
cd NextRound

# 2. Install dependencies
npm install

# 3. Set up environment variables
cp .env.local.example .env.local
# Edit .env.local and add your API keys

# 4. Start development server
npm run dev

Open http://localhost:3000 in your browser and start practicing! πŸŽ‰


πŸ” Environment Variables

Create a .env.local file in the project root with these variables:

# Required: Your Google Gemini API key
GEMINI_API_KEY=your_api_key_here

# Optional: Preferred Gemini model (default: gemini-2.0-flash-exp)
GEMINI_MODEL=gemini-2.0-flash-exp

# Optional: Alternative provider (OpenRouter)
USE_OPENROUTER=false
OPENROUTER_API_KEY=your_openrouter_key_here

# Optional: Use mock evaluation for testing (bypasses AI, no API key needed)
USE_MOCK_EVAL=false

# Optional: Demo mode for live presentations (ensures app never crashes)
DEMO_MODE=false

# Optional: ElevenLabs Text-to-Speech (for voice mode)
ELEVENLABS_API_KEY=your_elevenlabs_api_key_here
ELEVENLABS_VOICE_ID=EXAVITQu4vr4xnSDxMaL

Environment Variable Details

  • GEMINI_API_KEY (required) - Your Google Gemini API key for AI evaluation
  • GEMINI_MODEL (optional) - Model to use (default: gemini-2.0-flash-exp - latest and fastest)
  • USE_OPENROUTER (optional) - Set to true to use OpenRouter instead of Gemini
  • OPENROUTER_API_KEY (optional) - Your OpenRouter API key (if using OpenRouter)
  • USE_MOCK_EVAL (optional) - Set to true for demos without API calls (returns structured fallback data)
  • DEMO_MODE (optional) - Set to true for live presentations (enables graceful fallbacks, ensures app never crashes)
  • ELEVENLABS_API_KEY (optional) - Your ElevenLabs API key for text-to-speech audio feedback
  • ELEVENLABS_VOICE_ID (optional) - Voice ID from ElevenLabs library (default: Sarah - professional female voice)

🎀 ElevenLabs Setup (Optional)

NextRound can read AI feedback aloud using ElevenLabs text-to-speech. This feature is completely optional.

To enable audio feedback:

  1. Sign up for a free account at ElevenLabs
  2. Get your API key from the ElevenLabs dashboard
  3. Browse the voice library and copy your preferred voice ID
  4. Add both values to your .env.local file:
    ELEVENLABS_API_KEY=sk_your_api_key_here
    ELEVENLABS_VOICE_ID=EXAVITQu4vr4xnSDxMaL

⚠️ Security Critical:

  • ElevenLabs API keys must NEVER be used in frontend code
  • Keys are only accessed server-side in /api routes
  • Never expose process.env.ELEVENLABS_API_KEY to client components
  • The app will gracefully disable audio if keys are missing

πŸ”’ Security Note

NextRound keeps your API keys secure:

  • βœ… .env.local is git-ignored and never committed to version control
  • βœ… API keys are only used server-side in /api routes (never exposed to client)
  • βœ… No process.env secrets in client components
  • βœ… Zod validation prevents injection attacks
  • βœ… All user data stays local (localStorage only, no backend database)

See .github/docs/SECURITY.md for detailed security guidelines.


🎬 Demo Mode (for Live Presentations)

Ensure your demo never crashes! Set DEMO_MODE=true in your .env.local file before live presentations:

DEMO_MODE=true

What Demo Mode does:

  • βœ… Gemini API fails β†’ Automatically uses mock evaluation (keeps app working)
  • βœ… ElevenLabs TTS fails β†’ Shows gentle error message (app continues without audio)
  • βœ… Network issues β†’ Graceful fallbacks with user-friendly messages
  • βœ… Rate limits β†’ Friendly notifications instead of crashes

Demo Mode messages are designed to be reassuring:

  • ❌ Without: "Text-to-speech service authentication failed. Please check your API key."
  • βœ… With: "Voice mode is temporarily unavailable. The app will continue working without audio."

Recommendation: Enable DEMO_MODE=true for:

  • Hackathon presentations
  • Investor demos
  • Conference talks
  • Any live audience presentation

Turn it off (DEMO_MODE=false) for normal development and testing.


🎬 2-Minute Demo Script

For hackathon judges or recruiters:

Setup (30 seconds)

  1. Open homepage β†’ Click "Start Practicing"
  2. Select: Product Manager role, Behavioral type, Mid difficulty
  3. Enable Voice Mode for immersive experience (optional)
  4. Click "Start Interview"

Answer Question (45 seconds)

  1. Read the question: "Tell me about a time you had to prioritize features with limited resources"
  2. Type a sample answer (aim for 100+ words)
  3. Click "Evaluate My Answer"

Review Feedback (30 seconds)

  1. Overall Score - See large score with verdict (e.g., "Strong foundation, room to elevate")
  2. Rubric Breakdown - Review 5 animated progress bars showing dimension scores
  3. Biggest Weakness - Note the highlighted weakness (e.g., "Depth")
  4. Strengths & Growth Areas - Scan key insights
  5. Improved Answer - Compare your response to AI-enhanced version

Practice Loop (15 seconds)

  1. Scroll to Targeted Next Question (designed to address your weakness)
  2. Click "Generate Targeted Question" to continue practicing
  3. (Optional) Visit History page to review past sessions

Key talking points:

  • "Unlike generic AI chat, NextRound uses a structured rubric like real interviewers"
  • "The targeted follow-up creates a practice loop focused on your weak spots"
  • "All data stays local - no signup, no backend, instant feedback"

πŸ“š Documentation

Comprehensive documentation is available in the docs/ directory:

  • Features - Implementation guides for major features

    • Audio Manager & Voice Mode
    • Low-effort answer filter
    • Session mode
    • Weakness targeting system
  • Bug Fixes - Post-mortems and fix documentation

    • Answer re-evaluation flow
    • Interview type persistence
    • Session mode improvements
    • Scoring system fixes
  • Architecture - Design and architecture docs

    • Component structure
    • Design system
    • Animation system
    • Scoring algorithms
  • Project Guides - Core project documentation


🌟 Future Improvements

NextRound is actively being developed. Potential enhancements include:

  • Company-specific templates - Practice Amazon Leadership Principles, Google's STAR method, Meta's impact questions
  • Voice input - Speak your answers naturally with speech-to-text
  • Advanced analytics dashboard - Track improvement trends over time with charts and insights
  • Multiplayer mode - Practice with friends, share feedback, or conduct peer mock interviews
  • Mobile app - Native iOS/Android experience with offline mode
  • Video recording - Analyze body language, eye contact, and delivery
  • Multi-language support - Practice in Spanish, French, Mandarin, and more
  • Export functionality - Download feedback as PDF or share via link
  • Custom rubrics - Define your own evaluation criteria for specialized roles
  • AI interviewer avatar - Visual representation with lip-sync for immersive practice
  • Interview scheduling - Set reminders and daily practice goals
  • Mentor mode - Share session links with mentors or career coaches for review

🀝 Contributing

Contributions are welcome! Whether you're fixing bugs, adding features, or improving documentation, we'd love your help.

Quick links:

Development Workflow

# Create a feature branch
git checkout -b feature/your-feature-name

# Make your changes and test
npm run dev
npm run build

# Run type checking
npm run type-check

# Submit a pull request
git push origin feature/your-feature-name

Project Structure

nextround/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/              # Next.js app router pages
β”‚   β”œβ”€β”€ components/       # React components
β”‚   β”œβ”€β”€ lib/              # Core logic, types, utilities
β”‚   └── context/          # React Context providers
β”œβ”€β”€ docs/                 # Documentation
β”‚   β”œβ”€β”€ features/         # Feature implementation docs
β”‚   β”œβ”€β”€ fixes/            # Bug fix documentation
β”‚   └── architecture/     # Architecture guides
└── .github/docs/         # Project guides and security

πŸ“ License

MIT License - feel free to use this project for learning, hackathons, or production apps!

See LICENSE for details.


πŸ’™ Acknowledgments

Built with ❀️ for the interview prep community. Special thanks to:

  • Google Gemini for powerful AI evaluation
  • ElevenLabs for natural text-to-speech
  • Vercel for seamless deployment
  • Next.js team for an amazing framework
  • All contributors and users who provided feedback

πŸ”— Links


Questions or feedback? Open an issue or reach out to @muhibali


🎯 Get to the next round. Practice with NextRound.

About

Built at Mac-a-thon: an AI interviewer using Gemini and ElevenLabs to evaluate answers, expose weaknesses, and push targeted improvement.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages