How priyabattula211/attendanceportal works
MITRA is an institute portal with student/admin sign-in, role-based workspaces, event browsing and registration, and an attendance dashboard. The sampled dashboard stores attendance records in browser local storage; it does not show attendance being submitted to the API. The backend event workflow is clearer: routes apply authorization where required and dispatch to handlers that read or write Supabase. Some frontend pages and the API service were not sampled, so their internal wiring is left out.
Main entry points: App.jsx Routes and access · AuthContext.jsx Auth context · eventRoutes.js Event routes · main.jsx React entry
Components 18
Portal frontend
- React entry
frontend/src/main.jsx - Routes and access
frontend/src/App.jsx - Home page
frontend/src/pages/Home.jsx - Login page
frontend/src/pages/Login.jsx - Registration page
frontend/src/pages/Register.jsx - Event card
frontend/src/components/EventCard.jsx - API client
frontend/src/services/api.js
Identity and profiles
- Auth context
frontend/src/context/AuthContext.jsx - Firebase client
frontend/src/services/firebaseClient.js
Event API
- Express app
backend/src/app.js - Event routes
backend/src/routes/eventRoutes.js - API authorization
backend/src/middleware/authMiddleware.js - Event handlers
backend/src/controllers/eventController.js
Attendance workspace
- Role dashboard
frontend/src/pages/Dashboard.jsx - Browser local storage
Other components
- Student or admin
- Firebase Auth and Firestore
- Supabase auth and data
Connections 18
- Student or admin → React entry: opens portal
- React entry → Routes and access: renders
- Routes and access → Auth context: provides auth
- Routes and access → Home page: routes to
- Routes and access → Login page: routes to
- Routes and access → Registration page: routes to
- Routes and access → Role dashboard: guards and routes
- Auth context → Firebase client: uses
- Firebase client → Firebase Auth and Firestore: initializes
- Auth context → Firebase Auth and Firestore: reads profile and auth state
- Role dashboard → Browser local storage: reads and writes records
- Home page → Event card: renders events
- API client → Express app: API requests
- Express app → Event routes: mounts at /api/events
- Event routes → API authorization: protects selected routes
- Event routes → Event handlers: dispatches handlers
- API authorization → Supabase auth and data: verifies tokens and reads profiles
- Event handlers → Supabase auth and data: reads and writes events and registrations