How kalyandev01/peer_project_hub works
This is a project showcase application: users browse projects, create or edit their own submissions, and engage through comments and ratings. The frontend routes users to project and discussion views, with React contexts managing project and comment API calls; Firebase supplies authentication. The Express backend exposes project, comment, and rating endpoints, which controllers delegate to services and MongoDB models. The source index supports the main routing and service relationships; rating UI-to-API wiring and some database configuration details were not sampled, so those links are omitted.
Main entry points: App.jsx Route shell · ProjectContext.jsx Project state · server.js Express API · ProjectDetails.jsx Project details
Components 31
Frontend experience
- Route shell
frontend/src/App.jsx - Project discovery
frontend/src/pages/Home.jsx - Project details
frontend/src/pages/ProjectDetails.jsx - Project creation
frontend/src/components/CreateProject.jsx - Project editing
frontend/src/components/EditProject.jsx - Project card
frontend/src/components/ProjectCard.jsx - Comment feed
frontend/src/pages/AllComments.jsx - Project comments
frontend/src/components/CommentSection.jsx - Project ratings
frontend/src/components/RatingSection.jsx - Login
frontend/src/pages/Login.jsx - Signup
frontend/src/pages/Signup.jsx - Navigation
frontend/src/components/Navbar.jsx - Auth form
frontend/src/components/Form.jsx
Client state and auth
- Project state
frontend/src/contexts/ProjectContext.jsx - Comment state
frontend/src/contexts/CommentContext.jsx - Firebase auth client
frontend/src/firebase.js
Backend API
- Express API
backend/src/server.js - Project routes
backend/src/routes/project.js - Comment routes
backend/src/routes/comment.js - Rating routes
backend/src/routes/rating.js - Project controller
backend/src/controller/projectController.js - Comment controller
backend/src/controller/commentController.js - Rating controller
backend/src/controller/ratingController.js - Project service
backend/src/service/projectService.js - Comment service
backend/src/service/commentService.js - Rating service
backend/src/service/ratingService.js
Domain persistence
- Project model
backend/src/model/project.js - Comment model
backend/src/model/comment.js - Rating model
backend/src/model/rating.js - Database connection
backend/src/config/db.js
Other components
- User
Connections 42
- User → Route shell: uses
frontend/src/App.jsx - Route shell → Project discovery: routes to
frontend/src/App.jsx - Route shell → Project details: routes to
frontend/src/App.jsx - Route shell → Project creation: routes to
frontend/src/App.jsx - Route shell → Project editing: routes to
frontend/src/App.jsx - Route shell → Comment feed: routes to
frontend/src/App.jsx - Route shell → Login: routes to
frontend/src/App.jsx - Route shell → Signup: routes to
frontend/src/App.jsx - Route shell → Navigation: renders
frontend/src/App.jsx - Route shell → Project state: provides
frontend/src/App.jsx - Route shell → Comment state: provides
frontend/src/App.jsx - Project discovery → Project state: reads
frontend/src/pages/Home.jsx - Project discovery → Project card: renders
frontend/src/pages/Home.jsx - Project details → Project state: reads
frontend/src/pages/ProjectDetails.jsx - Project details → Project comments: renders
frontend/src/pages/ProjectDetails.jsx - Project details → Project ratings: renders
frontend/src/pages/ProjectDetails.jsx - Project creation → Project state: submits through
frontend/src/components/CreateProject.jsx - Project editing → Project state: updates through
frontend/src/components/EditProject.jsx - Comment feed → Comment state: reads
frontend/src/pages/AllComments.jsx - Project comments → Comment state: uses
frontend/src/components/CommentSection.jsx - Login → Auth form: renders
frontend/src/pages/Login.jsx - Signup → Auth form: renders
frontend/src/pages/Signup.jsx - Login → Firebase auth client: authenticates with
frontend/src/pages/Login.jsx - Signup → Firebase auth client: authenticates with
frontend/src/pages/Signup.jsx - Project state → Express API: HTTP requests
frontend/src/contexts/ProjectContext.jsx - Comment state → Express API: HTTP requests
frontend/src/contexts/CommentContext.jsx - Project state → Firebase auth client: reads auth
frontend/src/contexts/ProjectContext.jsx - Express API → Project routes: mounts
backend/src/server.js - Express API → Comment routes: mounts
backend/src/server.js - Express API → Rating routes: mounts
backend/src/server.js - Project routes → Project controller: dispatches
backend/src/routes/project.js - Comment routes → Comment controller: dispatches
backend/src/routes/comment.js - Rating routes → Rating controller: dispatches
backend/src/routes/rating.js - Project controller → Project service: delegates
backend/src/controller/projectController.js - Project controller → Project model: checks ownership
backend/src/controller/projectController.js - Comment controller → Comment service: delegates
backend/src/controller/commentController.js - Comment controller → Comment model: checks ownership
backend/src/controller/commentController.js - Rating controller → Rating service: delegates
backend/src/controller/ratingController.js - Project service → Project model: reads and writes
backend/src/service/projectService.js - Comment service → Comment model: reads and writes
backend/src/service/commentService.js - Rating service → Rating model: reads and writes
backend/src/service/ratingService.js - Express API → Database connection: connects through
backend/src/server.js