Backend API for the Somethings mentor matching app.
npm install
npm run devThe server runs on http://localhost:3000
GET /- Basic statusGET /api/health- Health check
POST /api/login- Login with email/password{ "email": "alex@example.com", "password": "password123" }
GET /api/users/:id- Get user by ID
GET /api/mentors- List all mentorsGET /api/mentors/:id- Get mentor by ID (e.g.,mnt_001)
-
POST /api/match- Find best mentor match{ "userId": "usr_001" }OR
{ "traits": ["night_owl", "loves_music"], "preferences": ["anxiety", "relationships"] } -
GET /api/match?traits=night_owl,loves_music&preferences=anxiety- Query param version
| Password | |
|---|---|
| alex@example.com | password123 |
| jordan@example.com | jordan456 |
| taylor@example.com | taylor789 |
This codebase was written quickly and has issues. Your job is to:
- Identify and fix bugs - Some endpoints don't work correctly
- Add proper error handling - The API should handle edge cases gracefully
- Improve code quality - Make it more maintainable and type-safe
We're looking for your ability to navigate unfamiliar code, debug issues, and write clean solutions.
Good luck!