How aronlama10/studentresourcehub works
This repository is a student resource-sharing hub, with a newer frontend-v2 client, an Express API, and an older frontend client also present in the tree. The main workflow is that students browse or upload resources, uploads enter moderation, and approved resources can be saved or reported; moderators review resource and report queues, while admins manage users. The graph emphasizes frontend-v2 and the backend. Edges are limited to relationships visible in excerpts or the SOURCE INDEX; unsampled feature modules are included where their paths and product responsibilities are clear, without guessing their calls.
Main entry points: App.jsx Routes and app · api.js HTTP API client · index.js Express server · Resources.jsx Resource browsing
Components 34
Student client
- Routes and app
frontend-v2/src/App.jsx - Login and signup
frontend-v2/src/pages/Signup.jsx - Authentication client
frontend-v2/src/services/authService.js - Resource browsing
frontend-v2/src/pages/dashboard/Resources.jsx - Resource uploads
frontend-v2/src/pages/dashboard/Upload.jsx - My resources
frontend-v2/src/pages/dashboard/MyResources.jsx - Saved resources
frontend-v2/src/pages/dashboard/SavedResources.jsx - Profile and streak
frontend-v2/src/pages/dashboard/Profile.jsx - Moderation and admin
frontend-v2/src/pages/admin/PendingResources.jsx - Admin user management
frontend-v2/src/pages/admin/AdminUsers.jsx - HTTP API client
frontend-v2/src/services/api.js - Resource service
frontend-v2/src/services/resourceService.js - Admin service
frontend-v2/src/services/adminService.js - Saved service
frontend-v2/src/services/savedService.js - Report service
frontend-v2/src/services/reportService.js
API and access
- Express server
backend/index.js - Authentication routes
backend/routes/AuthRouter.js - Resource routes
backend/routes/ResourceRouter.js - User routes
backend/routes/UserRouter.js - Report routes
backend/routes/ReportRouter.js - JWT and roles
backend/middlewares/Auth.js
Resource lifecycle
- Resource operations
backend/controllers/ResourceController.js - Upload validation
backend/middlewares/Upload.js - Resource records
backend/models/Resource.js - Cloudinary files
backend/config/cloudinary.js
Accounts and reports
- Profile and saved actions
backend/controllers/UserController.js - User administration
backend/controllers/AdminUserController.js - Signup and login
backend/controllers/AuthController.js - User records
backend/models/User.js - Report workflow
backend/controllers/ReportController.js - Report records
backend/models/Report.js
Other components
- Student
- Moderator
- Administrator
Connections 47
- Student → Routes and app: uses
frontend-v2/src/App.jsx - Moderator → Routes and app: uses
frontend-v2/src/App.jsx - Administrator → Routes and app: uses
frontend-v2/src/App.jsx - Routes and app → Login and signup: routes to
frontend-v2/src/App.jsx - Routes and app → Resource browsing: routes to
frontend-v2/src/App.jsx - Routes and app → Resource uploads: routes to
frontend-v2/src/App.jsx - Routes and app → My resources: routes to
frontend-v2/src/App.jsx - Routes and app → Saved resources: routes to
frontend-v2/src/App.jsx - Routes and app → Profile and streak: routes to
frontend-v2/src/App.jsx - Routes and app → Moderation and admin: routes to
frontend-v2/src/App.jsx - Routes and app → Admin user management: routes to
frontend-v2/src/App.jsx - Login and signup → Authentication client: authenticates via
frontend-v2/src/pages/Signup.jsx - Authentication client → HTTP API client: posts auth requests
frontend-v2/src/services/authService.js - Resource browsing → Resource service: uses
frontend-v2/src/pages/dashboard/Resources.jsx - Resource browsing → Saved service: uses
frontend-v2/src/pages/dashboard/Resources.jsx - Resource browsing → Report service: uses
frontend-v2/src/pages/dashboard/Resources.jsx - Resource uploads → Resource service: submits
- My resources → Resource service: manages
- Saved resources → Saved service: uses
- Profile and streak → HTTP API client: uses
- Moderation and admin → Admin service: uses
- Admin user management → Admin service: uses
frontend-v2/src/pages/admin/AdminUsers.jsx - Resource service → HTTP API client: uses
- Admin service → HTTP API client: uses
frontend-v2/src/services/adminService.js - Saved service → HTTP API client: uses
- Report service → HTTP API client: uses
- Express server → Authentication routes: mounts
backend/index.js - Express server → Resource routes: mounts
backend/index.js - Express server → User routes: mounts
backend/index.js - Express server → Report routes: mounts
backend/index.js - Authentication routes → Signup and login: dispatches
backend/routes/AuthRouter.js - Resource routes → Resource operations: dispatches
backend/routes/ResourceRouter.js - Resource routes → Upload validation: validates uploads
backend/routes/ResourceRouter.js - Resource routes → JWT and roles: guards routes
backend/routes/ResourceRouter.js - User routes → JWT and roles: guards routes
backend/routes/UserRouter.js - User routes → Profile and saved actions: dispatches
backend/routes/UserRouter.js - User routes → User administration: dispatches
backend/routes/UserRouter.js - Report routes → Report workflow: dispatches
backend/routes/ReportRouter.js - Report routes → JWT and roles: guards routes
backend/routes/ReportRouter.js - Resource operations → Resource records: reads and writes
backend/controllers/ResourceController.js - Resource operations → Cloudinary files: uploads files
backend/controllers/ResourceController.js - Resource operations → User records: uses user identity
- Profile and saved actions → User records: reads and writes
backend/controllers/UserController.js - User administration → User records: reads and writes
backend/controllers/AdminUserController.js - Signup and login → User records: authenticates users
backend/controllers/AuthController.js - Report workflow → Report records: reads and writes
backend/controllers/ReportController.js - Report workflow → Resource records: checks resource
backend/controllers/ReportController.js