How sahilbhoyaraiml23-prog/final-year-project works
Smart Campus Intelligence is a student- and faculty-facing campus portal. Users authenticate with institutional accounts, then use academic services (courses, announcements, resources, assignments and results), AI assistance, or the peer marketplace and chat. The React app calls the Express API; backend controllers coordinate persistence, uploads, audit events and realtime notifications. The README establishes the major capabilities, while sampled code and the SOURCE INDEX support only some individual connections; uncertain links are omitted.
Main entry points: index.ts API routes · prisma.ts Prisma access · App.tsx Application shell · marketplaceController.ts Marketplace lifecycle
Components 23
Campus Web App
- Application shell
frontend/src/App.tsx - Sign-in and registration
frontend/src/pages/auth/AuthPage.tsx - Session state
frontend/src/context/AuthContext.tsx - API client
frontend/src/services/api.ts - Academic pages
frontend/src/pages/academic - Marketplace pages
frontend/src/pages/marketplace - Chat state
frontend/src/context/ChatContext.tsx - Campus chatbot
frontend/src/chatbot/CampusChatbot.tsx
API and Identity
- Express application
backend/src/app.ts - API routes
backend/src/routes/index.ts - Authentication
backend/src/controllers/authController.ts - User management
backend/src/controllers/userController.ts - Audit logging
backend/src/services/audit.ts - Prisma access
backend/src/services/prisma.ts
Academic Services
- Academic controllers
backend/src/controllers - AI assistance
backend/src/controllers/aiController.ts - RAG knowledge service
backend/src/services/ragService.ts - Secure file storage
backend/src/services/fileStorage.ts
Marketplace and Realtime
- Marketplace lifecycle
backend/src/controllers/marketplaceController.ts - Chat controller
backend/src/controllers/chatController.ts - Realtime service
backend/src/services/socket.ts
Other components
- Campus user
- SQLite database
Connections 33
- Campus user → Application shell: uses
README.md - Application shell → Sign-in and registration: shows when signed out
frontend/src/App.tsx - Application shell → Academic pages: renders academic views
frontend/src/App.tsx - Application shell → Marketplace pages: provides marketplace views
README.md - Application shell → Chat state: provides chat context
frontend/src/App.tsx - Application shell → Campus chatbot: renders
frontend/src/App.tsx - Sign-in and registration → Session state: submits credentials
frontend/src/pages/auth/AuthPage.tsx - Session state → API client: calls API
frontend/src/context/AuthContext.tsx - Academic pages → API client: requests campus data
frontend/src/pages/academic/CoursesPage.tsx - Marketplace pages → API client: requests listings
README.md - Chat state → API client: uses API client
frontend/src/context/ChatContext.tsx - API client → Express application: REST requests
README.md - Express application → API routes: mounts routes
backend/src/app.ts - API routes → Authentication: routes auth
backend/src/routes/index.ts - API routes → User management: routes users
backend/src/routes/index.ts - API routes → Academic controllers: routes academic services
backend/src/routes/index.ts - API routes → AI assistance: routes AI
backend/src/routes/index.ts - API routes → Marketplace lifecycle: routes marketplace
backend/src/routes/index.ts - API routes → Chat controller: routes chat
backend/src/routes/index.ts - Authentication → Prisma access: reads and writes
backend/src/controllers/authController.ts - User management → Prisma access: persists user data
- Academic controllers → Prisma access: persists academic data
backend/src/controllers/authController.ts - Academic controllers → Secure file storage: stores uploads
backend/src/controllers/assignmentController.ts - Academic controllers → Audit logging: records actions
backend/src/controllers/authController.ts - AI assistance → RAG knowledge service: retrieves knowledge
backend/src/controllers/aiController.ts - RAG knowledge service → Prisma access: enriches from records
backend/src/services/ragService.ts - Marketplace lifecycle → Prisma access: persists listings
backend/src/controllers/marketplaceController.ts - Marketplace lifecycle → Secure file storage: stores listing images
backend/src/controllers/marketplaceController.ts - Marketplace lifecycle → Audit logging: records actions
backend/src/controllers/marketplaceController.ts - Marketplace lifecycle → Realtime service: emits updates
backend/src/controllers/marketplaceController.ts - Chat controller → Realtime service: supports realtime chat
- Prisma access → SQLite database: database access
README.md - Realtime service → Prisma access: persists chat data
backend/src/services/socket.ts