Skip to content

Ajaykumar-8/PrepAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ PrepAI β€” AI-Powered Interview Preparation Platform

# πŸš€ PrepAI β€” AI-Powered Interview Preparation Platform

PrepAI is a production-level AI-powered interview preparation platform built using the MERN stack.  
The platform helps students and developers prepare for technical interviews through AI-driven learning tools, mock tests, coding practice, analytics, resume analysis, and personalized career roadmaps.

---

# 🌟 Features

## πŸ” Authentication System
- JWT Authentication
- User Signup/Login
- Password Hashing using bcrypt
- Protected Routes
- Persistent Login
- Role-Based Authorization

---

## 🧠 AI Interview Preparation
- AI-generated interview questions
- AI-generated answers & explanations
- Difficulty-based questions
- Role-based preparation
- AI-powered interview guidance

---

## πŸ“ AI Notes Generator
- PDF Upload
- Text Upload
- AI Summarization
- Flashcards Generation
- Interview Revision Notes

---

## πŸ§ͺ Mock Test Platform
- MCQ-based Tests
- Topic-wise Quizzes
- Timers
- Auto Evaluation
- Score Calculation
- Leaderboards
- Test History

---

## πŸ’» Coding Practice Platform
- Monaco Code Editor
- Multi-language Support
- Judge0 API Integration
- Code Execution
- Submission History

Supported Languages:
- Java
- Python
- C++
- JavaScript

---

## πŸ“Š Analytics Dashboard
- Performance Tracking
- Weak Topic Analysis
- Coding Analytics
- Test Analytics
- Streak Tracking
- Progress Charts

---

## πŸ“„ AI Resume Analyzer
- Resume PDF Upload
- ATS Score
- Skill Extraction
- Resume-Job Matching
- Missing Skills Detection

---

## πŸš€ AI Roadmap Generator
- Personalized Career Roadmaps
- Learning Paths
- Recommended Projects
- Resources & Interview Guidance

Supported Roles:
- MERN Stack Developer
- Java Developer
- AI Engineer
- Backend Developer

---

## πŸ› οΈ Admin Panel
- User Management
- Test Management
- Content Moderation
- Analytics Overview
- Question Upload System

---

# πŸ—οΈ System Architecture

