How kamesh-codings/campus-connect works
CampusConnect is a role-based college community portal. Students, faculty, club leads, and administrators use the React application to sign in and reach campus feed, events, clubs, announcements, discussions, resources, profiles, analytics, and governance features. The frontend sends authenticated API requests to an Express backend, whose domain controllers operate on MongoDB models; Socket.io provides a separate real-time notification channel. The README documents several capabilities whose detailed controller wiring was not sampled, so those branches are shown without speculative internal links.
Main entry points: App.jsx Role-based routes · server.js Express and Socket.io server · feedController.js Feed aggregation · User.js User records
Components 31
Web application
- Role-based routes
frontend/src/App.jsx - Login and session
frontend/src/context/AuthContext.jsx - Authenticated API client
frontend/src/services/api.js - Campus feed
frontend/src/pages/Feed.jsx - Event discovery and passes
frontend/src/pages/Events.jsx - Clubs and memberships
frontend/src/pages/Clubs.jsx - Announcements
frontend/src/pages/Announcements.jsx - Discussions and Q&A
frontend/src/pages/Discussions.jsx - Resource hub
frontend/src/pages/Resources.jsx - Profiles and directory
frontend/src/pages/Profile.jsx - Institutional analytics
frontend/src/pages/Analytics.jsx - Moderation and governance
frontend/src/pages/AdminDashboard.jsx
API and realtime
- Express and Socket.io server
backend/server.js - JWT and role checks
backend/middleware/auth.js - Realtime notifications
backend/socket/socketHandler.js
Campus features
- Authentication
backend/controllers/authController.js - Feed aggregation
backend/controllers/feedController.js - Event operations
backend/controllers/eventController.js - Club operations
backend/controllers/clubController.js - Discussion moderation
backend/controllers/discussionController.js - File uploads
backend/controllers/uploadController.js - Profiles and governance
backend/controllers/userController.js
Data models
- User records
database/models/User.js - Event records
database/models/Event.js - Club records
database/models/Club.js - Announcement records
database/models/Announcement.js - Discussion records
database/models/Discussion.js - Notification records
database/models/Notification.js - Resource records
database/models/Resource.js
Other components
- Campus user
- MongoDB
Connections 37
- Campus user → Role-based routes: uses
- Role-based routes → Login and session: routes to
frontend/src/App.jsx - Role-based routes → Campus feed: routes to
frontend/src/App.jsx - Role-based routes → Event discovery and passes: routes to
frontend/src/App.jsx - Role-based routes → Clubs and memberships: routes to
frontend/src/App.jsx - Role-based routes → Announcements: routes to
frontend/src/App.jsx - Role-based routes → Discussions and Q&A: routes to
frontend/src/App.jsx - Role-based routes → Resource hub: routes to
frontend/src/App.jsx - Role-based routes → Profiles and directory: routes to
frontend/src/App.jsx - Role-based routes → Institutional analytics: guards access
frontend/src/App.jsx - Role-based routes → Moderation and governance: guards access
frontend/src/App.jsx - Login and session → Authenticated API client: authenticates through
frontend/src/context/AuthContext.jsx - Authenticated API client → Express and Socket.io server: sends API requests
- Express and Socket.io server → Authentication: mounts auth routes
backend/server.js - Express and Socket.io server → Profiles and governance: mounts user routes
backend/server.js - Express and Socket.io server → Feed aggregation: mounts feed routes
backend/server.js - Express and Socket.io server → Event operations: mounts event routes
backend/server.js - Express and Socket.io server → Club operations: mounts club routes
backend/server.js - Express and Socket.io server → Discussion moderation: mounts discussion routes
backend/server.js - Express and Socket.io server → File uploads: mounts upload routes
backend/server.js - Express and Socket.io server → Realtime notifications: initializes
backend/server.js - Express and Socket.io server → MongoDB: connects to
- Authentication → User records: reads users
backend/controllers/authController.js - JWT and role checks → User records: loads user
backend/middleware/auth.js - Profiles and governance → User records: manages users
backend/controllers/userController.js - Feed aggregation → Event records: aggregates events
backend/controllers/feedController.js - Feed aggregation → Announcement records: aggregates notices
backend/controllers/feedController.js - Feed aggregation → Discussion records: aggregates discussions
backend/controllers/feedController.js - Feed aggregation → Club records: aggregates clubs
backend/controllers/feedController.js - Feed aggregation → User records: aggregates users
backend/controllers/feedController.js - Event operations → Event records: manages events
backend/controllers/eventController.js - Event operations → User records: uses user records
backend/controllers/eventController.js - Club operations → Club records: manages clubs
backend/controllers/clubController.js - Club operations → User records: updates memberships
backend/controllers/clubController.js - Discussion moderation → Discussion records: manages threads
backend/controllers/discussionController.js - File uploads → Resource records: stores resource metadata
backend/controllers/uploadController.js - Authentication → JWT and role checks: issues tokens
backend/controllers/authController.js