How storevia/srmap-api works
Srmap API is a student portal and utility suite. Students use protected pages to access academic data and tools; requests are authenticated, served from stored data or fetched from SRM, then returned to the portal. Separate branches cover study resources, secure sharing, and the multiplayer/singleplayer arcade. The graph preserves README capabilities even where their implementation was not sampled. Edges without direct source excerpts rely on README statements; detailed wiring for several unsampled features is therefore not asserted.
Main entry points: layout.tsx Protected Portal · arcade.gateway.ts Realtime Gateway · mongodb.ts MongoDB · route.ts Academic Fetch Route
Components 26
Student Portal
- Protected Portal
src/app/(protected)/layout.tsx - Accounts & Settings
src/context/LocalStorageContext.tsx
Academic Services
- Attendance Tools
src/app/(protected)/attendance/page.tsx - Timetable Tools
src/app/(protected)/timetable/page.tsx - Exams & Results
src/app/(protected)/exams/internals/page.tsx - Vacant Classrooms
src/app/api/vacant/route.ts - SRM Data Fetch
src/server/srmapi/fetchData.ts - Academic Fetch Route
src/app/api/srmapi/fetch/route.ts - Academic API Routes
src/app/api/srmapi
Resources & Sharing
- Study Resources
src/app/(protected)/resources/page.tsx - Resource Admin
src/app/(protected)/admin/resources/page.tsx - Secure Sharing
src/app/(protected)/share/page.tsx - Share API
src/app/api/share/create/route.ts - Share Service
src/server/share/shareService.ts - Object Storage
src/server/share/s3Clients.ts
Arcade
- Arcade Client
src/context/ArcadeContext.tsx - Realtime Gateway
arcade-server/src/gateway/arcade.gateway.ts - Chess Games
arcade-server/src/games/chess/chess.service.ts - Typing Test
arcade-server/src/games/typingtest/typingtest.service.ts - Matchmaking
arcade-server/src/matchmaking/matchmaking.service.ts - Game Chat
arcade-server/src/chat/chat.service.ts
Platform Services
- Request Auth
src/server/utils/functions.ts - MongoDB
src/lib/database/mongodb.ts - Settings Sync
src/app/api/sync/route.ts
Other components
- Student
- SRM Portal
Connections 26
- Student → Protected Portal: uses
- Protected Portal → Attendance Tools: opens
- Protected Portal → Timetable Tools: opens
- Protected Portal → Exams & Results: opens
- Protected Portal → Vacant Classrooms: queries
- Protected Portal → Study Resources: opens
- Protected Portal → Secure Sharing: opens
- Protected Portal → Arcade Client: opens
- Accounts & Settings → Settings Sync: syncs settings
src/context/LocalStorageContext.tsx - Settings Sync → MongoDB: reads/writes
src/app/api/sync/route.ts - Academic Fetch Route → Request Auth: authenticates
src/app/api/srmapi/fetch/route.ts - Academic Fetch Route → SRM Data Fetch: fetches data
src/app/api/srmapi/fetch/route.ts - SRM Data Fetch → SRM Portal: scrapes
- Academic Fetch Route → MongoDB: reads/writes cache
src/app/api/srmapi/fetch/route.ts - Academic API Routes → SRM Portal: serves academic data
- Vacant Classrooms → MongoDB: checks timetable count
src/app/api/vacant/route.ts - Student → Resource Admin: administers resources
- Secure Sharing → Share API: requests shares
- Share API → Share Service: delegates
src/app/api/share/create/route.ts - Share Service → MongoDB: stores share records
src/server/share/shareService.ts - Share Service → Object Storage: uploads/deletes files
src/server/share/shareService.ts - Arcade Client → Realtime Gateway: connects realtime
- Realtime Gateway → Chess Games: dispatches chess
- Realtime Gateway → Typing Test: dispatches typing
- Realtime Gateway → Matchmaking: dispatches matching
- Realtime Gateway → Game Chat: dispatches chat