How abdulrahim-developer/smartresolve-ai works
SmartResolve AI is a grievance-reporting and resolution portal for reporters and administrative staff. Users register or sign in, submit grievances, and receive department classification; uncertain classifications are marked for human review. Staff can review tickets, change their department or status, and trigger model adaptation or evaluate classification performance. The graph follows the frontend’s role-based entry flow into backend services and persistence. Source excerpts show core service behavior; some dashboard-to-endpoint and security wiring is only indicated by the source index, so uncertain links are omitted or dashed.
Main entry points: App.jsx Role-based app · api.js API client · GrievanceService.java Ticket workflow · models User and ticket records
Components 23
Web portal
- Role-based app
frontend/src/App.jsx - Registration form
frontend/src/Register.jsx - Reporter dashboard
frontend/src/StudentDashboard.jsx - Staff dashboard
frontend/src/AdminDashboard.jsx - Session context
frontend/src/AuthContext.jsx - API client
frontend/src/services/api.js
Identity and access
- Auth endpoints
backend/src/main/java/com/acedigital/smartresolve/controllers/AuthController.java - Account service
backend/src/main/java/com/acedigital/smartresolve/services/AuthService.java - JWT service
backend/src/main/java/com/acedigital/smartresolve/services/JwtService.java - JWT security
backend/src/main/java/com/acedigital/smartresolve/config/JwtAuthenticationFilter.java
Grievance workflow
- Grievance endpoints
backend/src/main/java/com/acedigital/smartresolve/controllers/GrievanceController.java - Ticket workflow
backend/src/main/java/com/acedigital/smartresolve/services/GrievanceService.java
Classification and evaluation
- AI operations endpoint
backend/src/main/java/com/acedigital/smartresolve/controllers/AiEvaluationController.java - Evaluation and retraining
backend/src/main/java/com/acedigital/smartresolve/services/ai/AiEvaluationService.java - Naive Bayes engine
backend/src/main/java/com/acedigital/smartresolve/services/ai/AiModelEngine.java - Text preprocessing
backend/src/main/java/com/acedigital/smartresolve/services/ai/TextPreprocessor.java
Domain and persistence
- Grievance repository
backend/src/main/java/com/acedigital/smartresolve/repositories/GrievanceRepository.java - Training sample repository
backend/src/main/java/com/acedigital/smartresolve/repositories/GrievanceSampleRepository.java - User repository
backend/src/main/java/com/acedigital/smartresolve/repositories/UserRepository.java - User and ticket records
backend/src/main/java/com/acedigital/smartresolve/models
Other components
- Reporter
- Staff
- Relational database
Connections 31
- Reporter → Role-based app: uses portal
- Staff → Role-based app: uses portal
- Role-based app → Session context: authenticates through
frontend/src/App.jsx - Role-based app → Reporter dashboard: routes reporters
frontend/src/App.jsx - Role-based app → Staff dashboard: routes staff
frontend/src/App.jsx - Role-based app → Registration form: opens registration
frontend/src/App.jsx - Session context → API client: sends login
frontend/src/AuthContext.jsx - Reporter dashboard → API client: requests ticket data
frontend/src/StudentDashboard.jsx - Staff dashboard → API client: requests staff data
frontend/src/AdminDashboard.jsx - Registration form → API client: submits registration
frontend/src/Register.jsx - API client → Auth endpoints: routes auth requests
- Auth endpoints → Account service: delegates auth
backend/src/main/java/com/acedigital/smartresolve/controllers/AuthController.java - Account service → User repository: reads and saves users
backend/src/main/java/com/acedigital/smartresolve/services/AuthService.java - Account service → JWT service: issues tokens
backend/src/main/java/com/acedigital/smartresolve/services/AuthService.java - API client → Grievance endpoints: routes ticket requests
- Grievance endpoints → Ticket workflow: delegates tickets
backend/src/main/java/com/acedigital/smartresolve/controllers/GrievanceController.java - Ticket workflow → User repository: looks up reporter
backend/src/main/java/com/acedigital/smartresolve/services/GrievanceService.java - Ticket workflow → Naive Bayes engine: classifies description
backend/src/main/java/com/acedigital/smartresolve/services/GrievanceService.java - Ticket workflow → Grievance repository: reads and saves tickets
backend/src/main/java/com/acedigital/smartresolve/services/GrievanceService.java - Ticket workflow → User and ticket records: builds ticket records
backend/src/main/java/com/acedigital/smartresolve/services/GrievanceService.java - AI operations endpoint → Evaluation and retraining: delegates AI operations
backend/src/main/java/com/acedigital/smartresolve/controllers/AiEvaluationController.java - Evaluation and retraining → Training sample repository: loads test samples
backend/src/main/java/com/acedigital/smartresolve/services/ai/AiEvaluationService.java - Evaluation and retraining → Grievance repository: reads live tickets
backend/src/main/java/com/acedigital/smartresolve/services/ai/AiEvaluationService.java - Evaluation and retraining → Naive Bayes engine: evaluates and updates
backend/src/main/java/com/acedigital/smartresolve/services/ai/AiEvaluationService.java - Naive Bayes engine → Training sample repository: loads training samples
backend/src/main/java/com/acedigital/smartresolve/services/ai/AiModelEngine.java - Naive Bayes engine → Text preprocessing: tokenizes text
backend/src/main/java/com/acedigital/smartresolve/services/ai/AiModelEngine.java - Grievance repository → User and ticket records: persists tickets
backend/src/main/java/com/acedigital/smartresolve/repositories/GrievanceRepository.java - User repository → User and ticket records: persists users
backend/src/main/java/com/acedigital/smartresolve/repositories/UserRepository.java - Training sample repository → User and ticket records: loads sample records
backend/src/main/java/com/acedigital/smartresolve/repositories/GrievanceSampleRepository.java - User and ticket records → Relational database: stored in
- JWT security → JWT service: validates tokens
backend/src/main/java/com/acedigital/smartresolve/config/JwtAuthenticationFilter.java