How sarowar-islam/shcms-frontend works
CUET-SHCMS is a role-based frontend for hostel complaint handling. Users enter through the public landing page or sign-in; the app restores authentication state and routes signed-in users to student, staff, or admin workspaces. The documented workflow covers student complaint submission and tracking, staff assignment/status updates, and admin oversight and configuration, with AI analysis presented as mock insights. The excerpts show app routing, auth/API plumbing, and some admin operations; several dashboard-to-service calls are not shown, so those links are left unverified.
Main entry points: App.tsx App Router · api.ts API Services · AdminConsole.tsx Admin Console · StudentDashboard.tsx Student Dashboard
Components 16
Entry and identity
- App Router
src/App.tsx - Public Landing
src/views/LandingPage.tsx - Sign In
src/views/Login.tsx
Role workspaces
- Student Dashboard
src/views/StudentDashboard.tsx - Staff Dashboard
src/views/StaffDashboard.tsx - Admin Console
src/views/AdminConsole.tsx - AI Analysis
src/views/AIAnalysis.tsx
Shared interface and data
- Complaint Chatbot
src/components/Chatbot.tsx - Workspace Navigation
src/components/Sidebar.tsx - Status Badges
src/components/StatusBadge.tsx - Sample Data
src/dummy.ts - Domain Types
src/types/index.ts
API integration
- API Services
src/services/api.ts - HTTP Client
src/utils/api.ts
Other components
- User
- SHCMS Backend
Connections 26
- User → App Router: opens app
- App Router → Public Landing: renders
src/App.tsx - App Router → Sign In: renders
src/App.tsx - App Router → Student Dashboard: routes student
src/App.tsx - App Router → Staff Dashboard: routes staff
src/App.tsx - App Router → Admin Console: routes admin
src/App.tsx - App Router → API Services: checks auth
src/App.tsx - Public Landing → App Router: requests sign-in
src/App.tsx - Sign In → API Services: authenticates
src/views/Login.tsx - Student Dashboard → Complaint Chatbot: opens assistant
src/views/StudentDashboard.tsx - Admin Console → AI Analysis: renders analysis
src/views/AdminConsole.tsx - Admin Console → API Services: manages users
src/views/AdminConsole.tsx - Student Dashboard → Workspace Navigation: uses navigation
src/views/StudentDashboard.tsx - Staff Dashboard → Workspace Navigation: uses navigation
src/views/StaffDashboard.tsx - Admin Console → Workspace Navigation: uses navigation
src/views/AdminConsole.tsx - Student Dashboard → Status Badges: renders status
src/views/StudentDashboard.tsx - Staff Dashboard → Status Badges: renders status
src/views/StaffDashboard.tsx - Admin Console → Status Badges: renders status
src/views/AdminConsole.tsx - AI Analysis → Sample Data: reads sample data
src/views/AIAnalysis.tsx - Sign In → Domain Types: uses contracts
src/views/Login.tsx - API Services → Domain Types: uses contracts
src/services/api.ts - API Services → HTTP Client: sends requests
src/services/api.ts - HTTP Client → SHCMS Backend: calls API
src/utils/api.ts - Student Dashboard → API Services: submits and tracks complaints
- Staff Dashboard → API Services: updates complaints
- Admin Console → API Services: manages complaints and config
src/views/AdminConsole.tsx