How manyruumpus/cs455-iitk-campus-duo- works
Campus Duo is a student platform for verified IIT Kanpur students to find compatible study partners and reserve study spaces. The main workflow is authentication, profile setup, deterministic partner discovery, and capacity-aware booking; social features, administration, and a bounded AI assistant provide distinct supporting capabilities. The graph follows documented API and architecture relationships plus sampled route wiring. Several feature implementations were not sampled, so their internal calls are not inferred.
Main entry points: db.ts Database Access · routes.tsx Application Routes · agentService.ts Governed AI Assistant · authService.ts Authentication
Components 27
Student and Admin App
- Web Application
frontend/src/app/App.tsx - Application Routes
frontend/src/app/routes.tsx - Student Features
frontend/src/features/student - Authentication UI
frontend/src/features/auth - Admin Features
frontend/src/features/admin
Backend API
- Auth API
backend/src/routes/auth.ts - Profile API
backend/src/routes/profile.ts - Discovery API
backend/src/routes/discovery.ts - Booking API
backend/src/routes/booking.ts - Agent API
backend/src/routes/agent.ts - Admin API
backend/src/routes/admin.ts
Core Domain Services
- Authentication
backend/src/services/authService.ts - Profile Management
backend/src/services/profileService.ts - Partner Discovery
backend/src/services/discoveryService.ts - Compatibility Scoring
backend/src/services/scoringEngine.ts - Space Booking
backend/src/services/bookingService.ts - Governed AI Assistant
backend/src/services/agentService.ts - Administration
backend/src/services/adminService.ts
Persistence and Integrations
- Email Delivery
backend/src/services/emailService.ts - Database Access
backend/src/config/db.ts - Booking Repository
backend/src/repository/bookingRepo.ts - PostgreSQL
- Ollama Provider
backend/src/services/ollamaLlmClient.ts - Hugging Face Provider
backend/src/services/huggingFaceLlmClient.ts
Other components
- Student
- Administrator
- External Inference
Connections 26
- Web Application → Application Routes: mounts routes
frontend/src/app/App.tsx - Application Routes → Authentication UI: routes to
frontend/src/app/routes.tsx - Application Routes → Student Features: routes to
frontend/src/app/routes.tsx - Application Routes → Admin Features: routes to
frontend/src/app/routes.tsx - Student → Web Application: uses
- Administrator → Web Application: uses
- Auth API → Authentication: delegates to
backend/src/routes/auth.ts - Profile API → Profile Management: delegates to
backend/src/routes/profile.ts - Discovery API → Partner Discovery: delegates to
backend/src/routes/discovery.ts - Booking API → Space Booking: delegates to
backend/src/routes/booking.ts - Agent API → Governed AI Assistant: delegates to
backend/src/routes/agent.ts - Admin API → Administration: delegates to
backend/src/routes/admin.ts - Authentication → Email Delivery: sends OTP
backend/src/services/authService.ts - Authentication → Database Access: reads and writes
backend/src/services/authService.ts - Profile Management → Database Access: persists profile
- Partner Discovery → Compatibility Scoring: scores matches
- Space Booking → Booking Repository: delegates queries
backend/src/services/bookingService.ts - Space Booking → Database Access: uses transactions
backend/src/services/bookingService.ts - Governed AI Assistant → Compatibility Scoring: scores candidates
backend/src/services/agentService.ts - Governed AI Assistant → Ollama Provider: selects provider
backend/src/services/agentService.ts - Governed AI Assistant → Hugging Face Provider: selects provider
backend/src/services/agentService.ts - Ollama Provider → External Inference: requests inference
backend/src/services/ollamaLlmClient.ts - Hugging Face Provider → External Inference: requests inference
backend/src/services/huggingFaceLlmClient.ts - Administration → Database Access: uses database
- Booking Repository → PostgreSQL: reads and writes
- Database Access → PostgreSQL: connects to