Skip to content

Canopus-Labs/PrepPilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PrepPilot Logo

PrepPilot - AI-Powered Interview Preparation Platform

License: MIT PRs Welcome React Node.js MongoDB Express.js Tailwind CSS Google Gemini

Your ultimate companion for crushing technical interviews with AI-powered questions, real-time feedback, and comprehensive preparation tools.

🌐 Live Demo β€’ πŸ“– Documentation β€’ πŸ› Report Bug β€’ πŸ’‘ Request Feature


πŸš€ About PrepPilot

PrepPilot is a comprehensive full-stack web application designed to transform your interview preparation journey. Leveraging cutting-edge AI technology and an intuitive interface, PrepPilot generates role-specific interview questions, provides detailed explanations, and helps you track your progress in real-time.

Whether you're preparing for your dream job or sharpening your technical skills, PrepPilot provides all the tools you need to succeed.

✨ Key Features

Feature Description
πŸ€– AI-Powered Question Generation Generate unlimited role-specific interview questions using Google's Gemini AI
πŸ“š Curated Question Banks Access DSA sheets, aptitude questions, and problem-solving challenges
πŸ’» Built-in Code Compiler Write, test, and execute code directly in the browser with Monaco Editor
🎯 Skill Assessment Evaluate your technical proficiency with interactive skill tests
πŸ“– Reference Books Library Access a comprehensive collection of interview preparation books
πŸ“ Resume Builder Create professional resumes with customizable templates
πŸ† Interview Experiences Read and share real interview experiences from the community
πŸ’‘ Project Ideas Explore curated project ideas to enhance your portfolio
πŸ”— Open Source Resources Contribute and learn from open-source projects
πŸ“Š Progress Dashboard Track your preparation metrics and identify weak areas
πŸ” Secure Authentication JWT-based authentication with encrypted passwords
πŸ“± Fully Responsive Seamless experience across desktop, tablet, and mobile devices
🎨 Modern Dark Mode Beautiful UI with theme toggle for comfortable viewing
⚑ Real-time Feedback Instant AI-powered explanations and answer evaluations

πŸ› οΈ Technology Stack

Frontend Architecture

React 18 (Hooks & Functional Components)
β”œβ”€β”€ Vite (Lightning-fast build tool)
β”œβ”€β”€ Tailwind CSS (Utility-first styling)
β”œβ”€β”€ React Router DOM (Client-side routing)
β”œβ”€β”€ Framer Motion (Smooth animations)
β”œβ”€β”€ Monaco Editor (Advanced code editing)
β”œβ”€β”€ React Markdown (Rich content rendering)
└── Axios (HTTP client for API calls)

Backend Architecture

Node.js + Express.js
β”œβ”€β”€ MongoDB + Mongoose (Data persistence)
β”œβ”€β”€ JWT & Bcryptjs (Security & authentication)
β”œβ”€β”€ Google Gemini API (AI intelligence)
β”œβ”€β”€ Multer (File uploads)
β”œβ”€β”€ PDF-Parse (Document processing)
β”œβ”€β”€ Express Rate Limit (API protection)
└── Joi (Input validation)

Development & DevOps

ESLint          Code quality & linting
Git             Version control
Nodemon         Auto-reload during development

πŸ“¦ Complete Dependency Stack

Frontend Dependencies: React 18 β€’ Vite β€’ Tailwind CSS β€’ React Router β€’ Axios β€’ Framer Motion β€’ Monaco Editor β€’ Lucide React β€’ React Icons β€’ React Markdown β€’ React Syntax Highlighter β€’ React Hot Toast β€’ React Split β€’ Moment.js

Backend Dependencies: Express.js β€’ MongoDB β€’ Mongoose β€’ JWT β€’ Bcryptjs β€’ Google Generative AI β€’ Axios β€’ Multer β€’ PDF-Parse β€’ Joi β€’ CORS β€’ Express Rate Limit β€’ Dotenv

⚑ Quick Start Guide

Prerequisites

Before getting started, ensure you have the following installed:

πŸ“₯ Installation Steps

1️⃣ Clone the Repository

git clone https://github.com/yourusername/PrepPilot.git
cd PrepPilot

2️⃣ Backend Setup

cd backend
npm install

3️⃣ Frontend Setup

cd ../frontend
npm install

4️⃣ Environment Configuration

Create a .env file in the backend/ directory with the following variables:

# MongoDB Configuration
MONGO_URI=mongodb+srv://username:password@cluster.mongodb.net/preppilot

