You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Star5 (5)You must be signed in to star a repository
About
A full-stack web app to help users prepare for technical interviews using AI-powered question generation, practice sessions, and user session management. This repository contains a TypeScript/Node backend and a React + Vite frontend.
A full-stack web application to help users prepare for technical interviews using AI-powered question generation, timed practice sessions, and personalized session management.
Note: This project is under active development. Some features may be in progress or subject to change.
Authentication — Secure signup/login with HTTPOnly cookie JWTs, active session revocation on token reuse, and automatic token refresh.
Security & Validation — Double-submit CSRF protection (csrf-csrf), strictly typed request validation via Zod, and full IDOR isolation across all tenants.
Interactive Study Hub — Master questions with a visual progress bar, filter by "Pinned" or "Mastered" tabs, and reset session progress instantly.
AI Assistance & Caching — Generate interview questions and concept explanations via Gemini API. Responses are cached via SHA-256 for performance.
Transactions & Error Handling — MongoDB transactions for atomic inserts, global error normalization across all environments.
Automated Testing — 20+ Vitest test suites covering core services, authentication flow, and AI retry logic.
Login/Register → server sets two HTTPOnly cookies: accessToken (15 min) and refreshToken (7 days)
Requests — axios sends cookies automatically (withCredentials: true); non-GET requests include an x-csrf-token header
Token Refresh — on 401 response, axios interceptor calls POST /api/auth/refresh; if refresh fails, redirects to /
Logout — server clears both cookies; frontend clears user context
Environment Variables
Backend (.env)
Variable
Default
Required
NODE_ENV
development
—
PORT
5000
—
MONGO_DB_URI
—
✅
ALLOWED_ORIGINS
http://localhost:5173
—
JWT_SECRET
—
✅
JWT_REFRESH_SECRET
(fallback set)
Recommended
GOOGLE_API_KEY
—
✅
GOOGLE_AI_MODEL
—
✅
CLOUDINARY_CLOUD_NAME
""
For image uploads
CLOUDINARY_API_KEY
""
For image uploads
CLOUDINARY_API_SECRET
""
For image uploads
IS_PROD
false
—
Frontend (.env.local)
Variable
Purpose
VITE_BASE_URL
Backend API base URL (e.g. http://localhost:5000)
Setup & Run
Backend
cd backend
npm install
npm run dev # starts on http://localhost:5000
Frontend
cd frontend
npm install
npm run dev # starts on http://localhost:5173
Other scripts
npm run build # production build
npm run type-check # TypeScript check (backend)
npm run lint # ESLint
npm run format # Prettier
About
A full-stack web app to help users prepare for technical interviews using AI-powered question generation, practice sessions, and user session management. This repository contains a TypeScript/Node backend and a React + Vite frontend.