How rahulkumar971/studyhub works
StudyHub is a student-facing study-material library with an admin path for uploading and managing resources. Students sign in, search and filter a paginated catalog, open or download materials, and save items to a personal collection; admins can add and delete resources. The graph also preserves registration, feedback, and seeding capabilities visible in the repository. Backend route and model calls are based on excerpts; some frontend-to-API links are only indicated as unverified because those page implementations were not sampled.
Main entry points: resourceRoutes.js Resource endpoints · App.jsx App and routing · server.js Express server · Home.jsx Resource search
Components 26
Student application
- App and routing
frontend/src/App.jsx - Navigation
frontend/src/components/Navbar.jsx - Resource search
frontend/src/pages/Home.jsx - Resource actions
frontend/src/components/ResourceCard.jsx - Loading placeholders
frontend/src/components/SkeletonLoader.jsx - Saved collection
frontend/src/pages/Collection.jsx - Admin dashboard
frontend/src/pages/AdminDashboard.jsx - Feedback form
frontend/src/pages/Feedback.jsx - Login page
frontend/src/pages/Login.jsx - Registration page
frontend/src/pages/Register.jsx
API and workflows
- Express server
backend/server.js - Authentication routes
backend/routes/authRoutes.js - Authentication logic
backend/controllers/authController.js - Access control
backend/middleware/auth.js - Resource endpoints
backend/routes/resourceRoutes.js - Feedback endpoint
backend/routes/feedbackRoutes.js - Sample data seeding
backend/routes/seedRoutes.js - Upload middleware
backend/middleware/upload.js
Persistence and files
- User records
backend/models/User.js - Resource records
backend/models/Resource.js - Feedback records
backend/models/Feedback.js - ImageKit configuration
backend/config/imagekit.js
Other components
- Student
- Admin
- MongoDB
- ImageKit file service
Connections 39
- Student → App and routing: uses
frontend/src/App.jsx - Admin → App and routing: uses
frontend/src/App.jsx - App and routing → Navigation: renders
frontend/src/App.jsx - App and routing → Resource search: routes to
frontend/src/App.jsx - App and routing → Saved collection: routes to
frontend/src/App.jsx - App and routing → Admin dashboard: routes to
frontend/src/App.jsx - App and routing → Feedback form: routes to
frontend/src/App.jsx - App and routing → Login page: routes to
frontend/src/App.jsx - App and routing → Registration page: routes to
frontend/src/App.jsx - Resource search → Resource endpoints: fetches resources
frontend/src/pages/Home.jsx - Resource search → Resource actions: renders
frontend/src/pages/Home.jsx - Resource search → Loading placeholders: renders loading
frontend/src/pages/Home.jsx - Saved collection → Resource actions: renders
frontend/src/pages/Collection.jsx - Saved collection → Loading placeholders: renders loading
frontend/src/pages/Collection.jsx - Resource actions → Resource endpoints: saves or deletes
frontend/src/components/ResourceCard.jsx - Express server → Authentication routes: mounts
backend/server.js - Express server → Resource endpoints: mounts
backend/server.js - Express server → Feedback endpoint: mounts
backend/server.js - Express server → Sample data seeding: mounts
backend/server.js - Express server → MongoDB: connects
backend/server.js - Authentication routes → Authentication logic: dispatches
backend/routes/authRoutes.js - Authentication logic → User records: reads and saves
backend/controllers/authController.js - Access control → User records: loads user
backend/middleware/auth.js - Resource endpoints → Resource records: queries and saves
backend/routes/resourceRoutes.js - Resource endpoints → User records: reads and updates
backend/routes/resourceRoutes.js - Resource endpoints → Access control: guards routes
backend/routes/resourceRoutes.js - Resource endpoints → Upload middleware: processes uploads
backend/routes/resourceRoutes.js - Resource endpoints → ImageKit configuration: uses client
backend/routes/resourceRoutes.js - Resource endpoints → ImageKit file service: uploads or deletes files
backend/routes/resourceRoutes.js - Feedback endpoint → Feedback records: saves feedback
backend/routes/feedbackRoutes.js - Sample data seeding → Resource records: inserts sample records
backend/routes/seedRoutes.js - MongoDB → User records: stores
- MongoDB → Resource records: stores
- MongoDB → Feedback records: stores
- Login page → Authentication routes: submits credentials
- Registration page → Authentication routes: submits registration
- Admin dashboard → Resource endpoints: manages resources
- Feedback form → Feedback endpoint: submits feedback
- Saved collection → Resource endpoints: loads saved items