```bash
                β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                β”‚     Frontend     β”‚
                β”‚ React + Redux    β”‚
                β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚
                    Axios API Calls
                         β”‚
                β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
                β”‚     Backend      β”‚
                β”‚ Node + Express   β”‚
                β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚      MongoDB         β”‚
              β”‚    Database Layer    β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🧩 Project Modules

Module Description
Authentication JWT-based secure authentication
Mock Tests MCQ test platform
AI Notes AI-powered summarization
Coding Platform Online compiler environment
Resume Analyzer ATS scoring & skill analysis
Analytics User performance insights
Roadmap Generator AI-generated learning paths
Admin Panel Platform management

βš™οΈ Tech Stack

Frontend

  • React.js
  • Vite
  • Tailwind CSS
  • Redux Toolkit
  • React Router DOM
  • Axios
  • Chart.js / Recharts
  • Monaco Editor

Backend

  • Node.js
  • Express.js
  • MongoDB
  • Mongoose
  • JWT
  • bcryptjs

AI & APIs

  • OpenAI API / Gemini API
  • Judge0 API

πŸ› οΈ Technologies Used & Why

Technology Purpose
React.js Frontend UI development
Vite Fast frontend build tool
Tailwind CSS Utility-first responsive styling
Redux Toolkit Global state management
Axios API communication
Node.js Backend runtime
Express.js API development
MongoDB NoSQL database
Mongoose MongoDB object modeling
JWT Authentication
bcryptjs Password hashing
OpenAI/Gemini AI functionalities
Judge0 API Code execution

πŸ“ Production-Level Folder Structure

Frontend Structure

frontend/
β”‚
β”œβ”€β”€ public/
β”‚
β”œβ”€β”€ src/
β”‚
β”‚   β”œβ”€β”€ api/
β”‚   β”‚   └── axios.js
β”‚   β”‚
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   └── store.js
β”‚   β”‚
β”‚   β”œβ”€β”€ assets/
β”‚   β”‚   β”œβ”€β”€ images/
β”‚   β”‚   β”œβ”€β”€ icons/
β”‚   β”‚   └── animations/
β”‚   β”‚
β”‚   β”œβ”€β”€ components/
β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ common/
β”‚   β”‚   β”‚   β”œβ”€β”€ Sidebar.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Navbar.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Timer.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ LoadingSpinner.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ErrorMessage.jsx
β”‚   β”‚   β”‚   └── EmptyState.jsx
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ dashboard/
β”‚   β”‚   β”‚   β”œβ”€β”€ DashboardCards.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ DashboardStats.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ProfileDropdown.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ RecentActivity.jsx
β”‚   β”‚   β”‚   └── QuickActions.jsx
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ landing/
β”‚   β”‚   β”‚   β”œβ”€β”€ Navbar.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ HeroSection.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ FeaturesSection.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ AICapabilities.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ DashboardPreview.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Testimonials.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ CTASection.jsx
β”‚   β”‚   β”‚   └── Footer.jsx
β”‚   β”‚   β”‚
β”‚   β”‚   └── ui/
β”‚   β”‚       β”œβ”€β”€ Button.jsx
β”‚   β”‚       β”œβ”€β”€ GlassCard.jsx
β”‚   β”‚       β”œβ”€β”€ Input.jsx
β”‚   β”‚       β”œβ”€β”€ Modal.jsx
β”‚   β”‚       β”œβ”€β”€ Select.jsx
β”‚   β”‚       └── Badge.jsx
β”‚   β”‚
β”‚   β”œβ”€β”€ features/
β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ auth/
β”‚   β”‚   β”‚   β”œβ”€β”€ authSlice.js
β”‚   β”‚   β”‚   β”œβ”€β”€ authService.js
β”‚   β”‚   β”‚   └── authAPI.js
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ dashboard/
β”‚   β”‚   β”‚   β”œβ”€β”€ dashboardSlice.js
β”‚   β”‚   β”‚   β”œβ”€β”€ dashboardService.js
β”‚   β”‚   β”‚   └── dashboardAPI.js
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ interview/
β”‚   β”‚   β”‚   β”œβ”€β”€ InterviewForm.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ AIResponseCard.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ InterviewChat.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ interviewService.js
β”‚   β”‚   β”‚   β”œβ”€β”€ interviewSlice.js
β”‚   β”‚   β”‚   └── interviewAPI.js
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ tests/
β”‚   β”‚   β”‚   β”œβ”€β”€ TestInterface.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ QuestionCard.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ResultCard.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Timer.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ testService.js
β”‚   β”‚   β”‚   β”œβ”€β”€ testSlice.js
β”‚   β”‚   β”‚   └── testAPI.js
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ results/
β”‚   β”‚   β”‚   β”œβ”€β”€ ResultAnalytics.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ScoreChart.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ WeakAreas.jsx
β”‚   β”‚   β”‚   └── resultsService.js
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ resume/
β”‚   β”‚   β”‚   β”œβ”€β”€ ResumeUpload.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ResumeScore.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ResumeSuggestions.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ resumeService.js
β”‚   β”‚   β”‚   └── resumeSlice.js
β”‚   β”‚   β”‚
β”‚   β”‚   └── notes/
β”‚   β”‚       β”œβ”€β”€ NotesEditor.jsx
β”‚   β”‚       β”œβ”€β”€ NotesList.jsx
β”‚   β”‚       └── notesService.js
β”‚   β”‚
β”‚   β”œβ”€β”€ hooks/
β”‚   β”‚   β”œβ”€β”€ useAuth.js
β”‚   β”‚   β”œβ”€β”€ useTimer.js
β”‚   β”‚   β”œβ”€β”€ useTheme.js
β”‚   β”‚   └── useApi.js
β”‚   β”‚
β”‚   β”œβ”€β”€ layouts/
β”‚   β”‚   β”œβ”€β”€ DashboardLayout.jsx
β”‚   β”‚   β”œβ”€β”€ AuthLayout.jsx
β”‚   β”‚   └── LandingLayout.jsx
β”‚   β”‚
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   └── utils.js
β”‚   β”‚
β”‚   β”œβ”€β”€ pages/
β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ Home.jsx
β”‚   β”‚   β”œβ”€β”€ Dashboard.jsx
β”‚   β”‚   β”œβ”€β”€ InterviewPage.jsx
β”‚   β”‚   β”œβ”€β”€ TestsPage.jsx
β”‚   β”‚   β”œβ”€β”€ AnalyticsPage.jsx
β”‚   β”‚   β”œβ”€β”€ LeaderboardPage.jsx
β”‚   β”‚   β”œβ”€β”€ ResultPage.jsx
β”‚   β”‚   β”œβ”€β”€ HistoryPage.jsx
β”‚   β”‚   β”‚
β”‚   β”‚   └── auth/
β”‚   β”‚       β”œβ”€β”€ Login.jsx
β”‚   β”‚       β”œβ”€β”€ Signup.jsx
β”‚   β”‚       └── ForgotPassword.jsx
β”‚   β”‚
β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”œβ”€β”€ AppRoutes.jsx
β”‚   β”‚   └── ProtectedRoute.jsx
β”‚   β”‚
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ aiService.js
β”‚   β”‚   β”œβ”€β”€ analyticsService.js
β”‚   β”‚   └── leaderboardService.js
β”‚   β”‚
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”œβ”€β”€ constants.js
β”‚   β”‚   β”œβ”€β”€ helpers.js
β”‚   β”‚   └── formatters.js
β”‚   β”‚
β”‚   β”œβ”€β”€ App.jsx
β”‚   β”œβ”€β”€ main.jsx
β”‚   β”œβ”€β”€ App.css
β”‚   └── index.css
β”‚
β”œβ”€β”€ .env
β”œβ”€β”€ package.json
β”œβ”€β”€ vite.config.js
└── README.md

Backend Structure

backend
β”‚
β”œβ”€β”€ src
β”‚
β”‚   β”œβ”€β”€ config
β”‚   β”‚   └── db.js
β”‚   β”‚
β”‚   β”œβ”€β”€ controllers
β”‚   β”‚   β”œβ”€β”€ authController.js
β”‚   β”‚   β”œβ”€β”€ userController.js
β”‚   β”‚   β”œβ”€β”€ interviewController.js
β”‚   β”‚   β”œβ”€β”€ resumeController.js
β”‚   β”‚   └── notesController.js
β”‚   β”‚
β”‚   β”œβ”€β”€ services
β”‚   β”‚   β”œβ”€β”€ authService.js
β”‚   β”‚   β”œβ”€β”€ userService.js
β”‚   β”‚   β”œβ”€β”€ interviewService.js
β”‚   β”‚   └── resumeService.js
β”‚   β”‚
β”‚   β”œβ”€β”€ models
β”‚   β”‚   β”œβ”€β”€ User.js
β”‚   β”‚   β”œβ”€β”€ Interview.js
β”‚   β”‚   β”œβ”€β”€ Resume.js
β”‚   β”‚   └── Notes.js
β”‚   β”‚
β”‚   β”œβ”€β”€ routes
β”‚   β”‚   β”œβ”€β”€ authRoutes.js
β”‚   β”‚   β”œβ”€β”€ userRoutes.js
β”‚   β”‚   β”œβ”€β”€ interviewRoutes.js
β”‚   β”‚   β”œβ”€β”€ resumeRoutes.js
β”‚   β”‚   └── notesRoutes.js
β”‚   β”‚
β”‚   β”œβ”€β”€ middleware
β”‚   β”‚   β”œβ”€β”€ authMiddleware.js
β”‚   β”‚   β”œβ”€β”€ errorMiddleware.js
β”‚   β”‚   └── validateMiddleware.js
β”‚   β”‚
β”‚   β”œβ”€β”€ validations
β”‚   β”‚   β”œβ”€β”€ authValidation.js
β”‚   β”‚   └── interviewValidation.js
β”‚   β”‚
β”‚   β”œβ”€β”€ utils
β”‚   β”‚   β”œβ”€β”€ generateToken.js
β”‚   β”‚   β”œβ”€β”€ asyncHandler.js
β”‚   β”‚   └── ApiError.js
β”‚   β”‚
β”‚   β”œβ”€β”€ app.js
β”‚   └── server.js
β”‚
β”œβ”€β”€ .env
β”œβ”€β”€ .gitignore
β”œβ”€β”€ package.json
└── README.md

πŸ” JWT Authentication Flow

User Login
    ↓
Password Verification (bcrypt)
    ↓
JWT Token Generation
    ↓
Frontend Stores Token
    ↓
Protected Routes Access
    ↓
Middleware Verifies Token

🧠 AI Workflow

User Prompt/Input
       ↓
Backend AI Service
       ↓
Prompt Engineering
       ↓
OpenAI / Gemini API
       ↓
AI Response Processing
       ↓
Frontend Rendering

πŸ§ͺ Mock Test Flow

User Starts Test
      ↓
Questions Loaded
      ↓
Timer Starts
      ↓
User Submits Answers
      ↓
Backend Evaluation Logic
      ↓
Score Calculation
      ↓
Analytics Updated

πŸ’» Coding Platform Flow

User Writes Code
       ↓
Frontend Monaco Editor
       ↓
Backend Submission API
       ↓
Judge0 API Execution
       ↓
Execution Result Returned

πŸ“Š Analytics Flow

User Activity
      ↓
MongoDB Aggregation Queries
      ↓
Analytics APIs
      ↓
Frontend Charts
      ↓
Dashboard Insights

πŸ“¦ Installed Dependencies

Frontend Dependencies

npm install react-router-dom
npm install axios
npm install @reduxjs/toolkit
npm install react-redux
npm install tailwindcss @tailwindcss/vite
npm install recharts
npm install chart.js react-chartjs-2
npm install @monaco-editor/react

Backend Dependencies

npm install express
npm install mongoose
npm install cors
npm install dotenv
npm install bcryptjs
npm install jsonwebtoken
npm install multer
npm install pdf-parse
npm install express-validator
npm install nodemon

πŸš€ Environment Variables

Backend .env

PORT=5000

MONGO_URI=your_mongodb_connection

JWT_SECRET=your_secret_key

OPENAI_API_KEY=your_api_key

CLIENT_URL=http://localhost:5173

🎨 Frontend Features

  • Responsive SaaS UI
  • Dark/Light Theme
  • Sidebar Navigation
  • Dashboard Cards
  • Reusable Components
  • Loading Skeletons
  • Error Handling
  • Toast Notifications

πŸ”₯ API Best Practices

  • RESTful APIs
  • Centralized Error Handling
  • Middleware-based Authentication
  • Validation Layer
  • Modular Architecture
  • Service-based Logic
  • Environment Variable Security

πŸ›‘οΈ Security Features

  • JWT Authentication
  • Password Hashing
  • Protected APIs
  • Role-Based Access
  • Environment Variable Protection
  • CORS Configuration

🌐 Deployment

Frontend

  • Vercel

Backend

  • Render / Railway

Database

  • MongoDB Atlas

πŸ“ˆ Future Improvements

  • Real-time Interview Simulation
  • AI Voice Interviews
  • WebSocket Collaboration
  • Video Interview Recording
  • AI Resume Optimization
  • Gamification System

πŸ‘¨β€πŸ’» Author

Ajay


⭐ If You Like This Project

Give this repository a ⭐ on GitHub!


About

AI-Powered Interview Preparation Platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors