tahamajs/IE / Projects /docs /APIEndpoint.md
tahamajs's picture
|
download
raw
17.8 kB

Legend
✅ = endpoint exists in backend (controllers or dynamic routes)
⚠️ = exists but path differs or only partial implementation
❌ = completely missing


🔍 1. Authentication & User Management

Method Endpoint Frontend Usage Status Notes
POST /api/login useAuth ✅ AuthRoutes
POST /api/login/2fa useAuth (2FA step) ✅ AuthRoutes
POST /api/logout useAuth ✅ AuthRoutes
POST /api/register useRegister ✅ AuthRoutes
POST /api/token/refresh useAuth (token refresh) ✅ AuthRoutes
GET /api/users/me useAuth, useDashboard, useProfile ✅ UserRoutes
PUT /api/users/me useProfile, useSecuritySettings ✅ UserRoutes
PUT /api/users/me/email useProfile ✅ UserRoutes
PUT /api/users/me/password useSecuritySettings ✅ UserRoutes
DELETE /api/users/me useProfile (deactivate) ✅ UserRoutes
POST /api/users/me/avatar useProfile, useDashboard ✅ UserRoutes
GET /api/users/{username} usePublicProfile, useProfile ✅ UserRoutes
GET /api/search/users useSearchUsers, useContacts ✅ UserRoutes
GET /api/users/me/security-question useSecuritySettings ✅ UserRoutes
PUT /api/users/me/security-question useSecuritySettings ✅ UserRoutes
GET /api/users/me/2fa/status useSecuritySettings ✅ UserRoutes
POST /api/users/me/2fa/enable useSecuritySettings ✅ AuthRoutes
POST /api/users/me/2fa/verify useSecuritySettings ✅ AuthRoutes
POST /api/users/me/2fa/disable useSecuritySettings ✅ AuthRoutes
GET /api/users/me/2fa/backup-codes useSecuritySettings ✅ AuthRoutes
POST /api/users/me/2fa/backup-codes/regenerate useSecuritySettings ✅ AuthRoutes
POST /api/forgot-password usePasswordReset ✅ AuthRoutes
POST /api/reset-password usePasswordReset ✅ AuthRoutes

All user/auth endpoints present. ✅


🔍 2. Follow System

Method Endpoint Frontend Usage Status
POST /api/users/{username}/follow useFollow, useArticle ✅
DELETE /api/users/{username}/follow useFollow ✅
GET /api/users/{username}/followers usePublicProfile ✅
GET /api/users/{username}/following usePublicProfile, useArticle ✅
GET /api/users/me/contacts useContacts ✅

All follow endpoints present. ✅


🔍 3. Articles

Method Endpoint Frontend Usage Status
GET /api/articles useArticles, ArticlesPage ✅
GET /api/articles/{id} useArticle ✅
POST /api/articles useCreateArticle ✅
PUT /api/articles/{id} useArticle, useCreateArticle ✅
DELETE /api/articles/{id} useArticle, useDashboard ✅
GET /api/articles/search useSearch, ArticlesPage ✅
GET /api/users/me/articles useDashboard ✅
POST /api/articles/{id}/like useArticle ✅
GET /api/articles/{id}/like useArticle ✅
GET /api/articles/{id}/comments useArticle ✅
POST /api/articles/{id}/comments useArticle ✅
DELETE /api/comments/{commentId} useArticle ✅
GET /api/articles/{id}/citation useArticle ✅
GET /api/users/me/analytics useDashboard, useAnalytics ✅
POST /api/articles/{id}/publish useCreateArticle ✅
GET /api/articles/trending useRecommendations ✅
GET /api/articles/featured useRecommendations ✅
GET /api/articles/{id}/graph-recommendations useRecommendations (graph) ✅
POST /api/articles/{id}/view useArticle (view count) ✅
GET /api/articles/{id}/analytics usePaperAnalytics ✅
GET /api/users/me/liked-articles LikedArticlesPage ❌ Missing (backend has /users/{username}/liked-articles only)

