How kakashimoto14/comlab-reservation-system works
ComPort is a role-based academic laboratory reservation and operations platform. Students browse laboratories and request whole-lab or PC reservations; staff and administrators publish schedules and review requests, while administrators also manage accounts, staff assignments, and calendar events. The React application calls an Express API whose controllers delegate business rules to services backed by Prisma. Dashboards, reports, notifications, and the authenticated assistant support these workflows. The README documents email, Google Calendar, and optional AI integrations; sampled source confirms some wiring, but not every integration path.
Main entry points: services.ts API client services · prisma.ts Prisma data access · ReservationService.ts Reservation workflow · App.tsx Role-based pages
Components 24
Web application
- Role-based pages
frontend/src/App.tsx - API client services
frontend/src/api/services.ts - Session context
frontend/src/store/AuthContext.tsx
API and identity
- Authentication routes
backend/src/routes/auth.routes.ts - Authentication controller
backend/src/controllers/AuthController.ts - Authentication service
backend/src/services/AuthService.ts - Prisma data access
backend/src/config/prisma.ts - Application database
Lab operations
- Laboratory routes
backend/src/routes/laboratory.routes.ts - Laboratory controller
backend/src/controllers/LaboratoryController.ts - Laboratory service
backend/src/services/LaboratoryService.ts - Reservation workflow
backend/src/services/ReservationService.ts - Schedule management
backend/src/services/ScheduleService.ts - Calendar views and events
backend/src/services/CalendarService.ts - Staff operations
backend/src/services/StaffService.ts
Shared capabilities
- Dashboards and reports
backend/src/services/DashboardService.ts - Reservation assistant
backend/src/services/ReservationAssistantService.ts - Notifications and reminders
backend/src/services/NotificationService.ts - Notification inbox and streaming
backend/src/services/NotificationInboxService.ts - Activity logging
backend/src/services/ActivityLogService.ts - Email delivery
backend/src/services/EmailService.ts - Google Calendar
backend/src/services/GoogleCalendarService.ts
Other components
- Students, staff, admins
- Optional AI provider
Connections 31
- Students, staff, admins → Role-based pages: use role pages
- Role-based pages → Session context: reads session
- Role-based pages → API client services: requests operations
- API client services → Authentication routes: calls auth API
- Authentication routes → Authentication controller: dispatches
- Authentication controller → Authentication service: invokes
- Authentication service → Prisma data access: reads and writes
- Authentication service → Email delivery: sends messages
- API client services → Laboratory routes: calls lab API
- Laboratory routes → Laboratory controller: dispatches
- Laboratory controller → Laboratory service: invokes
- Laboratory service → Prisma data access: reads and writes
- API client services → Reservation workflow: requests reservations
- API client services → Schedule management: manages schedules
- API client services → Calendar views and events: manages calendar
- API client services → Staff operations: manages staff
- API client services → Dashboards and reports: loads summaries
- API client services → Reservation assistant: sends assistant requests
- Reservation assistant → Optional AI provider: optional inference
- API client services → Notification inbox and streaming: reads notifications
- Notifications and reminders → Notification inbox and streaming: updates inbox
- Notifications and reminders → Email delivery: delivers alerts
- Reservation workflow → Notifications and reminders: emits reservation events
- Reservation workflow → Activity logging: records activity
- Reservation workflow → Prisma data access: reads and writes
- Schedule management → Prisma data access: reads and writes
- Calendar views and events → Prisma data access: reads and writes
- Staff operations → Prisma data access: reads and writes
- Dashboards and reports → Prisma data access: reads metrics
- Prisma data access → Application database: queries
- Calendar views and events → Google Calendar: optional sync