Spaces:
Sleeping
Sleeping
|
Download backend/README.md from cuteepeiarchu/PathFinders: direct link, hf CLI and curl.
- Browser
- Download file 1.98 kB
-
https://huggingface.co/spaces/cuteepeiarchu/PathFinders/resolve/main/backend/README.md
- Command line
-
hf download hf://spaces/cuteepeiarchu/PathFinders/backend/README.md
-
curl -L -o README.md https://huggingface.co/spaces/cuteepeiarchu/PathFinders/resolve/main/backend/README.md
1.98 kB
PATHFINDERS Backend
This backend turns the current React-only prototype into a structured API for:
- authentication
- onboarding/profile storage
- personality quiz delivery and scoring
- AI counselling chat sessions
- recommendation generation
- roadmap retrieval
- dashboard aggregation
Stack
- Node.js
- Express
- TypeScript
- JWT auth
- In-memory repositories by default
The repository layer is intentionally isolated so you can swap it to MongoDB or Firestore later without changing the controllers or route contracts.
Run
- Install dependencies:
cd backend
npm install
If PowerShell blocks npm with an execution-policy error, use:
npm.cmd install
Copy
.env.exampleto.envand set at leastJWT_SECRET.Start the server:
npm run dev
If you are using PowerShell and hit the same issue, run:
npm.cmd run dev
The API will start on http://localhost:4000 by default.
Frontend Connection
Recommended frontend env:
VITE_API_BASE_URL=http://localhost:4000/api
Route Map
Auth
POST /api/auth/signupPOST /api/auth/loginGET /api/auth/me
Profile
GET /api/profile/mePUT /api/profile/me
Quiz
GET /api/quiz/questionsPOST /api/quiz/submitGET /api/quiz/result
Chat
POST /api/chat/sessionGET /api/chat/session/currentPOST /api/chat/session/current/messages
Recommendations
POST /api/recommendations/generateGET /api/recommendations/latest
Roadmaps
GET /api/roadmaps/:careerId
Dashboard
GET /api/dashboard/overview
Notes
- If
GEMINI_API_KEYis configured, the chat service attempts a GeminigenerateContentAPI call. - If no API key is present, the app falls back to a deterministic career counsellor response engine so development still works offline.
- The current frontend still uses localStorage. This backend now gives you a clean migration target.