Missing: GET /api/users/me/liked-articles – frontend uses this (see LikedArticlesPage). Backend has only public version for a given username. Add an alias to the same logic.


🔍 4. Messaging (Private & Group)

Method Endpoint Frontend Usage Status Notes
GET /api/conversations useMessaging ✅
DELETE /api/conversations/{username} useMessaging ✅
GET /api/conversations/{username}/messages useMessaging ✅
POST /api/conversations/{username}/messages useMessaging ✅
PUT /api/conversations/{username}/messages/{messageId} useMessaging ✅
DELETE /api/conversations/{username}/messages/{messageId} useMessaging ✅
POST /api/conversations/{username}/messages/{messageId}/reactions useMessaging ✅
POST /api/conversations/{username}/typing useMessaging ✅
GET /api/conversations/{username}/typing useMessaging ✅
POST /api/conversations/{username}/read useMessaging ✅
GET /api/conversations/{username}/read-status useMessaging ✅
GET /api/conversations/{username}/last-read useMessaging ❌ Missing – backend has /read-status but frontend calls /last-read separately. Add alias.
POST /api/conversations/{username}/archive useMessaging ✅
DELETE /api/conversations/{username}/archive useMessaging ✅
GET /api/users/me/archived-conversations useMessaging ✅
GET /api/messages/{messageId}/edits useEditHistory ✅
GET /api/messages/{messageId}/thread useMessaging (threads) ✅
POST /api/messages/{messageId}/reply useMessaging ✅
POST /api/messages/{messageId}/forward useMessaging ✅
POST /api/groups/messages/{messageId}/forward-to-group useMessaging ✅
POST /api/conversations/{username}/schedule useMessaging ✅
POST /api/conversations/{username}/ephemeral useMessaging ✅
GET /api/messages/scheduled useMessaging ✅
DELETE /api/messages/scheduled/{messageId} useMessaging ✅
POST /api/media/upload ChatArea ✅
GET /api/media/{mediaId} ChatArea ✅
DELETE /api/media/{mediaId} useMessaging ✅

Groups:

Method Endpoint Frontend Usage Status
GET /api/groups useMessaging ✅
POST /api/groups useMessaging ✅
GET /api/groups/{groupId} useMessaging ✅
PUT /api/groups/{groupId} useMessaging ✅
DELETE /api/groups/{groupId} useMessaging ✅
GET /api/groups/{groupId}/members useMessaging ✅
POST /api/groups/{groupId}/members useMessaging ✅
DELETE /api/groups/{groupId}/members/{memberId} useMessaging ✅
POST /api/groups/{groupId}/admins/{memberId} useMessaging ✅
POST /api/groups/{groupId}/members/{memberId}/demote useMessaging ✅
POST /api/groups/{groupId}/leave useMessaging ✅
POST /api/groups/{groupId}/invite useMessaging ✅
GET /api/join/{token} useMessaging ✅
GET /api/groups/{groupId}/messages useMessaging ✅
POST /api/groups/{groupId}/messages useMessaging ✅
PUT /api/groups/{groupId}/messages/{messageId} useMessaging ✅
DELETE /api/groups/{groupId}/messages/{messageId} useMessaging ✅
GET /api/groups/{groupId}/messages/since useMessaging ✅
POST /api/groups/{groupId}/read useMessaging ✅
GET /api/groups/{groupId}/read-status useMessaging ✅
POST /api/groups/{groupId}/mute useMessaging ✅
DELETE /api/groups/{groupId}/mute useMessaging ✅
GET /api/groups/{groupId}/pins useMessaging (pinned list) ✅ (backend uses /pins)
GET /api/groups/{groupId}/pinned useMessaging (frontend uses /pinned) ❌ Missing – add alias to /pins.
POST /api/groups/{groupId}/pin/{messageId} useMessaging ✅
DELETE /api/groups/{groupId}/pin/{messageId} useMessaging ✅
POST /api/groups/{groupId}/transfer/{newOwnerId} useMessaging ✅
GET /api/groups/{groupId}/meta useMessaging ✅