# JWT Secret (generate a strong random string)
JWT_SECRET=your_super_secret_jwt_key_here_generate_a_strong_one

# Google Gemini API
GEMINI_API_KEY=your_gemini_api_key_from_ai_studio
GEMINI_MODEL=gemini-1.5-flash

# Server Configuration
PORT=8000
NODE_ENV=development

# Frontend Origin (for CORS)
FRONTEND_ORIGIN=http://localhost:5173

# Optional: Additional configurations
RATE_LIMIT_WINDOW_MS=15000000
RATE_LIMIT_MAX_REQUESTS=100

5️⃣ Start Development Servers

Terminal 1 - Backend:

cd backend
npm run dev
# Server runs on http://localhost:8000

Terminal 2 - Frontend:

cd frontend
npm run dev
# Frontend runs on http://localhost:5173

6️⃣ Access the Application

Open your browser and navigate to:

http://localhost:5173

🐳 Docker Setup (Optional)

# Build and run with Docker Compose
docker-compose up --build

πŸ“ Project Structure

PrepPilot/
β”‚
β”œβ”€β”€ πŸ“‚ backend/                        # Express.js REST API Server
β”‚   β”œβ”€β”€ πŸ“‚ config/                    # Database & environment configuration
β”‚   β”œβ”€β”€ πŸ“‚ controllers/               # Business logic & request handlers
β”‚   β”‚   β”œβ”€β”€ aiController.js           # AI/Gemini API integration
β”‚   β”‚   β”œβ”€β”€ authController.js         # Authentication logic
β”‚   β”‚   β”œβ”€β”€ questionController.js     # Question management
β”‚   β”‚   β”œβ”€β”€ resumeController.js       # Resume operations
β”‚   β”‚   β”œβ”€β”€ sessionController.js      # Session management
β”‚   β”‚   └── userSheetProgressController.js # Progress tracking
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“‚ middlewares/               # Express middlewares
β”‚   β”‚   β”œβ”€β”€ authMiddleware.js         # JWT verification
β”‚   β”‚   β”œβ”€β”€ rateLimiter.js            # API rate limiting
β”‚   β”‚   β”œβ”€β”€ uploadMiddleware.js       # File upload handling
β”‚   β”‚   β”œβ”€β”€ sanitizeAiPrompt.js       # Input sanitization
β”‚   β”‚   └── validateAiPrompt.js       # Prompt validation
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“‚ models/                    # MongoDB Mongoose schemas
β”‚   β”‚   β”œβ”€β”€ User.js                   # User profile & credentials
β”‚   β”‚   β”œβ”€β”€ Question.js               # Interview questions
β”‚   β”‚   β”œβ”€β”€ Resume.js                 # Resume documents
β”‚   β”‚   β”œβ”€β”€ Session.js                # Practice sessions
β”‚   β”‚   β”œβ”€β”€ Sheet.js                  # Question sheets (DSA, etc.)
β”‚   β”‚   β”œβ”€β”€ Book.js                   # Reference books
β”‚   β”‚   └── UserSheetProgress.js      # User progress tracking
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“‚ routes/                    # API endpoints
β”‚   β”‚   β”œβ”€β”€ authRoutes.js             # Auth endpoints
β”‚   β”‚   β”œβ”€β”€ aiRoutes.js               # AI generation endpoints
β”‚   β”‚   β”œβ”€β”€ questionRoutes.js         # Question endpoints
β”‚   β”‚   β”œβ”€β”€ resumeRoutes.js           # Resume endpoints
β”‚   β”‚   β”œβ”€β”€ sessionRoutes.js          # Session endpoints
β”‚   β”‚   β”œβ”€β”€ booksRoutes.js            # Books endpoints
β”‚   β”‚   β”œβ”€β”€ AptitudeQuestions.js      # Aptitude test endpoints
β”‚   β”‚   β”œβ”€β”€ sheetJsonUpload.js        # Sheet upload
β”‚   β”‚   └── userSheetProgressRoutes.js# Progress endpoints
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“‚ utils/                     # Utility functions
β”‚   β”‚   └── prompts.js                # AI prompt templates
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“‚ validation/                # Input validation schemas
β”‚   β”‚   └── aiPromptSchema.js         # Joi validation schemas
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“‚ scripts/                   # Utility scripts
β”‚   β”‚   β”œβ”€β”€ importBooks.js            # Import books to DB
β”‚   β”‚   β”œβ”€β”€ exportBooks.js            # Export books from DB
β”‚   β”‚   └── uploadSheets.js           # Upload question sheets
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“‚ sheets/                    # JSON question sheets
β”‚   β”‚   β”œβ”€β”€ Arrays.json
β”‚   β”‚   β”œβ”€β”€ gfg-must-know-dsa.json
β”‚   β”‚   β”œβ”€β”€ neetcode-150.json
β”‚   β”‚   β”œβ”€β”€ striver-sde-sheet.json
β”‚   β”‚   └── love-babbar-dsa-sheet.json
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“‚ uploads/                   # User-uploaded files storage
β”‚   β”œβ”€β”€ server.js                     # Express server entry point
β”‚   β”œβ”€β”€ package.json
β”‚   └── .env.example
β”‚
β”œβ”€β”€ πŸ“‚ frontend/                       # React + Vite Frontend Application
β”‚   β”œβ”€β”€ πŸ“‚ public/                    # Static assets
β”‚   β”œβ”€β”€ πŸ“‚ src/
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ components/            # Reusable UI components
β”‚   β”‚   β”‚   β”œβ”€β”€ AIHelper.jsx          # AI question generator
β”‚   β”‚   β”‚   β”œβ”€β”€ Compiler.jsx          # Code editor & executor
β”‚   β”‚   β”‚   β”œβ”€β”€ SkillAssessment.jsx   # Skill tests
β”‚   β”‚   β”‚   β”œβ”€β”€ SheetList.jsx         # Question sheets list
β”‚   β”‚   β”‚   β”œβ”€β”€ SheetDetailsPage.jsx  # Sheet details view
β”‚   β”‚   β”‚   β”œβ”€β”€ ThemeToggle.jsx       # Dark/Light mode
β”‚   β”‚   β”‚   β”œβ”€β”€ Drawer.jsx            # Navigation drawer
β”‚   β”‚   β”‚   β”‚
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ Cards/             # Card components
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ QuestionCard.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AptitudeQuestionCard.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ TopicCard.jsx
β”‚   β”‚   β”‚   β”‚   └── SummaryCard.jsx
β”‚   β”‚   β”‚   β”‚
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ Inputs/            # Form input components
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Input.jsx
β”‚   β”‚   β”‚   β”‚   └── ProfilePhotoSelector.jsx
β”‚   β”‚   β”‚   β”‚
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ Layouts/           # Layout components
β”‚   β”‚   β”‚   β”‚
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ Loader/            # Loading spinners
β”‚   β”‚   β”‚   β”‚
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ animations/        # Animation components
β”‚   β”‚   β”‚   β”‚   └── PageTransition.jsx
β”‚   β”‚   β”‚   β”‚
β”‚   β”‚   β”‚   └── ServicesMarquee.jsx   # Service showcase
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ context/               # React Context API providers
β”‚   β”‚   β”‚   β”œβ”€β”€ userContext.jsx       # User state management
β”‚   β”‚   β”‚   └── themeContext.jsx      # Theme state management
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ pages/                 # Page components (route-based)
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ Auth/              # Login/Signup pages
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ Home/              # Home/Dashboard
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ InterviewPrep/     # Interview preparation
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ InterviewExperiences/ # Shared experiences
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ ResumeBuilder/     # Resume builder
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ NotesBooks/        # Reference books
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ ProjectIdeas/      # Project ideas
β”‚   β”‚   β”‚   └── πŸ“‚ OpenSource/        # Open source resources
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ utils/                 # Utility functions
β”‚   β”‚   β”‚   β”œβ”€β”€ apiPaths.js           # API endpoints
β”‚   β”‚   β”‚   β”œβ”€β”€ axiosInstance.js      # Axios configuration
β”‚   β”‚   β”‚   β”œβ”€β”€ animations.js         # Animation utilities
β”‚   β”‚   β”‚   β”œβ”€β”€ helper.js             # General helpers
β”‚   β”‚   β”‚   β”œβ”€β”€ uploadimage.js        # Image upload utility
β”‚   β”‚   β”‚   └── data.js               # Static data
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ assets/                # Images, icons, media
β”‚   β”‚   β”œβ”€β”€ App.jsx                   # Main App component
β”‚   β”‚   β”œβ”€β”€ main.jsx                  # React entry point
β”‚   β”‚   β”œβ”€β”€ App.css                   # Global styles
β”‚   β”‚   └── index.css                 # Base styles
β”‚   β”‚
β”‚   β”œβ”€β”€ vite.config.js                # Vite configuration
β”‚   β”œβ”€β”€ eslint.config.js              # ESLint rules
β”‚   β”œβ”€β”€ tailwind.config.js            # Tailwind CSS config
β”‚   β”œβ”€β”€ package.json
β”‚   └── index.html
β”‚
β”œβ”€β”€ .gitignore                         # Git ignore rules
β”œβ”€β”€ LICENSE                           # MIT License
└── README.md                         # This file

