Complete Routes Map
All routes are defined in /src/routes/ and prefixed with /api.
Authentication Routes
File: auth.routes.ts
| Method | Path | Controller | Auth | Description |
|---|---|---|---|---|
| POST | /auth/send-verification-code | AuthController.sendVerificationCode | None | Send SMS OTP |
| POST | /auth/verify-code | AuthController.verifyCode | None | Verify OTP code |
| POST | /auth/resend-code | AuthController.resendCode | None | Resend OTP |
| POST | /auth/register/user | AuthController.registerUser | None | Complete user registration |
| POST | /auth/register/employer | AuthController.registerEmployer | None | Complete employer registration |
| POST | /auth/login/user | AuthController.loginUser | None | User login |
| POST | /auth/login/employer | AuthController.loginEmployer | None | Employer login |
| POST | /auth/refresh | AuthController.refreshToken | None | Refresh JWT tokens |
| POST | /auth/logout | AuthController.logout | authMiddleware | Clear refresh token |
Job Routes
File: job.routes.ts
| Method | Path | Controller | Auth | Description |
|---|---|---|---|---|
| GET | /jobs/search | JobController.searchJobs | None | Full-text search |
| GET | /jobs | JobController.getJobs | None | List jobs (paginated) |
| GET | /jobs/:id | JobController.getJob | None | Get single job |
| POST | /jobs | JobController.createJob | employerAuth | Create job |
| PUT | /jobs/:id | JobController.updateJob | employerAuth | Update job |
| DELETE | /jobs/:id | JobController.deleteJob | employerAuth | Delete job |
User Routes
File: user.routes.ts
| Method | Path | Controller | Auth | Description |
|---|---|---|---|---|
| GET | /users/me | UserController.getCurrentUser | userAuth | Get current user |
| PUT | /users/me | UserController.updateCurrentUser | userAuth | Update profile |
| POST | /users/swipe | UserController.addSwipeHistory | userAuth | Record swipe |
| POST | /users/save/:jobId | UserController.saveJob | userAuth | Save job |
| DELETE | /users/save/:jobId | UserController.unsaveJob | userAuth | Unsave job |
| GET | /users/saved | UserController.getSavedJobs | userAuth | Get saved jobs |
| GET | /users/profile-completeness | UserController.getProfileCompleteness | userAuth | Check completion |
| POST | /users/education | UserController.addEducation | userAuth | Add education |
| PUT | /users/education/:id | UserController.updateEducation | userAuth | Update education |
| DELETE | /users/education/:id | UserController.deleteEducation | userAuth | Delete education |
| POST | /users/experience | UserController.addExperience | userAuth | Add experience |
| PUT | /users/experience/:id | UserController.updateExperience | userAuth | Update experience |
| DELETE | /users/experience/:id | UserController.deleteExperience | userAuth | Delete experience |
Application Routes
File: application.routes.ts
| Method | Path | Controller | Auth | Description |
|---|---|---|---|---|
| POST | /applications | ApplicationController.createApplication | userAuth | Submit application |
| GET | /applications/user | ApplicationController.getUserApplications | userAuth | My applications |
| GET | /applications/employer | ApplicationController.getEmployerApplications | employerAuth | Received apps |
| GET | /applications/:id | ApplicationController.getApplication | authMiddleware | Get application |
| PATCH | /applications/:id/status | ApplicationController.updateApplicationStatus | employerAuth | Update status |
| DELETE | /applications/:id | ApplicationController.deleteApplication | userAuth | Withdraw |
Employer Routes
File: employer.routes.ts
| Method | Path | Controller | Auth | Description |
|---|---|---|---|---|
| GET | /employers/me | EmployerController.getCurrentEmployer | employerAuth | Get current employer |
| PUT | /employers/me | EmployerController.updateCurrentEmployer | employerAuth | Update profile |
| GET | /employers/:id | EmployerController.getEmployer | None | Get employer (public) |
| GET | /employers/:id/jobs | EmployerController.getEmployerJobs | None | Employer's jobs |
Services Routes (Informal Workers)
File: services.routes.ts
| Method | Path | Controller | Auth | Description |
|---|---|---|---|---|
| POST | /services/worker | ServicesController.createWorkerProfile | userAuth | Create worker profile |
| GET | /services/worker/me | ServicesController.getMyWorkerProfile | userAuth | Get my profile |
| PUT | /services/worker/me | ServicesController.updateWorkerProfile | userAuth | Update profile |
| PATCH | /services/worker/availability | ServicesController.toggleAvailability | userAuth | Toggle availability |
| GET | /services/workers/nearby | ServicesController.getNearbyWorkers | optionalAuth | GPS search |
| GET | /services/workers/feed | ServicesController.getWorkerFeed | optionalAuth | TikTok feed |
| POST | /services/workers/:id/swipe | ServicesController.swipeWorker | userAuth | Swipe on worker |
| GET | /services/workers/:id/likes | ServicesController.getWorkerLikes | userAuth | Who liked me |
| GET | /services/categories | ServicesController.getCategories | None | List categories |
| POST | /services/categories | ServicesController.createCategory | authMiddleware | Create category |
| GET | /services/workers/search | ServicesController.searchWorkers | optionalAuth | Search workers |
Bookings Routes
File: bookings.routes.ts
| Method | Path | Controller | Auth | Description |
|---|---|---|---|---|
| POST | /bookings/requests | BookingsController.createRequest | userAuth | Post request |
| GET | /bookings/requests/mine | BookingsController.getMyRequests | userAuth | My requests |
| GET | /bookings/requests/nearby | BookingsController.getNearbyRequests | userAuth | Nearby requests |
| GET | /bookings/requests/:id | BookingsController.getRequest | authMiddleware | Get request |
| PATCH | /bookings/requests/:id/status | BookingsController.updateRequestStatus | userAuth | Update status |
| POST | /bookings/requests/:id/swipe | BookingsController.swipeRequest | userAuth | Worker swipes |
| POST | /bookings/quotes | BookingsController.createQuote | userAuth | Submit quote |
| GET | /bookings/requests/:id/quotes | BookingsController.getQuotes | authMiddleware | Get quotes |
| POST | /bookings/quotes/:id/accept | BookingsController.acceptQuote | userAuth | Accept quote |
| POST | /bookings/quotes/:id/reject | BookingsController.rejectQuote | userAuth | Reject quote |
| POST | /bookings | BookingsController.createBooking | userAuth | Direct booking |
| GET | /bookings/client | BookingsController.getClientBookings | userAuth | My bookings |
| GET | /bookings/worker | BookingsController.getWorkerBookings | userAuth | Worker's bookings |
| GET | /bookings/:id | BookingsController.getBooking | authMiddleware | Get booking |
| PATCH | /bookings/:id/status | BookingsController.updateBookingStatus | authMiddleware | Update status |
Messages Routes
File: messages.routes.ts
| Method | Path | Controller | Auth | Description |
|---|---|---|---|---|
| GET | /messages/conversations | MessagesController.getConversations | authMiddleware | List conversations |
| GET | /messages/conversations/:id | MessagesController.getConversation | authMiddleware | Get conversation |
| GET | /messages/conversations/:id/messages | MessagesController.getMessages | authMiddleware | Get messages |
| POST | /messages/conversations/:id/messages | MessagesController.sendMessage | authMiddleware | Send message |
| POST | /messages/conversations/:id/read | MessagesController.markAsRead | authMiddleware | Mark read |
| DELETE | /messages/:messageId | MessagesController.deleteMessage | authMiddleware | Delete message |
| POST | /messages/conversations/:id/typing | MessagesController.updateTypingStatus | authMiddleware | Typing status |
| GET | /messages/conversations/:id/typing | MessagesController.getTypingUsers | authMiddleware | Get typing |
| POST | /messages/conversations/:id/pin | MessagesController.togglePin | authMiddleware | Toggle pin |
| POST | /messages/conversations/:id/mute | MessagesController.toggleMute | authMiddleware | Toggle mute |
| POST | /messages/conversations/:id/archive | MessagesController.archiveConversation | authMiddleware | Archive |
| POST | /messages/conversations/:id/unarchive | MessagesController.unarchiveConversation | authMiddleware | Unarchive |
| GET | /messages/unread-count | MessagesController.getUnreadCount | authMiddleware | Unread count |
Credits Routes
File: credits.routes.ts
| Method | Path | Controller | Auth | Description |
|---|---|---|---|---|
| GET | /credits/balance | CreditsController.getBalance | userAuth | Get balance |
| GET | /credits/transactions | CreditsController.getTransactions | userAuth | Transaction history |
| GET | /credits/packages | CreditsController.getPackages | None | Available packages |
| GET | /credits/currencies | CreditsController.getCurrencies | None | Supported currencies |
| GET | /credits/payment-methods | CreditsController.getPaymentMethods | None | Payment options |
| POST | /credits/payment-request | CreditsController.createPaymentRequest | userAuth | Request to buy |
| POST | /credits/payment-request/:id/reference | CreditsController.submitPaymentReference | userAuth | Submit ref |
| GET | /credits/payment-requests | CreditsController.getPaymentRequests | userAuth | My requests |
| POST | /credits/cashout | CreditsController.createCashoutRequest | userAuth | Request cashout |
| GET | /credits/cashout-requests | CreditsController.getCashoutRequests | userAuth | My cashouts |
Billing Routes (Stripe)
File: billing.routes.ts
| Method | Path | Controller | Auth | Description |
|---|---|---|---|---|
| GET | /billing/plans | BillingController.getPlans | None | Get plans |
| POST | /billing/checkout | BillingController.createCheckout | authMiddleware | Create checkout |
| POST | /billing/webhook | BillingController.handleWebhook | None | Stripe webhook |
| GET | /billing/mode | BillingController.getMode | None | Get mode |
Interview Routes
File: interview.routes.ts
| Method | Path | Controller | Auth | Description |
|---|---|---|---|---|
| POST | /interviews/create | InterviewController.createSession | employerAuth | Create session |
| GET | /interviews/status/:applicationId | InterviewController.getStatus | authMiddleware | Get status |
| GET | /interviews/pending | InterviewController.getPendingInterviews | userAuth | Pending interviews |
| GET | /interviews/all | InterviewController.getAllInterviews | userAuth | All interviews |
| GET | /interviews/session/:applicationId | InterviewController.getSessionForUser | userAuth | Get session URL |
| PATCH | /interviews/privacy | InterviewController.updatePrivacy | userAuth | Toggle privacy |
| POST | /interviews/webhook/completed | InterviewController.handleWebhook | None | Okia webhook |
Experience Routes
File: experience.routes.ts
| Method | Path | Controller | Auth | Description |
|---|---|---|---|---|
| GET | /experience/tracks | ExperienceController.getTracks | None | List tracks |
| GET | /experience/tracks/:slug | ExperienceController.getTrack | None | Get track |
| POST | /experience/tracks/:id/enroll | ExperienceController.enrollInTrack | userAuth | Enroll |
| GET | /experience/enrollments | ExperienceController.getEnrollments | userAuth | My enrollments |
| GET | /experience/tasks/:id | ExperienceController.getTask | userAuth | Get task |
| POST | /experience/tasks/:id/submit | ExperienceController.submitTask | userAuth | Submit answer |
| GET | /experience/progress | ExperienceController.getProgress | userAuth | My progress |
| GET | /experience/certificates | ExperienceController.getCertificates | userAuth | My certificates |
| GET | /experience/verify/:code | ExperienceController.verifyCertificate | None | Verify cert |
| GET | /experience/leaderboard | ExperienceController.getLeaderboard | None | Top users |
CV Routes
File: cv.routes.ts
| Method | Path | Controller | Auth | Description |
|---|---|---|---|---|
| GET | /cv | CVController.getMyCVs | userAuth | List my CVs |
| GET | /cv/:id | CVController.getCV | userAuth | Get CV |
| POST | /cv | CVController.createCV | userAuth | Create CV |
| PUT | /cv/:id | CVController.updateCV | userAuth | Update CV |
| DELETE | /cv/:id | CVController.deleteCV | userAuth | Delete CV |
| PATCH | /cv/:id/default | CVController.setDefault | userAuth | Set as default |
Health & Utility
| Method | Path | Description |
|---|---|---|
| GET | /health | Health check |
| GET | / | API info |