AlgoPrep is a full-stack interactive platform designed to help developers level up their technical skills. Featuring adaptive learning quizzes, AI mentoring, live practice rooms, competitive duels, and an AI-powered job matching system, AlgoPrep is the ultimate companion for coding interview preparation.
We have organized the project in a unified layout where both frontend (Vite/React) and backend (Express/Node) files live in the same root workspace for easier development and deployment:
algoprep/
├── middleware/ # Express authentication and security middleware
├── models/ # MongoDB models (Users, Attempts, Jobs, Quests, etc.)
├── public/ # Static public assets for the frontend
├── routes/ # Express API route handlers
├── scripts/ # Backend background and automation scripts
├── sockets/ # Socket.io event handlers for real-time duels
├── src/ # React frontend application source code
│ ├── components/ # Reusable React components (UI backgrounds, modals, etc.)
│ ├── context/ # React application context states (Auth, etc.)
│ ├── pages/ # Page routes (Dashboard, DuelRoom, AdaptiveQuiz, etc.)
│ ├── styles/ # Global styles (Tailwind or custom CSS)
│ └── utils/ # Frontend utility functions
├── utils/ # Backend utility functions (AI Matcher, Send Email, etc.)
├── db.js # MongoDB connection helper
├── eslint.config.js # ESLint configuration
├── index.html # Frontend entry HTML page
├── package.json # Unified dependencies and build scripts
├── server.js # Express server entry point
├── vite.config.js # Vite build configuration
└── database.sqlite # SQLite database (if used locally for specific features)
- Adaptive Quizzes: Dynamic questions tailored to your skill level.
- AI Mentor: Get real-time feedback on your code and preparation.
- Live Duels: Compete against other developers in real-time quiz battles.
- Talent Analytics: Track your progress over time with rich visualization.
- AI Job Matching: Automatically sync and match jobs from your profile and scores.
- Gamification: Earn achievements and complete quests.
Make sure you have Node.js installed (version 18+ recommended) and a running instance of MongoDB.
Create a .env file in the root directory and define the following variables:
PORT=5000
MONGO_URI=mongodb://localhost:27050/algoprep
JWT_SECRET=your_jwt_secret_here
OPENAI_API_KEY=your_openai_api_key
GEMINI_API_KEY=your_gemini_api_keyInstall all backend and frontend dependencies in a single step:
npm installStart both the Express backend server and the Vite development server concurrently:
npm run dev- Frontend Development Server: Runs on http://localhost:5173 (default Vite port)
- Backend API Server: Runs on http://localhost:5000
To compile the production assets for the frontend:
npm run buildnpm run dev: Runs the client and server concurrently in development mode.npm run dev:client: Starts only the Vite development server.npm run dev:server: Starts only the Express server with file watch mode.npm run build: Compiles the React production bundle.npm run lint: Performs lint checks on the codebase.npm run start: Starts the backend server.