Based on a thorough review of all frontend React code (hooks, pages, components) and the backend Java repositories and route files you provided, the following backend components are missing or incomplete. The repositories you have are excellent low‑level data access, but the service layer that orchestrates them and the route handlers that implement the actual endpoints are largely absent.
Below is the complete list of what you still need to implement to have a fully functioning backend.
1. Missing Service Classes
These services contain business logic, call repositories, and are injected into route handlers. Your route files (e.g., ArticleRoutes, AuthRoutes, MessagingRoutes) reference them – they are not implemented yet.
| Service | Purpose | Used By |
|---|---|---|
ArticleService |
CRUD, search, tags, likes, comments, analytics, graph recommendations | ArticleRoutes, AdminRoutes |
UserService |
User profiles, follow/unfollow, bookmarks, security (2FA, password reset), activity | UserRoutes, AuthRoutes |
MessageService |
Private messages, conversations, read status, threading, ephemeral, scheduled | MessagingRoutes |
GroupService |
Group chat, members, admins, pins, mute, messages, polls | MessagingRoutes |
NotificationService |
Create, list, mark read, delete notifications (also SSE broadcasting) | NotificationRoutes |
AnalyticsService |
User and article analytics (views over time, top articles, platform stats) | AnalyticsRoutes |
GapAnalysisService |
Graph nodes/edges CRUD, AI‑powered gap detection | GapAnalysisRoutes |
GrantService |
Grant deadlines, user grants, AI draft generation | GrantRoutes |
ProjectService |
Projects, members, tasks (Kanban), outputs | ProjectRoutes |
DataHubService |
Research objects, protocols, preregistrations (CRUD, fork, submit) | DataHubRoutes |
PollService |
Polls/quizzes, voting, results, templates, analytics | PollRoutes |
EventService |
Events (create, RSVP, reminders, iCal export, recurring) | EventRoutes |
LabInventoryService |
Chemicals, locations, alerts, compatibility, statistics | LabInventoryRoutes |
PeerReviewService |
Submissions, reviews, reviewer credentials, assignment | PeerReviewRoutes |
WorkspaceService |
SmartGlass panels, presets, sharing, backup, import/export | WorkspaceRoutes |
VoiceSettingsService |
Voice settings (profiles, language overrides, wake words) | VoiceSettingsRoutes |
RagService |
RAG chat, document indexing, AI predictions, conversation history | RagRoutes |
PasswordResetService |
Security question retrieval and password reset | PasswordResetRoutes |
TwoFactorService |
TOTP secret generation, QR code, verification, backup codes | AuthRoutes |
SearchService |
Advanced message search (full‑text) | MessagingRoutes |
MediaService |
Upload, retrieve, delete media attachments | MessagingRoutes |
RateLimitService |
Token‑bucket rate limiting (already has TokenBucket class but no service) |
MessagingRoutes, AuthRoutes |
ContentModeration |
Censor profanity, detect offensive language | MessagingRoutes |
CitationGraphService |
Build citation graph, provide co‑citation and PageRank recommendations | ArticleRoutes |
GNNRecommendationService |
Graph Neural Network based recommendations (personalised feed) | GNNRecommendationRoutes |
RecommendationService |
Traditional collaborative filtering / content‑based feed | RecommendationRoutes |
SseManager |
Server‑Sent Events manager for real‑time notifications | SseRoutes, NotificationService |
Note: You have many repositories (
ArticleRepository,UserRepository, etc.). The services above would use them.
2. Missing Route Handlers (Endpoints)
Even though you have many route files (e.g., ArticleRoutes, AuthRoutes), the following endpoints are not yet implemented (from our earlier frontend API audit):
| Endpoint | Frontend Feature | Required Service |
|---|---|---|
GET /api/recent-items |
Command palette | UserService (or a dedicated RecentItemService) |
GET /api/unified-inbox |
Unified inbox | UnifiedInboxService (aggregate messages from multiple sources) |
GET /api/discovery/digest |
Discovery digest preference | NotificationService (or UserService) |
GET /api/discovery/recommendations |
Discovery feed (alias) | RecommendationService (can redirect to /recommendations/feed) |
GET /api/users/me/liked-articles |
Liked articles page | ArticleService |
GET /api/conversations/{username}/last-read |
Messaging last read ID | MessageService (alias to /read-status) |
GET /api/conversations/{username}/keys |
Secret chat key exchange | EncryptionKeyRepository (already has repo, but no endpoint) |
GET /api/groups/{groupId}/pinned |
Group pinned messages (alias) | GroupService (currently /pins exists) |
| Collections (all endpoints) | Paper collections | CollectionService + new CollectionRepository (not provided) |
| Reference Manager (all endpoints) | Citations, DOI/BibTeX import | ReferenceService + new ReferenceRepository |
| Preprint (all endpoints) | Preprint screening & submission | PreprintService + PreprintRepository |
| Provenance (all endpoints) | Trust / audit log | ProvenanceService + ProvenanceEventRepository |
Export (POST /ai/export, POST /documents/{docId}/export) |
Document export (PDF, DOCX, LaTeX) | ExportService (calls external converters) |
Additionally, the following complete route groups are completely missing (no route files found):
- Paper collections – CRUD for collections and papers inside them.
- Reference manager – endpoints for
/api/documents/{docId}/referencesand/api/references/connect-*. - Preprint submission –
/api/preprints/screenand/api/preprints/submit. - Provenance –
/api/provenance/{entityType}/{entityId}and/verify.
3. Missing Model Classes (Already provided in previous answer)
You already received the missing model classes for:
- Paper collections (
PaperCollection,CollectionPaper) - Reference manager (
ManagedReference,ReferenceGroup) - Preprint (
Preprint,ScreeningResult) - Provenance (
ProvenanceEvent) - Unified inbox (
UnifiedMessage,BroadcastChannel,BroadcastPost,PaperQuestion,PaperAnswer) - Recent items (
RecentItem) - Workspace (
WorkspacePanel,WorkspacePreset) - Pre‑key encryption (
PreKey,SignedPreKey) - Notification settings (
NotificationSettings) - Export options (
ExportOptions)
If you haven't created them yet, you must add those .java files.
4. Missing Utility / Helper Classes
| Class | Purpose | Where Used |
|---|---|---|
JsonUtils |
JSON serialisation (you have it in util package?) |
Every route handler |
TokenUtil |
Extract JWT from Authorization header |
AuthUtils |
SessionManager |
Manage user sessions, tokens, CSRF | AuthUtils, AuthRoutes |
WebSocketManager |
Push real‑time events to connected clients | MessagingRoutes, NotificationService |
RateLimitService (wrapper for TokenBucket) |
Apply rate limits per IP/user | MessagingRoutes |
ContentModeration |
Censor profanity (e.g., using external API) | MessagingRoutes |
MailService |
Send verification emails, password reset emails | UserService, AuthRoutes |
FileStorageService |
Save uploaded files (avatars, manuscripts, research objects) | UserService, PeerReviewService, DataHubService |
CitationGenerator |
Convert article metadata to APA/MLA/BibTeX | ArticleService |
ExportConverter |
Convert HTML to PDF/DOCX/LaTeX | ExportService |
Many of these are referenced in your route files but not implemented.
5. Summary of What You Must Build Now
| Category | Items | Priority |
|---|---|---|
| Services | All 20+ services listed above | High |
| Route Handlers | Missing endpoints (collections, references, preprints, provenance, etc.) | High |
| Model Classes | Already provided – add to model package |
Medium |
| Utility Classes | SessionManager, WebSocketManager, MailService, FileStorageService, etc. |
Medium |
| Database Schema | Create tables matching all repository schemas (SQL scripts) | High |
| Authentication / Security | JWT generation, CSRF, password hashing (BCrypt) | High |
| Real‑time WebSocket | Implement WebSocketManager and integrate with MessageService, GroupService |
Medium |
✅ Recommended Next Steps
- Implement the core services first:
UserService,ArticleService,MessageService,GroupService. These are used by many routes. - Add missing route handlers for the endpoints listed above (start with
/api/recent-items,/api/unified-inbox, and collections). - Create the missing model classes (you already have the code).
- Implement
SessionManagerandWebSocketManagerto enable real‑time messaging. - Write the SQL schema for all repositories (tables for
users,articles,messages,groups, etc.).
Once these are in place, the frontend will have zero missing API calls and the application will be fully functional.
Would you like me to provide Java skeleton code for any of these services or route handlers?
Xet Storage Details
- Size:
- 9.53 kB
- Xet hash:
- fced69a8005110d4524534cf9b037560e30b53345cbbaf092dce631023c28905
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.