🀝 Contributing Guidelines

We love contributions from the community! PrepPilot is better because of talented developers like you. Here's how you can help:

🎯 How to Get Started

  1. Fork the repository on GitHub

    # Fork via GitHub UI, then:
    git clone https://github.com/YOUR_USERNAME/PrepPilot.git
    cd PrepPilot
  2. Create a feature branch with a descriptive name

    git checkout -b feature/add-amazing-feature
    # or
    git checkout -b fix/resolve-critical-bug
  3. Make your changes following our code style

    • Write clean, readable code
    • Add comments for complex logic
    • Keep components modular and reusable
    • Follow existing naming conventions
  4. Test thoroughly

    # Test your changes locally
    npm run dev    # Frontend
    npm run test   # If tests exist
  5. Commit with clear messages using conventional commits

    git commit -m "feat: add new AI model integration"
    git commit -m "fix: resolve authentication timeout issue"
    git commit -m "docs: update API documentation"
  6. Push and create a Pull Request

    git push origin feature/add-amazing-feature

πŸ“‹ Types of Contributions We Welcome

Type Examples Priority
πŸ› Bug Fixes Fix crashes, errors, or unexpected behaviors High
✨ Features New tools, integrations, or functionality Medium
πŸ“š Documentation README updates, API docs, code comments Medium
🎨 UI/UX Design improvements, accessibility fixes Medium
⚑ Performance Optimize queries, reduce load time High
πŸ§ͺ Tests Add unit tests, integration tests Medium

