AI Career Path is a full-stack web app that helps users discover careers, take quizzes, generate personalized learning paths, and track progress across skills and roadmap tasks.
It is split into two apps:
- Frontend: React + Vite SPA
- Backend: Node.js + Express REST API
- Database: MongoDB via Mongoose
- Career browsing with detailed roadmaps, tools, companies, and resources
- Career-matching quiz that recommends a suitable path
- Personalized generated paths stored per authenticated user
- JWT-based authentication with login and registration
- Protected dashboard and generated-path detail pages
- Progress tracking with visual summaries and completion metrics
- Resource filtering by career, type, and difficulty
- Fallback-friendly UI so the app can still render useful content when API data is limited
- React 19
- React Router DOM
- Framer Motion
- React Icons
- React CountUp
- Vite
- Node.js
- Express
- Mongoose
- JWT authentication
- bcryptjs for password hashing
- CORS and dotenv
ai-career-path/
├─ backend/
│ ├─ middleware/
│ ├─ models/
│ ├─ routes/
│ ├─ seed/
│ ├─ services/
│ ├─ server.js
│ └─ package.json
├─ frontend/
│ ├─ src/
│ │ ├─ components/
│ │ ├─ context/
│ │ ├─ data/
│ │ ├─ pages/
│ │ ├─ services/
│ │ └─ utils/
│ └─ package.json
├─ AUTHENTICATION_AND_DASHBOARD_UPDATE.md
└─ PROJECT_ARCHITECTURE_AND_DESIGN.md
- Node.js and npm
- MongoDB connection string
cd backend
npm installCreate a .env file in backend/:
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/dbname
JWT_SECRET=replace_with_a_long_random_secret
PORT=5000Optional, only if you plan to wire in Gemini-backed generation later:
GOOGLE_GEMINI_API_KEY=your_api_key_hereStart the API:
npm startcd frontend
npm install
npm run devThe frontend expects the backend at http://localhost:5000/api by default. If you run the API elsewhere, update frontend/src/services/api.js.
npm start- starts the Express server
npm run dev- starts the Vite dev servernpm run build- builds the production bundlenpm run lint- runs ESLintnpm run preview- previews the production build locally
MONGODB_URI- MongoDB connection stringJWT_SECRET- secret used to sign access tokensPORT- server port, defaults to5000GOOGLE_GEMINI_API_KEY- optional, currently only needed if you extend the Gemini service path
GET /api/healthGET /api/careersGET /api/careers/:slugGET /api/resourcesGET /api/quizPOST /api/quiz/results
POST /api/auth/registerPOST /api/auth/loginGET /api/auth/me
These routes require a valid JWT in the Authorization: Bearer <token> header:
POST /api/paths/generateGET /api/paths/user/meGET /api/paths/:pathIdPUT /api/paths/:pathIdDELETE /api/paths/:pathId
/- Home/login- login and registration/careers- career catalog/careers/:slug- career detail page/careers/:slug/quiz- career-specific quiz/resources- learning resources/quiz- general career quiz/dashboard- protected progress dashboard/path/:pathId- protected generated-path detail page
- User creates an account or logs in from
/login. - The backend returns a JWT and user profile.
- The frontend stores the token in localStorage.
- Protected API requests attach the token automatically.
- Dashboard and generated-path pages are only available to authenticated users.
- Dashboard progress for career tracks is tracked on the frontend.
- Generated path progress is persisted on the backend per authenticated user.
- The app currently uses a deterministic/template-based path generation flow with seeded fallback data, so core functionality still works even when richer AI generation is unavailable.