How abdulwahab595/campus-event-hub works
Campus Event Hub is a web app for students to discover events and manage registrations, and for organizers to publish and maintain events. Users enter through the routed React app, which fetches data through a shared API client; the Express API authenticates and dispatches requests to domain controllers that read or write MongoDB. The major workflows include account registration and email verification, event discovery and organizer CRUD, and student registration management. Reminder and announcement email capabilities are represented from indexed source references; their exact runtime behavior is not fully excerpted.
Main entry points: api.js API client · App.jsx Routed app · eventController.js Event service · eventRoutes.js Event routes
Components 29
Web client
- Routed app
src/App.jsx - Event discovery
src/pages/EventsPage.jsx - Event details
src/pages/EventDetailsPage.jsx - My registrations
src/pages/MyRegistrationsPage.jsx - Account pages
src/pages/RegisterPage.jsx - Login page
src/pages/LoginPage.jsx - Email verification
src/pages/VerifyEmailPage.jsx - Organizer tools
src/pages/OrganizerPage.jsx - Event editor
src/pages/OrganizerEventFormPage.jsx - Event card
src/components/EventCard.jsx - API client
src/api.js - Client state
src/store/store.js
API and domain
- Auth routes
server/routes/authRoutes.js - Event routes
server/routes/eventRoutes.js - Registration routes
server/routes/registrationRoutes.js - Account service
server/controllers/authController.js - Event service
server/controllers/eventController.js - Registration service
server/controllers/registrationController.js - Auth and roles
server/middleware/auth.js - Event shaping
server/utils/eventData.js - API startup
server/index.js
MongoDB data
- User accounts
server/models/User.js - Events
server/models/Event.js - Registrations
server/models/Registration.js
Email messaging
- Event announcements
server/utils/sendEventAnnouncement.js - Event reminders
server/utils/sendEventReminders.js - Email transport
server/utils/sendEmail.js
Other components
- Student or organizer
- Email provider
Connections 47
- Student or organizer → Routed app: uses
src/App.jsx - Routed app → Event discovery: routes to
src/App.jsx - Routed app → Event details: routes to
src/App.jsx - Routed app → My registrations: routes to
src/App.jsx - Routed app → Account pages: routes to
src/App.jsx - Routed app → Login page: routes to
src/App.jsx - Routed app → Email verification: routes to
src/App.jsx - Routed app → Organizer tools: routes to
src/App.jsx - Routed app → Event editor: routes to
src/App.jsx - Routed app → API client: restores session via
src/App.jsx - Routed app → Client state: dispatches to
src/App.jsx - Event discovery → API client: requests data via
src/pages/EventsPage.jsx - Event details → API client: requests data via
src/pages/EventDetailsPage.jsx - My registrations → API client: requests data via
src/pages/MyRegistrationsPage.jsx - Login page → API client: requests data via
src/pages/LoginPage.jsx - Account pages → API client: requests data via
src/pages/RegisterPage.jsx - Email verification → API client: requests data via
src/pages/VerifyEmailPage.jsx - Organizer tools → API client: requests data via
src/pages/OrganizerPage.jsx - Event editor → API client: requests data via
src/pages/OrganizerEventFormPage.jsx - Event discovery → Event card: renders
src/pages/EventsPage.jsx - My registrations → Event card: renders
src/pages/MyRegistrationsPage.jsx - API client → Client state: dispatches auth errors to
src/api.js - API client → Auth routes: sends HTTP requests
- API client → Event routes: sends HTTP requests
- API client → Registration routes: sends HTTP requests
- API startup → Auth routes: mounts
server/index.js - API startup → Event routes: mounts
server/index.js - API startup → Registration routes: mounts
server/index.js - Event routes → Auth and roles: protects routes
server/routes/eventRoutes.js - Registration routes → Auth and roles: protects routes
server/routes/registrationRoutes.js - Auth routes → Account service: dispatches to
server/routes/authRoutes.js - Event routes → Event service: dispatches to
server/routes/eventRoutes.js - Event routes → Registration service: dispatches to
server/routes/eventRoutes.js - Registration routes → Registration service: dispatches to
server/routes/registrationRoutes.js - Auth and roles → User accounts: loads verified user
server/middleware/auth.js - Account service → User accounts: reads and writes
server/controllers/authController.js - Event service → Events: reads and writes
server/controllers/eventController.js - Event service → Registrations: deletes registrations
server/controllers/eventController.js - Event service → Event shaping: formats responses
server/controllers/eventController.js - Registration service → Events: checks events
server/controllers/registrationController.js - Registration service → Registrations: manages registrations
server/controllers/registrationController.js - Registration service → Event shaping: formats events
server/controllers/registrationController.js - Event service → Event announcements: sends announcement
server/controllers/eventController.js - API startup → Event reminders: schedules
server/index.js - Event announcements → Email transport: sends through
server/utils/sendEventAnnouncement.js - Event reminders → Email transport: sends through
server/utils/sendEventReminders.js - Email transport → Email provider: delivers email