πŸ“ Pull Request Checklist

Before submitting your PR, ensure:

  • Code follows the project's style guide
  • You've tested your changes locally
  • You've updated relevant documentation
  • Your PR title clearly describes the change
  • Your PR description explains what and why
  • You've linked any related issues
  • No console errors or warnings
  • You've added/updated tests if applicable

🚫 Code Style Guidelines

Frontend (React/JavaScript):

// Use functional components with hooks
const MyComponent = ({ prop1, prop2 }) => {
  return <div>{prop1}</div>;
};

// Use meaningful variable names
const userAuthToken = localStorage.getItem('authToken');

// Add JSDoc comments for complex functions
/**
 * Fetches interview questions for a specific role
 * @param {string} role - The job role
 * @returns {Promise<Array>} Array of questions
 */
const fetchQuestions = async (role) => { ... };

Backend (Node.js/Express):

// Use async/await
const getUser = async (req, res) => {
  try {
    const user = await User.findById(req.params.id);
    res.json(user);
  } catch (error) {
    res.status(500).json({ error: error.message });
  }
};

// Use meaningful error messages
throw new Error("User not found with the provided email");

πŸ› Found a Bug?

  1. Check existing issues to avoid duplicates
  2. Create a new issue with:
    • Clear, descriptive title
    • Step-by-step reproduction instructions
    • Expected vs actual behavior
    • Screenshots/screencasts if applicable
    • Your environment (OS, Browser, Node version)

πŸ’‘ Suggesting Enhancements?

  1. Use the discussion section or create an issue
  2. Describe the problem the enhancement solves
  3. Provide examples of how it would work
  4. Explain the benefits to users

πŸ“ž Need Help?

  • πŸ’¬ Open a discussion for questions
  • πŸ› Create an issue for bugs
  • πŸ“§ Contact maintainers for sensitive issues
  • πŸ€– Check our FAQ section (coming soon)

οΏ½ Troubleshooting & FAQs

Common Issues & Solutions

Issue Cause Solution
401 Unauthorized Error Invalid or expired JWT token Clear browser localStorage and re-login
CORS Error Frontend & backend origins mismatch Verify FRONTEND_ORIGIN matches exactly
404 API Not Found Incorrect API base URL Check VITE_BACKEND_URL in env file
MongoDB Connection Failed Invalid connection string Verify MONGO_URI and IP whitelist
Gemini API Error Invalid or missing API key Check GEMINI_API_KEY in .env
Port Already in Use Another process using the port Change PORT in .env or kill existing process
Mixed Content Warning HTTP frontend accessing HTTPS backend Use HTTPS for both in production
Nodemon not reloading File watch issue Delete node_modules and reinstall

Getting Help

# Check Node version
node --version

# Check npm version
npm --version

# Test MongoDB connection
mongosh "your_connection_string"

# View backend logs
npm run dev  # Shows server logs

