The frontend logic is currently decoupled using TanStack Query, which points to a mocked mock-db service layer. To fully integrate the frontend with the live database, the following endpoints must be implemented.
π’ Completed & Working
POST /api/v1/signup β Returns auth_token HttpOnly cookie.
POST /api/v1/signin β Returns auth_token HttpOnly cookie & validates emails.
POST /api/v1/forgot-password β Calls Auth0 to issue a reset link.
GET /api/v1/me β Fetches current verified profile.
GET /api/v1/majors β Lists all available majors.
GET /api/v1/courses β Lists courses (supports search and UUID filters).
POST /api/v1/requests β Submits a file upload request.
π΄ Missing Endpoints (To Be Built)
1. Catalog Service (catalogService.ts)
The Courses library hierarchy depends on these specific dropdown lookups.
2. File Delivery & Material Browsing (fileService.ts)
3. File Requests & Admin Moderation (requestService.ts)
While basic request submission and approval exist in main.py, the frontend dashboard requires comprehensive list endpoints.
4. Reputation & Gamification (reputationService.ts)
5. AI Assistant (assistantService.ts)
6. Admin Audit Log (auditService.ts)
Notes for Backend Developer: All these frontend services are currently mapped to a mocked in-memory database using local timeouts. Their parameters and expected return contracts are strictly typed inside the frontend repository under src/types/domain.ts. As soon as the endpoints are stood up, the frontend can be wired up by simply pointing the Axios wrappers inside src/services/* to the live urls.
The frontend logic is currently decoupled using TanStack Query, which points to a mocked
mock-dbservice layer. To fully integrate the frontend with the live database, the following endpoints must be implemented.π’ Completed & Working
POST /api/v1/signupβ Returnsauth_tokenHttpOnly cookie.POST /api/v1/signinβ Returnsauth_tokenHttpOnly cookie & validates emails.POST /api/v1/forgot-passwordβ Calls Auth0 to issue a reset link.GET /api/v1/meβ Fetches current verified profile.GET /api/v1/majorsβ Lists all available majors.GET /api/v1/coursesβ Lists courses (supports search and UUID filters).POST /api/v1/requestsβ Submits a file upload request.π΄ Missing Endpoints (To Be Built)
1. Catalog Service (
catalogService.ts)The Courses library hierarchy depends on these specific dropdown lookups.
GET /api/v1/yearsβ Return all available academic years. (Or determine if years should just be statically resolved from courses).GET /api/v1/semestersβ Return all available semesters. (Or statically resolve from courses).GET /api/v1/courses/:idβ Return details for a single specific course.GET /api/v1/lecturers?courseId=...β Return a distinct list of lecturers who have taught the specified course.2. File Delivery & Material Browsing (
fileService.ts)GET /api/v1/files?courseId=...&type=...&lecturerId=...β Search and list allAPPROVEDmaterial files for a given course. Supports pagination and searching.GET /api/v1/files/:idβ Returns single file metadata (and optionally the pre-signed GCS download URL).GET /api/v1/contributors/top?limit=5β Calculate and return the users with the highest sum of points acrosspoints_transactionsfor the leaderboard.GET /api/v1/me/recent-filesβ Fetch the user's recently viewed/opened files history, sorted byviewed_at.POST /api/v1/me/recent-files/:fileIdβ Mark a specific file ID as recently viewed (using an upsert).DELETE /api/v1/me/recent-filesβ Clear the user's recent files history.3. File Requests & Admin Moderation (
requestService.ts)While basic request submission and approval exist in
main.py, the frontend dashboard requires comprehensive list endpoints.GET /api/v1/me/file-requestsβ List all requests submitted by the current authenticated user.DELETE /api/v1/me/file-requests/:requestIdβ Allow a user to withdraw/cancel their ownPENDINGrequest.GET /api/v1/admin/file-requestsβ Return all requests (for Admin dashboard). Must filter by status (PENDING,APPROVED, etc).POST /api/v1/admin/file-requests/bulk-approveβ Accept an array of UUIDs to approve them all at once.POST /api/v1/admin/file-requests/bulk-rejectβ Accept an array of UUIDs (and rejection reason) to reject them all at once.GET /api/v1/admin/file-requests/statsβ Return aggregate counts for the dashboard (total pending, approved today, rejected today, etc).4. Reputation & Gamification (
reputationService.ts)GET /api/v1/me/reputationβ Calculate and return the user's total points and badge tier (e.g., Gold > 1000, Silver > 500), alongside their last ~20 point transactions.5. AI Assistant (
assistantService.ts)POST /api/v1/assistant/chatβ RAG endpoint to send messages to the AI about a specific file.GET /api/v1/me/notes?fileId=...β Retrieve a user's private text notes associated with a document.POST /api/v1/me/notesβ Save/Update a user's private text notes for a document.6. Admin Audit Log (
auditService.ts)GET /api/v1/admin/audit-logsβ Returns an action history trail (e.g., "Admin X approved File Y") sorted by timestamp descending, with pagination.Notes for Backend Developer: All these frontend services are currently mapped to a mocked in-memory database using local timeouts. Their parameters and expected return contracts are strictly typed inside the frontend repository under
src/types/domain.ts. As soon as the endpoints are stood up, the frontend can be wired up by simply pointing the Axios wrappers insidesrc/services/*to the live urls.