"LeetCode can't ask follow-up questions. Alexis can."
The AI interviewer that watches you code, spots when you're taking a suboptimal approach, and asks exactly the question a senior engineer would askβall through voice.
Hiring software engineers is expensive and high-friction. Traditional coding tests are silent, isolated experiences that fail to capture a candidate's communication skills or problem-solving process.
BetterThanLeet changes this by creating an interactive, voice-guided technical interview. It combines:
- Daytona for a real, secure coding environment.
- ElevenLabs for a natural, conversational AI interviewer.
- CodeRabbit & Gemini 3 Pro for deep, real-time code analysis.
- Sentry for monitoring runtime errors.
Instead of just checking if the code passes tests, this system observes how the candidate codes, offering hints, asking architectural questions ("Why did you choose O(n^2) here?"), and even auto-fixing syntax errors when asked.
- π£οΈ Conversational AI Interviewer: Powered by ElevenLabs, the agent speaks naturally, asks follow-up questions, and responds to the candidate's actions.
- β‘ Live Daytona Sandbox: A fully functional, ephemeral coding environment created instantly for each interview session. Supports real-time file I/O and command execution.
- π‘οΈ Integrity Shield: Built-in anti-cheat detection that tracks tab focus loss ("blur events") and suspicious paste operations.
- π Comprehensive Reports: Generates a final "Hire/No Hire" recommendation based on code quality, integrity score, and completion time.
- π§ββοΈ Wizard Mode (Demo): A fallback control system that allows a human operator to force specific voice lines via
Ctrl+Shift+X, ensuring perfect demos even if the AI hallucinates. - π§ Advanced Reasoning Engine:
- Static Analysis: Uses regex and heuristics to instantly detect complexity issues (nested loops) and security risks.
- AI Analysis: Uses Gemini 3 Pro to understand code logic and generate "Senior Engineer" level feedback.
- CodeRabbit Integration: Deep code reviews focusing on best practices and potential bugs.
- π οΈ Autonomous Auto-Fix: The agent can detect syntax/runtime errors and, upon request, autonomously patch the code and install missing dependencies (e.g.,
pip install numpy). - π‘οΈ Real-time Monitoring: Sentry integration tracks exceptions and performance bottlenecks during the interview process.
Please add screenshots to the public/screenshots folder.
| Interview Interface | Code Analysis |
|---|---|
![]() |
![]() |
| Voice Agent | Final Report |
|---|---|
![]() |
![]() |
The system follows a reactive event-loop architecture where the candidate's code changes trigger analysis events, which in turn drive the Voice Agent's behavior.
sequenceDiagram
participant C as Candidate
participant UI as Next.js UI
participant D as Daytona Sandbox
participant AI as Agent Logic (Gemini/Reasoning)
participant V as Voice (ElevenLabs)
Note over C, V: Interview Session Starts
V->>C: "Welcome! Please implement a list reversal function."
C->>UI: Types code
UI->>D: Syncs file (Daytona SDK)
par Real-time Analysis
D->>AI: Analyze Code Structure
AI->>AI: Detect O(n^2) Complexity
and Runtime Check
D->>D: Run Python Interpreter
end
alt Critical Issue Detected
AI->>V: Generate Hint Prompt
V->>C: "I see you're using a nested loop. Is there a more efficient way?"
else Syntax Error
C->>UI: Request "Auto Fix"
UI->>AI: Generate Fix
AI->>D: Apply Patch & Install Dependencies
D->>UI: Update Editor
V->>C: "I've fixed that syntax error and installed numpy for you."
end
A detailed overview of the codebase organization:
/
βββ public/ # Static assets
β βββ icons/ # Official technology logos
β βββ screenshots/ # Application screenshots
βββ src/
β βββ app/ # Next.js App Router
β β βββ api/ # Backend API Routes
β β β βββ analysis/ # Endpoints for Gemini/CodeRabbit analysis
β β β βββ sandbox/ # Daytona workspace management (create, execute)
β β β βββ tts/ # Direct Text-to-Speech API for Wizard Mode
β β βββ interview/ # Main Interview Interface Page
β β βββ page.tsx # Landing Page
β βββ components/ # React Components
β β βββ agent/ # Voice Agent UI (Visualizer, Status)
β β βββ analysis/ # Review Results & Metrics Panels
β β βββ editor/ # Monaco Editor wrapped with Daytona sync
β β βββ interview/ # Dashboard layout (Console, Controls, Reports)
β βββ lib/ # Core Logic & Services
β βββ daytona.ts # Daytona SDK wrapper for workspace management
β βββ gemini.ts # Google Gemini AI integration
β βββ coderabbit.ts # CodeRabbit integration service
β βββ store.ts # Zustand state management (Interview Session)
βββ .env.local # Environment variables (GitIgnored)
βββ package.json # Project dependencies
- Node.js 18+
- Docker (Required if running Daytona Server locally)
- API Keys for:
- Daytona
- Gemini (Google AI Studio)
- ElevenLabs
- Sentry (Optional)
-
Clone the repository:
git clone https://github.com/nihalnihalani/BetterThanLeet.git cd BetterThanLeet -
Install dependencies:
npm install
-
Configure Environment: Create a
.env.localfile in the root directory:cp .env.example .env.local # If example exists, otherwise create new
Add the following keys to your .env.local:
| Variable | Description | Required |
|---|---|---|
DAYTONA_API_KEY |
Your Daytona API Key | β |
DAYTONA_API_URL |
URL for Daytona Server (default: https://api.daytona.io) |
β |
GEMINI_API_KEY |
Google Gemini API Key for reasoning | β |
NEXT_PUBLIC_ELEVENLABS_AGENT_ID |
Public Agent ID for the Voice Interface | β |
ELEVENLABS_API_KEY |
Private API Key for TTS (Wizard Mode) | β |
SENTRY_AUTH_TOKEN |
Sentry Auth Token for monitoring | β |
NEXT_PUBLIC_USE_MOCK_DAYTONA |
Set to true to simulate Daytona without Docker |
β |
NEXT_PUBLIC_USE_MOCK_CODERABBIT |
Set to true to mock CodeRabbit responses |
β |
Start the development server:
npm run devOpen http://localhost:3000 in your browser.
Goal: Deliver a flawless demo presentation even if the AI is unpredictable.
- Enable "Wizard Mode" in the UI footer.
- Press
Ctrl+Shift+Xat any time. - The system will bypass the conversational agent logic and force the voice to read the next line from the pre-defined script in
InterviewAgent.tsx. - This uses the direct
/api/ttsendpoint for low-latency playback.
| Component | Tech | Icon |
|---|---|---|
| Frontend | Next.js 16 | |
| React 19 | ||
| Tailwind CSS | ||
| Infrastructure | Daytona SDK | |
| Docker | ||
| AI & Voice | ElevenLabs | |
| Gemini 3 Pro | ||
| Analysis | CodeRabbit | |
| Monitoring | Sentry |
Mock Mode:
To develop the UI without spinning up real Docker containers or consuming API credits, enable Mock Mode in .env.local:
NEXT_PUBLIC_USE_MOCK_DAYTONA=true
NEXT_PUBLIC_USE_MOCK_CODERABBIT=true- 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.
Built for the Better Hack hackathon. Traditional interviews are dead.