Secret Chats (E2EE):

Method Endpoint Frontend Usage Status
POST /api/secret/prekeys useSecretChat ✅
GET /api/secret/prekeys/{username} useSecretChat ✅
POST /api/secret/prekeys/refresh useSecretChat ✅
POST /api/conversations/{username}/start-secret useSecretChat ✅
POST /api/conversations/{username}/accept-secret useSecretChat (maybe not) ✅ (in SecretConversationRoutes)
GET /api/conversations/{username}/keys useSecretChat ❌ Missing – needed to fetch peer’s public keys.
POST /api/secret/send useSecretChat ✅
GET /api/secret/messages/{conversationKey} useSecretChat ✅
POST /api/secret/ratchet useSecretChat ✅

🔍 5. Notifications

Method Endpoint Frontend Usage Status
GET /api/notifications useDashboard, useNotifications ✅
GET /api/notifications/unread-count useNotifications ✅
POST /api/notifications/{id}/read useDashboard ✅
POST /api/notifications/read-all useNotifications ✅
POST /api/notifications/read-multiple useNotifications ✅
DELETE /api/notifications/{id} useNotifications ✅
DELETE /api/notifications useNotifications ✅

All present. ✅


🔍 6. Recommendations & Discovery

Method Endpoint Frontend Usage Status Notes
GET /api/recommendations/feed useRecommendations, useRecommendationFeed ✅
GET /api/recommendations/trending useRecommendations ✅
GET /api/recommendations/users useRecommendations ✅
GET /api/discovery/digest useRecommendationFeed ❌ Missing (only POST exists)
POST /api/discovery/digest useRecommendationFeed ✅
GET /api/discovery/recommendations useRecommendationFeed ❌ Missing – frontend calls this; use /recommendations/feed instead.

Missing: GET /api/discovery/digest and GET /api/discovery/recommendations.


🔍 7. RAG Assistant (Research Assistant)

Method Endpoint Frontend Usage Status
POST /api/ai/rag-chat useRagSystem ✅
POST /api/ai/chat useRagSystem ✅
POST /api/ai/command-palette/predict usePredictiveActions ✅
GET /api/documents/rag-list useRagSystem ✅
DELETE /api/documents/{docId}/rag-delete useRagSystem ✅
POST /api/documents/{docId}/rag-index useRagSystem ✅
GET /api/documents/{docId}/rag-status useRagSystem ✅
GET /api/ai/conversation useRagSystem ✅
DELETE /api/ai/conversation useRagSystem ✅

All present. ✅


🔍 8. Lab Inventory

All endpoints under /api/inventory/ (chemicals, alerts, scan, compatibility, stats) are fully present in LabInventoryRoutes. ✅


🔍 9. Peer Review

All endpoints under /api/peer-review/ and /api/admin/peer-review/ are present. ✅


🔍 10. Gap Analysis

All endpoints under /api/gap-analysis/ are present. ✅


🔍 11. Projects & Tasks

All endpoints under /api/projects/ (CRUD, members, tasks, outputs) are present. ✅


🔍 12. Data Hub (Research Objects, Protocols, Preregistrations)

All endpoints under /api/repository/, /api/protocols/, /api/preregistrations/ are present in DataHubRoutes. ✅


🔍 13. Events

All endpoints under /api/events/ are present in EventRoutes. ✅


🔍 14. Workspace (SmartGlass)

All endpoints under /api/workspace/ are present in WorkspaceRoutes. ✅

Missing alias: GET /api/groups/{groupId}/pinned (frontend uses /pinned, backend has /pins). Not critical but add for consistency.


🔍 15. Voice Settings

All endpoints under /api/users/me/voice-settings, /api/voice/ are present. ✅


🔍 16. Admin

