How uw-iuga/iuga-web-app works
IUGA’s website presents student-association information, events, resources, and election content; signed-in users can RSVP to events. The main flow is a visitor using the React app, with production homepage event data fetched from the Express API and event RSVP submitted to its event controller. Authentication obtains tokens through MSAL and sends them to the backend. The backend connects to MongoDB and exposes event and user routes. Some pages and controllers are present in the tree but were not sampled, so their internal wiring is not inferred.
Main entry points: App.jsx React app · app.js Express app · models.js Mongo models · AuthContext.jsx Auth context
Components 22
Website experience
- React app
frontend/src/App.jsx - Home page
frontend/src/pages/Home.jsx - Events page
frontend/src/pages/Events.jsx - Resources page
frontend/src/pages/Resources.jsx - About page
frontend/src/pages/About.jsx - Elections page
frontend/src/pages/Elections.jsx - Election FAQ
frontend/src/pages/ElectionsFAQ.jsx - Event details
frontend/src/components/EventDetailsCard.jsx - Association content
frontend/src/assets/data - Mock calendar
frontend/src/assets/mock-data/MockCalendarData.js
Authentication
- Auth context
frontend/src/context/AuthContext.jsx - Token exchange
frontend/src/hooks/useAuth.jsx
Backend API
- Express app
backend/app.js - API v1 router
backend/routes/api/v1/apiv1.js - Events controller
backend/routes/api/v1/controllers/events.js - User controller
backend/routes/api/v1/controllers/user.js - Administration
backend/routes/api/v1/controllers/administration.js - Feedback
backend/routes/api/v1/controllers/feedback.js
Data and storage
- Mongo models
backend/models.js - MongoDB
Other components
- Visitor
- Microsoft identity
Connections 23
- Visitor → React app: uses
- React app → Home page: routes to
- React app → Events page: routes to
- React app → Resources page: routes to
- React app → About page: routes to
- React app → Elections page: routes to
- React app → Election FAQ: routes to
- React app → Association content: reads
- React app → Mock calendar: loads in development
- React app → Express app: fetches upcoming events
- Event details → Express app: posts RSVP
- React app → Auth context: uses
- Auth context → Token exchange: calls
- Token exchange → Microsoft identity: acquires token
- Token exchange → Express app: posts login token
- Auth context → Express app: posts logout
- Express app → API v1 router: mounts
- API v1 router → Events controller: dispatches events
- API v1 router → User controller: dispatches users
- Express app → Mongo models: connects
- Events controller → Mongo models: queries and writes
- User controller → Mongo models: uses
- Mongo models → MongoDB: reads and writes