An AI-powered interview preparation platform that generates role-specific questions, tracks your progress, and helps you master concepts — built on Google Gemini.
✨ Features • 🚀 Quick Start • ⚙️ Configuration • 📁 Project Structure • 🤝 Contributing
The Interview Alchemist transforms your interview preparation with Google Gemini AI. Specify a target role and experience level, get a tailored set of Q&A pairs, pin the questions that matter most, and deep-dive into any concept with AI-generated explanations — all in one place.
| Feature | Description |
|---|---|
| 🎯 Role-Specific Sessions | Generate 10 targeted interview questions based on your role, experience, and chosen topics |
| 📌 Pin & Bookmark | Bookmark key questions to build a personal revision list |
| 🧠 AI Explanations | Click "Learn More" on any question for a concept-level deep dive powered by Gemini |
| 📊 Progress Dashboard | Track total sessions, Q&A count, and pinned questions at a glance |
| 🔍 Search & Filter | Quickly find sessions by role, topic, or description |
| 🔐 Secure Auth | JWT in httpOnly cookies with CSRF double-submit protection |
| Layer | Technology |
|---|---|
| Frontend | React 19, React Router 7, Tailwind CSS 4, Framer Motion |
| Backend | Node.js, Express 5, Mongoose |
| Database | MongoDB Atlas |
| AI | Google Gemini (gemini-3.1-flash-lite-preview) via @google/generative-ai |
| Auth | JWT (httpOnly cookie) + CSRF tokens |
- Node.js 18+
- A free MongoDB Atlas account
- A Google AI Studio API key
git clone https://github.com/pratstick/The-Interview-Alchemist.git
cd The-Interview-Alchemist# Backend
cd backend && npm install
# Frontend (from the repo root)
cd ../frontend/the-interview-alchemist && npm installCopy the example file and fill in your values:
cp .env.example backend/.envOpen backend/.env and set the variables (see Configuration below).
Open two terminals:
# Terminal 1 — backend (from /backend)
npm run dev
# Terminal 2 — frontend (from /frontend/the-interview-alchemist)
npm run devFrontend: http://localhost:5173 | Backend: http://localhost:8000
Create a backend/.env file with the following keys:
| Variable | Required | Description |
|---|---|---|
MONGO_URI |
✅ | MongoDB Atlas connection string (see below) |
GOOGLE_API_KEY |
✅ | Google Gemini API key from AI Studio |
JWT_SECRET |
✅ | A long random string used to sign JWTs |
PORT |
❌ | Server port (default: 8000) |
ALLOWED_ORIGIN |
❌ | CORS origin for the frontend (default: http://localhost:5173) |
- Sign up at mongodb.com/atlas and create a free M0 cluster.
- In the cluster overview, click Connect → Drivers and copy the connection string. It looks like:
mongodb+srv://<username>:<password>@<cluster>.mongodb.net/<dbname>?retryWrites=true&w=majority - Replace
<username>,<password>, and<dbname>with your credentials. - Under Security → Network Access, add your current IP address (or
0.0.0.0/0for local development).
Troubleshooting — if you see
querySrv ENOTFOUND, the three most common causes are:
- The cluster hostname in the URI is incorrect. Re-copy it from the Atlas dashboard.
- Your IP is not whitelisted in Network Access.
- A firewall or VPN is blocking outbound connections on port 27017.
The-Interview-Alchemist/
├── backend/
│ ├── config/
│ │ └── db.js # MongoDB connection with diagnostic errors
│ ├── controllers/
│ │ ├── authController.js # Register / login / logout
│ │ ├── sessionController.js
│ │ ├── questionController.js
│ │ └── aiController.js # Gemini integration
│ ├── middlewares/
│ │ ├── authMiddleware.js # JWT verification
│ │ └── uploadMiddleware.js # Multer file uploads
│ ├── models/ # Mongoose schemas (User, Session, Question)
│ ├── routes/ # Express routers
│ ├── utils/
│ │ └── prompts.js # Gemini prompt templates
│ └── server.js # App entry point
│
└── frontend/the-interview-alchemist/
└── src/
├── pages/
│ ├── LandingPage.jsx
│ ├── Auth/ # Login & SignUp
│ ├── Home/ # Dashboard & CreateSessionForm
│ └── InterviewPrep/ # Interview session view
├── components/
│ ├── Cards/ # SummaryCard, QuestionCard, ProfileInfoCard
│ ├── layouts/ # Navbar, DashboardLayout
│ ├── Inputs/ # Input, ProfilePhotoSelector
│ └── loader/ # SpinnerLoader, SkeletonLoader
├── context/
│ └── UserContext.jsx
└── utils/
├── axiosInstance.js # Axios with CSRF header injection
├── apiPaths.js
├── data.js # Static data (features, card colours)
└── helper.js
All endpoints are prefixed with /api.
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /auth/register |
— | Create a new account |
| POST | /auth/login |
— | Login and receive a JWT cookie |
| POST | /auth/logout |
✅ | Clear the session cookie |
| GET | /sessions |
✅ | List all sessions for the current user |
| POST | /sessions |
✅ | Create a new session |
| GET | /sessions/:id |
✅ | Get a session with its questions |
| DELETE | /sessions/:id |
✅ | Delete a session |
| PUT | /questions/:id/pin |
✅ | Toggle pin on a question |
| POST | /ai/generate-questions |
✅ | Generate interview Q&A via Gemini |
| POST | /ai/generate-explanation |
✅ | Get a concept explanation via Gemini |
Contributions are welcome! Please open an issue first to discuss significant changes.
Areas where help is especially appreciated:
- 📱 Mobile responsiveness — some layouts still need polish on small screens
- 🧪 Tests — unit tests for backend controllers, component tests for the frontend
- 🎨 UI/UX improvements — animations, accessibility, dark mode
- 💬 Better prompts — more accurate or detailed Gemini prompt engineering
- 🌐 Internationalisation — support for non-English users
# After making changes, lint and build to check for issues
cd frontend/the-interview-alchemist && npm run lint && npm run build
node --check backend/server.jsGPL-3.0 — see the LICENSE file for full details.