How iamarun3/campus-care works
CampusCare Hub is a role-based campus grievance and maintenance portal. Users submit and track complaints; admins manage complaints, workers, inventory, QR entry points, activity, and maintenance schedules; workers handle assigned tasks. Complaint classification and portal guidance are additional AI-assisted capabilities. The graph emphasizes the documented workflow and operational areas. Several pages and hooks are unsampled, so their internal calls are not asserted; dashed edges mark documented integrations whose invoking code was not shown.
Main entry points: App.tsx Role-based routes · client.ts Supabase client · WorkerDashboard.tsx Worker task handling · AuthContext.tsx Authentication
Components 26
Application access
- React entry
campus-care-hub-main/src/main.tsx - Role-based routes
campus-care-hub-main/src/App.tsx - Authentication
campus-care-hub-main/src/contexts/AuthContext.tsx
Complaint workflow
- User dashboards
campus-care-hub-main/src/pages/user - Complaint submission
campus-care-hub-main/src/pages/user/RaiseComplaintPage.tsx - Complaint tracking
campus-care-hub-main/src/pages/user/UserComplaintsPage.tsx - Complaint operations
campus-care-hub-main/src/pages/admin/AdminComplaintsPage.tsx - Worker task handling
campus-care-hub-main/src/pages/worker/WorkerDashboard.tsx - Complaint classification
campus-care-hub-main/supabase/functions/classify-complaint/index.ts - Worker assignment
campus-care-hub-main/src/lib/auto-assign-worker.ts
Campus operations
- Admin dashboard
campus-care-hub-main/src/pages/admin/AdminDashboard.tsx - Worker management
campus-care-hub-main/src/pages/admin/AdminWorkersPage.tsx - Inventory management
campus-care-hub-main/src/pages/admin/AdminInventoryPage.tsx - Maintenance scheduling
campus-care-hub-main/src/pages/admin/MaintenanceSchedulerPage.tsx - QR entry points
campus-care-hub-main/src/pages/admin/AdminQRPage.tsx - Activity logs
campus-care-hub-main/src/pages/admin/AdminActivityPage.tsx
Analytics and assistance
- Operational analytics
campus-care-hub-main/src/components/dashboard - AI help assistant
campus-care-hub-main/src/components/chatbot/FloatingChatbot.tsx - Assistant service
campus-care-hub-main/supabase/functions/chat-assistant/index.ts - Voice input
campus-care-hub-main/src/hooks/useSpeechToText.ts
Data and services
- Supabase client
campus-care-hub-main/src/integrations/supabase/client.ts - Supabase database
- Supabase Auth
Other components
- Campus users
- Administrators
- Maintenance workers
Connections 35
- React entry → Role-based routes: renders
campus-care-hub-main/src/main.tsx - Role-based routes → Authentication: provides auth
campus-care-hub-main/src/App.tsx - Role-based routes → User dashboards: routes users
campus-care-hub-main/src/App.tsx - Role-based routes → Complaint submission: routes users
campus-care-hub-main/src/App.tsx - Role-based routes → Complaint tracking: routes users
campus-care-hub-main/src/App.tsx - Role-based routes → Admin dashboard: routes admins
campus-care-hub-main/src/App.tsx - Role-based routes → Complaint operations: routes admins
campus-care-hub-main/src/App.tsx - Role-based routes → Worker management: routes admins
campus-care-hub-main/src/App.tsx - Role-based routes → Worker task handling: routes workers
campus-care-hub-main/src/App.tsx - Campus users → Authentication: sign in
- Administrators → Authentication: sign in
- Maintenance workers → Authentication: sign in
- Campus users → Complaint submission: submit complaint
- Campus users → Complaint tracking: track complaints
- Administrators → Complaint operations: manage complaints
- Maintenance workers → Worker task handling: handle tasks
- Complaint submission → Complaint classification: classify text
- Complaint operations → Worker assignment: assign worker
campus-care-hub-main/src/lib/auto-assign-worker.ts - Worker task handling → Supabase client: uploads evidence
campus-care-hub-main/src/pages/worker/WorkerDashboard.tsx - Worker task handling → Worker management: notifies user
campus-care-hub-main/src/pages/worker/WorkerDashboard.tsx - Worker task handling → Supabase client: updates tasks
- Administrators → Admin dashboard: view operations
- Administrators → Inventory management: manage stock
- Administrators → Maintenance scheduling: schedule work
- Administrators → QR entry points: manage QR codes
- Administrators → Activity logs: review activity
- Admin dashboard → Operational analytics: shows analytics
- AI help assistant → Assistant service: requests guidance
- AI help assistant → Voice input: uses speech input
campus-care-hub-main/src/components/chatbot/FloatingChatbot.tsx - Complaint classification → Supabase client: uses backend
- Assistant service → Supabase client: uses backend
- Supabase client → Supabase database: reads and writes
- Authentication → Supabase Auth: authenticates
- Worker management → Supabase client: loads workers
- Worker assignment → Supabase client: assigns complaint
campus-care-hub-main/src/lib/auto-assign-worker.ts