All admin endpoints (/api/admin/*) are present (stats, users, articles, activity, search, rag, etc.). ✅


🔍 17. Collections (Paper Collections) – COMPLETELY MISSING

The frontend usePaperCollections calls:

Method Endpoint Status
GET /api/collections ❌
POST /api/collections ❌
DELETE /api/collections/{id} ❌
POST /api/collections/{id}/papers ❌
DELETE /api/collections/{id}/papers/{paperId} ❌

No backend implementation. You need to add these.


🔍 18. References / Bibliography Manager – MISSING

useReferenceManager calls:

Method Endpoint Status
GET /api/documents/{docId}/references ❌
POST /api/documents/{docId}/references ❌
PUT /api/documents/{docId}/references/{refId} ❌
DELETE /api/documents/{docId}/references/{refId} ❌
POST /api/references/connect-zotero ❌
POST /api/references/connect-mendeley ❌

No backend implementation. Add these.


🔍 19. Preprint Submission – MISSING

Method Endpoint Status
POST /api/preprints/screen ❌
POST /api/preprints/submit ❌

No backend implementation.


🔍 20. Provenance / Trust – MISSING

Method Endpoint Status
GET /api/provenance/{entityType}/{entityId} ❌
POST /api/provenance/{entityType}/{entityId}/verify ❌

No backend implementation.


🔍 21. Unified Inbox – MISSING

Method Endpoint Status
GET /api/unified-inbox ❌

Frontend uses useUnifiedInbox to fetch aggregated messages. Not present.


🔍 22. Recent Items (Command Palette) – MISSING

Method Endpoint Status
GET /api/recent-items ❌

App.tsx fetches recent papers and contacts. Add this endpoint.


🔍 23. Export (Documents / Articles) – MISSING

Method Endpoint Status
POST /api/ai/export ❌
POST /api/documents/{docId}/export ❌

useSubmissionExport and useCollaborativeEditor call these to export PDF, DOCX, LaTeX, etc. Not present.


🔍 24. Miscellaneous – MISSING / PARTIAL

  • GET /api/health – ✅ present.
  • GET /api/me – ✅ present.
  • GET /api/popular-tags – ✅ present (in AnalyticsRoutes).
  • GET /api/trending – ✅ present.
  • POST /api/callback (inline keyboard) – ✅ present in MessagingRoutes.

📋 Final Missing Endpoints Summary

# Endpoint Frontend Feature Urgency
1 GET /api/recent-items Command palette High
2 GET /api/unified-inbox Unified Inbox High
3 POST /api/preprints/screen Preprint screening Medium
4 POST /api/preprints/submit Preprint submission Medium
5 GET /api/discovery/digest Discovery digest preference Low
6 GET /api/discovery/recommendations Discovery feed Low (can alias to /recommendations/feed)
7-11 All /api/collections/* Paper collections High
12-17 All /api/documents/{docId}/references/* & /api/references/* Reference manager High
18 POST /api/ai/export Document export High
19 POST /api/documents/{docId}/export Export (alternative) High
20-21 /api/provenance/* Trust / provenance Low
22 GET /api/users/me/liked-articles User liked articles Medium (can be aliased)
23 GET /api/conversations/{username}/last-read Messaging Low (use /read-status)
24 GET /api/conversations/{username}/keys Secret chat High
25 GET /api/groups/{groupId}/pinned Group pinned messages Low (alias for /pins)

Total missing endpoints: 25 distinct URLs (some are groups).


✅ Recommended Next Steps

  1. Implement the “high” urgency endpoints first:

    • GET /api/recent-items
    • GET /api/unified-inbox
    • Collections CRUD
    • Reference manager endpoints
    • Export endpoints
    • Secret chat key retrieval
  2. For low urgency, add simple aliases or use existing endpoints:

    • /groups/{groupId}/pinned → forward to /groups/{groupId}/pins
    • /conversations/{username}/last-read → forward to /read-status and extract the field
  3. For missing discovery endpoints, you can either implement them or modify the frontend to use existing /recommendations/feed and /recommendations/trending.

Xet Storage Details

Size:
17.8 kB
·
Xet hash:
ad88b78e70cc24a9ff1841f914daa72ce732f7b5c5022004e6b58ff614668952

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.