🎯 Intelli Mind - AI-Powered Interview Platform


Revolutionizing interview preparation with AI-powered personalized practice sessions
📋 Table of Contents
🌟 Overview
MockMind is a sophisticated AI-powered interview preparation platform that provides realistic interview experiences through two comprehensive modes:
- 🎤 Traditional Interviews: AI-generated questions with voice recording and intelligent feedback
- 💻 Coding Interviews: Interactive programming challenges with real-time compilation and assessment
The platform leverages Google Gemini AI to create personalized interview experiences, analyze responses, and provide actionable feedback to help users excel in their job interviews.
✨ Features
🎯 Core Features
- AI-Generated Questions: Personalized interview questions based on job position and requirements
- Resume Analysis: Upload and analyze resumes for contextual question generation
- Real-time Voice Recording: Speech-to-text conversion for seamless interview simulation
- Webcam Integration: Video recording for realistic interview practice
- Interactive Code Editor: Full-featured coding environment with syntax highlighting
- Live Code Compilation: Real-time code execution and testing
- Intelligent Feedback: AI-powered analysis with detailed performance insights
- Progress Tracking: Comprehensive analytics and improvement recommendations
🔧 Technical Features
- Responsive Design: Mobile-first approach with beautiful UI/UX
- Real-time Updates: Live feedback and instant compilation results
- Secure Authentication: Robust user management with Clerk
- Database Integration: PostgreSQL with optimized queries
- API-First Architecture: RESTful APIs with comprehensive error handling
- Performance Optimized: Edge runtime and efficient resource management
🚀 Technology Stack
Frontend
- Framework: Next.js 15.1.6 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS + Tailwind Animate
- UI Components: Radix UI primitives
- Animation: Framer Motion
- Code Editor: CodeMirror 6
- Media: React Webcam, Web Speech API
Backend
- Runtime: Node.js (Edge Runtime)
- Database: PostgreSQL (Neon)
- ORM: Drizzle ORM
- Authentication: Clerk
- AI Integration: Google Gemini AI
- Code Execution: Judge0 API
Development Tools
- Package Manager: npm/yarn/pnpm
- Database Migration: Drizzle Kit
- Code Quality: ESLint, Prettier
- Type Safety: TypeScript 5.0
🏛️ Architecture
High-Level System Architecture
graph TB
A[Client Layer - Next.js] --> B[Middleware - Clerk Auth]
B --> C[API Layer - Next.js Routes]
C --> D[AI Services - Gemini]
C --> E[External APIs - Judge0]
C --> F[Database - PostgreSQL]
subgraph "Client Features"
A1[Interview UI]
A2[Code Editor]
A3[Voice Recording]
A4[Webcam Integration]
end
subgraph "API Endpoints"
C1[Interview Questions]
C2[Coding Questions]
C3[Feedback Generation]
C4[Code Compilation]
end
A --> A1
A --> A2
A --> A3
A --> A4
C --> C1
C --> C2
C --> C3
C --> C4
Component Structure
app/
├── layout.tsx # Root layout with providers
├── page.tsx # Landing page
├── globals.css # Global styles
│
├── (auth)/ # Authentication routes
│ ├── sign-in/[[...sign-in]]/
│ └── sign-up/[[...sign-up]]/
│
├── dashboard/ # Main application
│ ├── layout.tsx # Dashboard layout
│ ├── page.tsx # Dashboard home
│ ├── _components/ # Shared components
│ ├── interview/[interviewId]/ # Traditional interviews
│ └── codingInterview/[InterviewId]/ # Coding interviews
│
└── api/ # API routes
├── interview-questions/
├── coding-questions/
├── generate-feedback/
├── coding-questions-feedback/
└── compile/
🚀 Getting Started
Prerequisites
- Node.js 18+
- npm/yarn/pnpm
- PostgreSQL database (or Neon account)
- Clerk account for authentication
- Google AI API key for Gemini
Installation
-
Clone the repository
git clone https://github.com/Prajapatishivam65/Intelli-Mind.git
cd mockmind
-
Install dependencies
npm install
# or
yarn install
# or
pnpm install
-
Set up environment variables
cp .env.example .env.local
-
Configure the database
npm run db:push
-
Start the development server
npm run dev
-
Open your browser
http://localhost:3000
🔧 Environment Setup
Create a .env.local file in the root directory:
# Database Configuration
NEXT_PUBLIC_DRIZZLE_DB_URL=postgresql://username:password@host:port/database
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...
# Google AI (Gemini)
GEMINI_API_KEY=AIza...
# External APIs
JUDGE0_API_URL=https://ce.judge0.com
# Optional if your Judge0 provider requires auth
# JUDGE0_AUTH_TOKEN=your-token
Environment Variables Description
| Variable | Description | Required |
|---|
NEXT_PUBLIC_DRIZZLE_DB_URL | PostgreSQL database connection string | ✅ |
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY | Clerk public key for client-side auth | ✅ |
CLERK_SECRET_KEY | Clerk secret key for server-side auth | ✅ |
GEMINI_API_KEY | Google AI API key for Gemini models | ✅ |
JUDGE0_API_URL | Judge0 base URL | ✅ |
JUDGE0_AUTH_TOKEN | Optional Judge0 auth token | ❌ |
📊 Database Schema
Core Tables
MockInterview
CREATE TABLE mock_interview (
id SERIAL PRIMARY KEY,
jsonMockResp TEXT NOT NULL, -- AI-generated questions (JSON)
jobPosition VARCHAR NOT NULL, -- Target job position
jobDescription VARCHAR NOT NULL, -- Job requirements
jobExperience VARCHAR NOT NULL, -- Required experience level
fileData TEXT, -- Parsed resume content
createdBy VARCHAR NOT NULL, -- User identifier
createdAt VARCHAR NOT NULL, -- Creation timestamp
mockId VARCHAR NOT NULL -- Unique interview ID
);
UserAnswer
CREATE TABLE userAnswer (
id SERIAL PRIMARY KEY,
mockIdRef VARCHAR NOT NULL, -- Interview reference
question VARCHAR NOT NULL, -- Interview question
correctAnswer TEXT NOT NULL, -- Model answer
UserAns TEXT NOT NULL, -- User response
feedback VARCHAR NOT NULL, -- AI feedback
rating VARCHAR NOT NULL, -- Score (1-10)
userEmail VARCHAR NOT NULL, -- User identifier
createdAt VARCHAR NOT NULL -- Response timestamp
);
CodingInterview
CREATE TABLE coding_interview (
id SERIAL PRIMARY KEY,
jsonCodeResp TEXT NOT NULL, -- Coding questions (JSON)
interviewId VARCHAR NOT NULL UNIQUE, -- Session ID
interviewTopic VARCHAR NOT NULL, -- Programming topic
difficultyLevel VARCHAR NOT NULL, -- Easy/Medium/Hard
problemDescription TEXT NOT NULL, -- Problem statement
timeLimit VARCHAR NOT NULL, -- Session duration
programmingLanguage VARCHAR NOT NULL, -- Language choice
createdBy VARCHAR NOT NULL, -- User identifier
createdAt TIMESTAMP NOT NULL -- Creation timestamp
);
UserCodeAnswer
CREATE TABLE userCodeAnswer (
id SERIAL PRIMARY KEY,
interviewIdRef VARCHAR NOT NULL, -- Coding interview reference
question TEXT NOT NULL, -- Coding problem
correctAnswer TEXT NOT NULL, -- Model solution
userAnswer TEXT NOT NULL, -- User's code
feedback TEXT NOT NULL, -- Detailed feedback (JSON)
rating VARCHAR NOT NULL, -- Performance score
userEmail VARCHAR NOT NULL, -- User identifier
createdAt TIMESTAMP NOT NULL, -- Submission time
language VARCHAR NOT NULL -- Programming language
);
Database Commands
# Push schema changes
npm run db:push
# Open database studio
npm run db:studio
# Generate migrations
npx drizzle-kit generate
# Apply migrations
npx drizzle-kit migrate
📡 API Documentation
Interview Questions API
Endpoint: POST /api/interview-questions
Generate personalized interview questions based on job requirements.
// Request
{
jobPosition: string;
jobDescription: string;
yearsOfExperience?: string;
resumeText?: string;
}
// Response
{
questions: Array<{
Question: string;
Answer: string;
}>;
}
Coding Questions API
Endpoint: POST /api/coding-questions
Create programming challenges for coding interviews.
// Request
{
topic: string;
}
// Response
{
questions: Array<{
title: string;
description: string;
examples: Array<{
input: string;
output: string;
explanation: string;
}>;
difficulty: string;
constraints: string[];
hints: string[];
solution: {
cpp: string;
java: string;
};
explanation: string;
}>;
}
Feedback Generation API
Endpoint: POST /api/generate-feedback
Analyze interview responses and provide constructive feedback.
// Request
{
question: string;
answer: string;
}
// Response
{
feedback: {
rating: number; // 1-10
feedback: string;
}
metadata: {
generatedAt: string;
}
}
Coding Feedback API
Endpoint: POST /api/coding-questions-feedback
Comprehensive analysis of coding solutions.
// Request
{
question: string;
code: string;
explanation?: string;
}
// Response
{
feedback: {
rating: number;
technicalAccuracy: number;
codeQuality: number;
feedback: {
strengths: string[];
improvements: string[];
complexityAnalysis: string;
bestPractices: string[];
};
};
metadata: {
generatedAt: string;
};
}
Code Compilation API
Endpoint: POST /api/compile
Execute code in real-time with multiple language support.
// Request
{
language: "java" | "cpp";
code: string;
}
🔍 Detailed Implementation Architecture
📊 Advanced Database Query Patterns
Complex Query Examples with Drizzle ORM
**1. Fetc