NexPrep AI is a cutting-edge mock interview platform that leverages AI to simulate real-world interview scenarios. Get personalized feedback, optimize your resume for ATS systems, and build professional resumes—all in one place. Perfect for job seekers preparing for technical interviews, behavioral assessments, and career transitions.
| Feature | Description |
|---|---|
| 🎤 Real-Time Voice Interviews | Conduct natural voice-based interviews with AI using speech-to-text and synthesis technology |
| 🤖 Smart Question Generation | AI generates tailored questions based on job role, experience level, and difficulty |
| 📊 Actionable Feedback | Receive detailed performance metrics, ratings, and improvement suggestions after each interview |
| 📄 ATS Resume Checker | Analyze your resume for ATS compatibility with rule-based scoring and AI insights |
| ✏️ Professional Resume Builder | Create stunning resumes with 4 customizable templates (Modern, Professional, Creative, Executive) |
| 🔐 Secure & Private | Firebase authentication with encrypted data storage in MongoDB |
# Clone the repository
git clone https://github.com/yourusername/NexPrep-main.git
cd NexPrep-main
# Install dependencies
npm install
# Set up environment variables (see .env.local example below)
cp .env.example .env.local
# Run development server
npm run dev
# Visit http://localhost:3000📚 For detailed setup instructions, see Installation Guide
🖼️ View Screenshots
- Features
- Tech Stack
- Architecture
- Installation
- Usage
- Project Structure
- Deployment
- Testing
- Documentation
- Roadmap
- Contributing
- Support
|
|
📋 Complete Technology Breakdown
| Technology | Purpose | Version |
|---|---|---|
| Next.js | React framework with SSR/SSG | 15.4.1 |
| React | UI library | 19.2.4 |
| TypeScript | Type safety | 5.8.3 |
| Tailwind CSS | Utility-first styling | Latest |
| Framer Motion | Animations | 12.23.9 |
| Radix UI | Headless UI components | Latest |
| Lucide React | Icon library | 0.525.0 |
| React Webcam | Camera integration | 7.2.0 |
| Technology | Purpose |
|---|---|
| MongoDB | NoSQL database |
| Mongoose | ODM for MongoDB |
| Firebase Auth | User authentication |
| Firebase Admin | Server-side Firebase SDK |
| Technology | Purpose |
|---|---|
| Grok API (xAI) | Primary AI for question generation |
| Google Gemini AI | Alternative AI provider |
| react-speech-to-text | Voice input |
| Web Speech API | Text-to-speech synthesis |
| Technology | Purpose |
|---|---|
| pdf-parse | PDF parsing |
| mammoth | DOCX parsing |
| Technology | Purpose |
|---|---|
| Vercel | Hosting & CI/CD |
| Turbopack | Fast bundler (dev) |
| ESLint | Code linting |
graph TB
A[User Browser] -->|HTTPS| B[Next.js Frontend]
B -->|Route Handlers| C[API Routes]
C -->|Authentication| D[Firebase Auth]
C -->|Data Queries| E[MongoDB]
C -->|AI Requests| F[Grok API / Gemini AI]
B -->|Real-time Voice| G[Web Speech API]
B -->|File Upload| H[File Parser]
H -->|PDF/DOCX| C
E -->|Mongoose ODM| I[Data Models]
style A fill:#61DAFB,stroke:#333,stroke-width:2px
style B fill:#000000,stroke:#333,stroke-width:2px,color:#fff
style D fill:#FFCA28,stroke:#333,stroke-width:2px
style E fill:#47A248,stroke:#333,stroke-width:2px,color:#fff
style F fill:#4285F4,stroke:#333,stroke-width:2px,color:#fff
| Pattern | Implementation | Purpose |
|---|---|---|
| Server Actions | app/actions/*.js |
Server-side data mutations with Next.js 15 |
| Component Composition | Radix UI + ShadCN | Reusable, accessible UI components |
| Singleton Pattern | firebase/client.js, utils/mongodb.js |
Single database/auth instance |
| Factory Pattern | utils/GeminiAIModal.js |
AI provider abstraction |
| MVC Architecture | Models (utils/models.js) + Controllers (Actions) + Views (Components) |
Separation of concerns |
- Node.js >= 18.0.0
- npm or yarn
- MongoDB Atlas account (free tier available)
- Firebase project
- AI API Key (Grok/Gemini)
git clone https://github.com/yourusername/NexPrep-main.git
cd NexPrep-mainnpm install
# or
yarn installCreate a .env.local file in the root directory:
# MongoDB
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/nexprep
NEXT_PUBLIC_MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/nexprep
# AI Provider (Choose one or both)
NEXT_PUBLIC_GROK_API_KEY=xai-xxxxxxxxxxxxxx
# OR
NEXT_PUBLIC_GEMINI_API_KEY=AIzaSyxxxxxxxxxxxxx
# Firebase Admin SDK (Server-side)
FIREBASE_PROJECT_ID=your-project-id
FIREBASE_CLIENT_EMAIL=firebase-adminsdk-xxxxx@your-project-id.iam.gserviceaccount.com
FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nYourPrivateKey\n-----END PRIVATE KEY-----\n"
# Firebase Client (Public)
NEXT_PUBLIC_FIREBASE_API_KEY=AIzaSyxxxxxxxxxxxxx
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your-project-id.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your-project-id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your-project-id.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=123456789012
NEXT_PUBLIC_FIREBASE_APP_ID=1:123456789012:web:abcdef123456Where to get credentials:
- 🗄️ MongoDB: MongoDB Atlas
- 🤖 Grok API: xAI Console
- 🤖 Gemini AI: Google AI Studio
- 🔥 Firebase: Firebase Console → Project Settings → Service Accounts
# Optional: Seed demo data
node scripts/seed_demo_feedback.mjsThe MongoDB collections (mockinterviews, useranswers) will be created automatically on first run.
npm run dev
# or
yarn devOpen http://localhost:3000 in your browser.
🐳 Docker Setup (Alternative)
# Dockerfile
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]# Build and run
docker build -t nexprep-ai .
docker run -p 3000:3000 --env-file .env.local nexprep-ai🔧 Common Installation Issues
Issue: Module not found: Can't resolve 'firebase'
# Solution: Reinstall dependencies
rm -rf node_modules package-lock.json
npm installIssue: Firebase: Error (auth/invalid-api-key)
# Solution: Check that NEXT_PUBLIC_FIREBASE_API_KEY is correctly set
# Ensure no extra spaces or quotes in .env.localIssue: MongooseServerSelectionError
# Solution: Whitelist your IP in MongoDB Atlas
# Network Access → Add IP Address → Allow Access from Anywhere (0.0.0.0/0)Issue: Grok API Error: 401 Unauthorized
# Solution: Verify your API key
# Ensure NEXT_PUBLIC_GROK_API_KEY starts with 'xai-'sequenceDiagram
participant U as User
participant D as Dashboard
participant AI as AI Engine
participant DB as Database
participant V as Voice System
U->>D: Create New Interview
D->>AI: Generate Questions (Job Details)
AI-->>D: Return Interview Questions
D->>DB: Save Interview
U->>V: Start Voice Interview
V->>U: Ask Question (Speech Synthesis)
U->>V: Answer (Speech-to-Text)
V->>AI: Analyze Answer
AI-->>V: Return Feedback & Rating
V->>DB: Save User Answer
U->>D: View Feedback Report
- Navigate to Dashboard
- Click "+ Add New Interview"
- Fill in:
- Job Position (e.g., "Frontend Developer")
- Job Description (paste JD or key responsibilities)
- Years of Experience
- Location (optional)
- Duration (15/30/45/60 minutes)
- Difficulty (Easy/Medium/Hard)
- Click "Start Interview"
- Click "Start Recording" to enable webcam
- Grant microphone & camera permissions
- Click on each question to hear it read aloud
- Speak your answer clearly
- Click "Stop Recording" when done
- Review your recorded answer
- Click "Submit & Get Feedback"
- View AI-generated feedback and ratings
- Go to "ATS Checker" tab
- Upload your resume (PDF/DOCX)
- Review your score breakdown:
- Structure (15%)
- Impact (25%)
- Skills (30%)
- Style (20%)
- Brevity (10%)
- Read detailed suggestions
- Download optimized resume
- Navigate to "Resume Builder"
- Select a template
- Fill in your details:
- Personal Info
- Professional Summary
- Experience
- Education
- Skills
- Projects
- Preview in real-time
- Export or print
| Parameter | Options | Description |
|---|---|---|
| Interview Duration | 15, 30, 45, 60 min | Total interview time |
| Difficulty Level | Easy, Medium, Hard | Question complexity |
| Interview Mode | Voice, Text | Input method (Voice recommended) |
| Voice Language | en-US, en-GB, etc. | Speech synthesis language |
⚙️ Advanced Configuration
Edit utils/GeminiAIModal.js to customize AI behavior:
export const chatSession = {
sendMessage: async (inputPrompt) => {
// Modify temperature (0.0 - 1.0)
// Higher = more creative, Lower = more focused
const response = await fetch("https://api.x.ai/v1/chat/completions", {
body: JSON.stringify({
model: "grok-beta",
temperature: 0.7, // Adjust here
// ... rest of config
})
});
}
};Modify utils/models.js to add custom fields:
const MockInterviewSchema = new mongoose.Schema({
// Add your custom fields
customField: { type: String, maxlength: 500 },
// ... existing fields
});NexPrep-main/
│
├── app/ # Next.js App Router
│ ├── actions/ # Server Actions
│ │ └── interview.js # Interview CRUD operations
│ ├── auth/ # Authentication pages
│ │ ├── sign-in/
│ │ └── sign-up/
│ ├── dashboard/ # Main application
│ │ ├── _components/ # Dashboard components
│ │ │ ├── AddNewInterview.jsx # Interview creation modal
│ │ │ ├── InterviewList.jsx # Interview history
│ │ │ └── Header.jsx # Top navigation
│ │ ├── ats-checker/ # ATS resume analysis
│ │ │ └── _actions/
│ │ │ ├── analyze.js # Rule-based ATS scoring
│ │ │ └── fileParser.js # PDF/DOCX parsing
│ │ ├── interview/
│ │ │ └── [interviewid]/
│ │ │ ├── start/ # Interview conduct page
│ │ │ └── feedback/ # Results & analytics
│ │ ├── questions/ # Question bank
│ │ ├── resume/ # Resume builder
│ │ │ └── _components/
│ │ │ └── templates/ # 4 resume templates
│ │ └── upgrade/ # Pricing (if applicable)
│ ├── globals.css # Global styles
│ ├── layout.js # Root layout
│ └── page.js # Home (redirects to sign-in)
│
├── components/ # Shared UI components
│ └── ui/ # ShadCN UI components
│ ├── button.jsx
│ ├── dialog.jsx
│ ├── input.jsx
│ └── ...
│
├── firebase/ # Firebase configuration
│ ├── admin.js # Server-side SDK
│ └── client.js # Client-side SDK
│
├── lib/
│ └── utils.js # Utility functions (cn helper)
│
├── public/ # Static assets
│
├── scripts/ # Database seeding scripts
│ ├── seed.mjs
│ ├── seed_feedback.mjs
│ └── seed_demo_feedback.mjs
│
├── utils/ # Core utilities
│ ├── db.js # Database connection helper
│ ├── GeminiAIModal.js # AI provider abstraction
│ ├── GeminiATS.js # ATS AI analysis
│ ├── models.js # Mongoose schemas
│ ├── mongodb.js # MongoDB singleton
│ └── schema.js # Validation schemas
│
├── .env.local # Environment variables (create this)
├── components.json # ShadCN UI config
├── jsconfig.json # JavaScript config
├── next.config.mjs # Next.js configuration
├── package.json # Dependencies
├── postcss.config.mjs # PostCSS config
├── tailwind.config.js # Tailwind CSS config
└── tsconfig.json # TypeScript config
- Push your code to GitHub
- Import project to Vercel
- Add environment variables in Vercel dashboard
- Deploy automatically
Environment Variables:
- Go to Project Settings → Environment Variables
- Add all variables from
.env.local - Redeploy
Netlify
npm run buildAdd netlify.toml:
[build]
command = "npm run build"
publish = ".next"
[[plugins]]
package = "@netlify/plugin-nextjs"Docker + Cloud Run
# Build
docker build -t nexprep-ai .
# Tag
docker tag nexprep-ai gcr.io/YOUR_PROJECT/nexprep-ai
# Push
docker push gcr.io/YOUR_PROJECT/nexprep-ai
# Deploy to Cloud Run
gcloud run deploy nexprep-ai \
--image gcr.io/YOUR_PROJECT/nexprep-ai \
--platform managed \
--region us-central1 \
--allow-unauthenticated- Set
NODE_ENV=production - Enable Firebase Auth production mode
- Whitelist production domain in Firebase Console
- Update MongoDB IP whitelist
- Configure CORS if using custom domain
- Enable HTTPS
- Set up error monitoring (Sentry, LogRocket)
- Configure CDN for static assets
- Test all API endpoints in production
- Set up backup strategy for MongoDB
# Frontend tests
npm run test
# End-to-end tests (if configured)
npm run test:e2e
# Linting
npm run lintAuthentication
- Sign up with email/password
- Sign in with existing account
- Sign out functionality
- Protected routes redirect to sign-in
Interview Flow
- Create new interview
- Start interview session
- Record voice answers
- Submit answers and get feedback
- View feedback report
ATS Checker
- Upload PDF resume
- Upload DOCX resume
- View ATS score breakdown
- Download suggestions
Resume Builder
- Switch between templates
- Enter resume data
- Preview updates in real-time
- Export resume
- Installation Guide
- Usage Guide
- API Reference (See Server Actions in
app/actions/) - Contributing Guidelines
- Troubleshooting
- AI-powered mock interviews with voice input
- Real-time feedback and rating system
- ATS resume checker with rule-based scoring
- Resume builder with 4 templates
- Firebase authentication
- MongoDB data persistence
- Dashboard analytics
- Webcam recording support
- Multi-language support (i18n)
- Advanced analytics dashboard with charts
- Email notifications for interview reminders
- Export interview transcripts to PDF
- Mobile app (React Native)
- Video-based interviews (recorded video analysis)
- Peer-to-peer mock interviews
- Interview marketplace (connect with mentors)
- AI-powered resume optimization (automatic rewriting)
- Integration with job boards (LinkedIn, Indeed)
- Company-specific interview prep (FAANG, MAANG)
- Behavioral interview questions database
- Progress tracking with gamification
- Chrome extension for quick practice
- Slack/Discord bot for interview reminders
Want a feature? Open an issue or contribute!
We welcome contributions! Follow these steps:
Click the Fork button at the top right of this page.
git clone https://github.com/YOUR_USERNAME/NexPrep-main.git
cd NexPrep-maingit checkout -b feature/amazing-feature- Write clean, readable code
- Follow existing code style
- Add comments for complex logic
- Test your changes locally
git add .
git commit -m "feat: add amazing feature"Commit Convention:
feat:New featurefix:Bug fixdocs:Documentation changesstyle:Code style changes (formatting)refactor:Code refactoringtest:Adding testschore:Maintenance tasks
git push origin feature/amazing-feature- Go to the original repository
- Click "New Pull Request"
- Select your branch
- Describe your changes clearly
- Submit for review
| Do ✅ | Don't ❌ |
|---|---|
| Write descriptive commit messages | Commit directly to main |
| Test your changes thoroughly | Submit untested code |
| Update documentation if needed | Introduce breaking changes without discussion |
| Follow existing code patterns | Ignore linting errors |
| Keep PRs focused and small | Bundle multiple unrelated changes |
| Be respectful in discussions | Use offensive language |
# Install dependencies
npm install
# Run in development mode
npm run dev
# Build for production
npm run build
# Run production build locally
npm run start
# Lint code
npm run lint- Documentation: Read the Usage Guide
- Issues: Report bugs or request features on GitHub Issues
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by Ajinkya
🔗 Live Demo: https://nexprep-ai.vercel.app
🔗 Portfolio: https://itsajinkya.vercel.app
📫 LinkedIn: linkedin.com/in/ajinkya2004
⭐ Star this repo if you find it helpful!