# Clear npm cache if installation fails
npm cache clean --force
npm install

πŸ“– API Documentation

Authentication Endpoints

POST   /api/auth/register       - Register new user
POST   /api/auth/login          - Login user
POST   /api/auth/logout         - Logout user
GET    /api/auth/profile        - Get user profile
PUT    /api/auth/profile        - Update user profile

AI Endpoints

POST   /api/ai/generate         - Generate interview questions
POST   /api/ai/explain          - Get detailed explanations
POST   /api/ai/evaluate         - Evaluate user answer

Question Endpoints

GET    /api/questions           - Get all questions
GET    /api/questions/:id       - Get single question
POST   /api/questions           - Create question (admin)
PUT    /api/questions/:id       - Update question (admin)
DELETE /api/questions/:id       - Delete question (admin)

Resume Endpoints

GET    /api/resume              - Get user resumes
POST   /api/resume              - Create resume
PUT    /api/resume/:id          - Update resume
DELETE /api/resume/:id          - Delete resume

For detailed API documentation, see API.md (if available)

πŸš€ Deployment Guide

Deploy Backend to Heroku

# Install Heroku CLI
npm install -g heroku

# Login to Heroku
heroku login

# Create new app
heroku create your-app-name

# Set environment variables
heroku config:set MONGO_URI=your_mongodb_url
heroku config:set JWT_SECRET=your_jwt_secret
heroku config:set GEMINI_API_KEY=your_api_key

# Deploy
git push heroku main

Deploy Frontend to Vercel

# Install Vercel CLI
npm install -g vercel

# Deploy
vercel

Deploy with Docker

# Build and push to Docker Hub
docker build -t username/preppilot:latest .
docker push username/preppilot:latest

# Pull and run on server
docker pull username/preppilot:latest
docker run -p 8000:8000 --env-file .env username/preppilot:latest

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

The MIT License is a permissive open-source license that allows you to:

  • βœ… Use for personal or commercial purposes
  • βœ… Modify the source code
  • βœ… Distribute copies
  • βœ… Include the license in distributions

Conditions:

  • Include the license and copyright notice

πŸ™Œ Acknowledgments & Credits

This project stands on the shoulders of amazing open-source projects and communities:

πŸ€– AI & Technology

  • Google Gemini API - Powering intelligent question generation and explanations
  • React Team - For the revolutionary UI library and amazing community
  • Vite Team - Lightning-fast build tool that transformed frontend development
  • Tailwind Labs - Beautiful utility-first CSS framework

πŸ“š Libraries & Frameworks

  • Express.js - Elegant web framework for Node.js
  • MongoDB - Flexible and scalable NoSQL database
  • Mongoose - Beautiful MongoDB object modeling
  • Monaco Editor - Incredible code editor from VS Code
  • Framer Motion - Production-ready animation library

πŸ‘₯ Community & Inspiration

  • Community Contributors - Everyone who reported bugs and suggested features
  • Open Source Community - For continuous inspiration and support
  • Developers & Educators - Who shared knowledge and best practices

πŸ“– Resources Used

🎯 Roadmap

πŸ”„ In Development

  • Real-time collaboration features
  • Video interview simulation
  • Advanced analytics dashboard
  • Mobile app (React Native)
  • Community forums

🌟 Planned Features

  • Multi-language support
  • Spaced repetition system
  • Integration with LeetCode
  • Machine learning-based recommendations
  • Interview experience matching
  • Premium tier with advanced features

πŸš€ Future Vision

  • Mentorship marketplace
  • Career path recommendations
  • Real interview connections
  • Job board integration
  • Company-specific preparation

πŸ’¬ Community & Support

Get Connected

Support This Project

If PrepPilot helped you land that dream job or ace your interview, consider:

  1. ⭐ Star this repository - It helps more people discover PrepPilot
  2. πŸ“’ Share with others - Tell your friends and colleagues
  3. πŸ› Report bugs - Help us improve the platform
  4. πŸ’‘ Suggest features - Your ideas shape the future
  5. 🀝 Contribute code - Help develop new features
  6. β˜• Buy me a coffee - Support ongoing development

πŸ’– Built with passion by developers, for developers

GitHub followers GitHub stars Twitter Follow

Made with ❀️ for the tech community

"Your success is our mission. Every question you solve is one step closer to your dream job." 🎯


⭐ If this project helped you, please give it a star! Your support means everything! 🌟

About

Prep Pilot is an all-in-one interview preparation platform that helps users organize, track, and streamline their entire preparation journey in one place.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors