How rohitsingh93300/mern-blog works
This is a MERN blogging application: readers browse and search published posts, while signed-in users manage profiles, publish and edit blogs, and discuss them through comments. The backend exposes user, blog, and comment APIs, with Mongo-backed models and Cloudinary image handling. The graph includes the documented-by-source-index frontend route surface, but frontend API calls are not shown in the excerpts, so those links are omitted; unsampled route wiring is supported only where the source index names it.
Main entry points: App.jsx Route application · blog.controller.js Blog operations · server.js Express server · user.route.js User routes
Components 31
Web application
- Route application
frontend/src/App.jsx - Redux store
frontend/src/redux/Store.js - Navigation
frontend/src/components/Navbar.jsx - Responsive menu
frontend/src/components/ResponsiveMenu.jsx - Home and discovery
frontend/src/pages/Home.jsx - Blog browsing
frontend/src/pages/Blog.jsx - Blog detail
frontend/src/pages/BlogView.jsx - Search results
frontend/src/pages/SearchList.jsx - Create blog
frontend/src/pages/CreateBlog.jsx - Edit blog
frontend/src/pages/UpdateBlog.jsx - Author blogs
frontend/src/pages/YourBlog.jsx - Comment management
frontend/src/pages/Comments.jsx - Profile
frontend/src/pages/Profile.jsx - Sign in
frontend/src/pages/Login.jsx - Registration
frontend/src/pages/Signup.jsx
API routing
- Express server
backend/server.js - User routes
backend/routes/user.route.js - Blog routes
backend/routes/blog.route.js - Comment routes
backend/routes/comment.route.js - MongoDB connection
backend/database/db.js
Blog and discussion
- Blog operations
backend/controllers/blog.controller.js - Blog records
backend/models/blog.model.js - Comment operations
backend/controllers/comment.controller.js - Comment records
backend/models/comment.model.js
Identity and media
- JWT authentication
backend/middleware/isAuthenticated.js - File upload
backend/middleware/multer.js - User operations
backend/controllers/user.controller.js - User records
backend/models/user.model.js - Image hosting
backend/utils/cloudinary.js - Image data conversion
backend/utils/dataUri.js
Other components
- Reader or author
Connections 35
- Reader or author → Route application: opens
frontend/src/App.jsx - Route application → Home and discovery: routes to
frontend/src/App.jsx - Route application → Blog browsing: routes to
frontend/src/App.jsx - Route application → Blog detail: routes to
frontend/src/App.jsx - Route application → Search results: routes to
frontend/src/App.jsx - Route application → Create blog: routes to
frontend/src/App.jsx - Route application → Edit blog: routes to
frontend/src/App.jsx - Route application → Author blogs: routes to
frontend/src/App.jsx - Route application → Comment management: routes to
frontend/src/App.jsx - Route application → Profile: routes to
frontend/src/App.jsx - Route application → Sign in: routes to
frontend/src/App.jsx - Route application → Registration: routes to
frontend/src/App.jsx - Route application → Navigation: renders
frontend/src/App.jsx - Navigation → Responsive menu: uses
frontend/src/components/Navbar.jsx - Express server → MongoDB connection: connects
backend/server.js - Express server → User routes: mounts
backend/server.js - Express server → Blog routes: mounts
backend/server.js - Express server → Comment routes: mounts
backend/server.js - User routes → User operations: dispatches
backend/routes/user.route.js - Blog routes → Blog operations: dispatches
backend/routes/blog.route.js - Comment routes → Comment operations: dispatches
backend/routes/comment.route.js - User routes → JWT authentication: guards
backend/routes/user.route.js - Blog routes → JWT authentication: guards
backend/routes/blog.route.js - Comment routes → JWT authentication: guards
backend/routes/comment.route.js - Blog routes → File upload: uploads
backend/routes/blog.route.js - User routes → File upload: uploads
backend/routes/user.route.js - User operations → User records: reads and writes
backend/controllers/user.controller.js - Blog operations → Blog records: reads and writes
backend/controllers/blog.controller.js - Blog operations → Comment records: deletes related
backend/controllers/blog.controller.js - Comment operations → Comment records: reads and writes
backend/controllers/comment.controller.js - Comment operations → Blog records: updates references
backend/controllers/comment.controller.js - Blog operations → Image hosting: uploads images
backend/controllers/blog.controller.js - Blog operations → Image data conversion: converts uploads
backend/controllers/blog.controller.js - User operations → Image hosting: uploads images
backend/controllers/user.controller.js - User operations → Image data conversion: converts uploads
backend/controllers/user.controller.js