MockMateAI-IntelligentInterviewCoach

The Challenge
The main challenge was handling real-time browser-native speech recognition while ensuring seamless synchronization with the AI backend. Additionally, minimizing latency for AI responses and managing strict type safety across the new Next.js 16 Server Actions ecosystem was critical.
TECHNOLOGIES USED
🎨 Frontend
⚙️ Backend
🗄️ Database
🚀 DevOps
The Solution
→ Next.js 16 Server Actions + MongoDB for direct, zero-API data mutations. → Browser Speech API + Gemini 1.5 Flash for rapid, real-time AI feedback. → Tailwind CSS v4 + Shadcn UI for a clean, modern interface.
Server Side Logic
AI Latency
Performance Score
Key Decisions
Why Server Actions over API Routes?
Since we needed direct, low-latency database mutations from the client form, Server Actions eliminated the need to maintain boilerplate API routes.
Why Gemini 1.5 Flash?
Interview feedback requires near-instant responses. Gemini Flash offered the perfect balance of speed and high reasoning capabilities over heavier models.
Why native Speech Recognition?
Instead of dealing with heavy audio file uploads and server-side transcription, using the browser API handled it locally with zero cost and zero latency.
What I Learned
Hardest Part
Handling edge cases with browser compatibility for the native Speech Recognition API, especially across different mobile devices.
Biggest Insight
Prompt engineering is essentially programming in English. Crafting the strict JSON schema prompt for the AI was the most critical piece of the architecture.
Do Differently
I would implement WebSockets for streaming the AI response word-by-word instead of waiting for the full JSON block to load.
Key Highlights
AI Question Generation
Generates 5 unique technical questions based on Job Role & Tech Stack.
Voice-to-Text Engine
Records user answers in real-time using browser-native Speech API.
Instant AI Feedback
Analyzes answers to provide 1-10 ratings and improvement tips.
Interview History
Dashboard to track performance trends and review past feedback.
Next Project