How ayman2162k7/saasc works
saasc is a campus forum with student and administrator experiences. A user registers or logs in, then reaches a protected department feed to create posts, comment, or report content; administrators review reports and manage posts, users, and banned words. The React client calls an Express API backed by PostgreSQL, while authenticated Socket.IO events provide live feed and moderation updates. The README gives no further product detail, so major capabilities are represented where supported by sampled routes and client modules; unsampled route behavior is not expanded.
Main entry points: App.jsx App routing · posts.js Posts and reports · StudentFeed.jsx Student feed · admin.js Admin controls
Components 19
Web client
- App routing
frontend/src/App.jsx - Auth screens
frontend/src/pages - Session context
frontend/src/context/AuthContext.jsx - Route guard
frontend/src/components/ProtectedRoute.jsx - Navigation
frontend/src/components/Navbar.jsx - Student feed
frontend/src/components/StudentFeed.jsx - Post composer
frontend/src/components/PostComposer.jsx - Post interactions
frontend/src/components/PostCard.jsx - Admin dashboard
frontend/src/components/AdminDashboard.jsx - Realtime client
frontend/src/services/socket.js
API and access
- HTTP and socket server
backend/server.js - Authentication API
backend/routes/auth.js - Token and role checks
backend/middleware/auth.js
Forum and moderation
- Posts and reports
backend/routes/posts.js - Admin controls
backend/routes/admin.js
Persistence and realtime
- Database pool
backend/db.js - Forum database
database/schema.sql - Realtime rooms
backend/server.js
Other components
- Campus user
Connections 31
- Campus user → App routing: uses
- App routing → Session context: reads session
frontend/src/App.jsx - App routing → Auth screens: routes to
frontend/src/App.jsx - App routing → Route guard: protects routes
frontend/src/App.jsx - App routing → Navigation: renders
frontend/src/App.jsx - App routing → Student feed: routes to
frontend/src/App.jsx - App routing → Admin dashboard: routes to
frontend/src/App.jsx - Auth screens → Session context: authenticates via
frontend/src/pages/Login.jsx - Route guard → Session context: checks access
frontend/src/components/ProtectedRoute.jsx - Session context → Authentication API: calls auth API
frontend/src/context/AuthContext.jsx - Student feed → Posts and reports: loads posts
frontend/src/components/StudentFeed.jsx - Student feed → Realtime client: connects and listens
frontend/src/components/StudentFeed.jsx - Student feed → Post composer: renders
frontend/src/components/StudentFeed.jsx - Student feed → Post interactions: renders
frontend/src/components/StudentFeed.jsx - Post composer → Posts and reports: submits posts
- Post interactions → Posts and reports: post actions
- Admin dashboard → Admin controls: manages content
frontend/src/components/AdminDashboard.jsx - Admin dashboard → Realtime client: receives live updates
frontend/src/components/AdminDashboard.jsx - HTTP and socket server → Authentication API: mounts route
backend/server.js - HTTP and socket server → Posts and reports: mounts route
backend/server.js - HTTP and socket server → Admin controls: mounts route
backend/server.js - HTTP and socket server → Realtime rooms: configures
backend/server.js - Authentication API → Token and role checks: verifies profile token
backend/routes/auth.js - Admin controls → Token and role checks: checks roles
backend/routes/admin.js - Posts and reports → Token and role checks: checks tokens and roles
backend/routes/posts.js - Authentication API → Database pool: queries
backend/routes/auth.js - Posts and reports → Database pool: queries and updates
backend/routes/posts.js - Admin controls → Database pool: queries and updates
backend/routes/admin.js - Database pool → Forum database: connects to
- Admin controls → Realtime rooms: emits moderation events
backend/routes/admin.js - Realtime client → Realtime rooms: opens authenticated connection
frontend/src/services/socket.js