How aakif9866/mern-blog works
This is a MERN blogging platform: readers browse and search posts, while users authenticate, comment, and manage profiles; administrators can manage posts, users, and comments. The React client calls an Express API backed by Mongoose models. The graph shows the documented content, auth, and admin capabilities, but some client-to-API calls and unsampled page details are not visible in the excerpts, so those links are omitted or marked unverified.
Main entry points: App.jsx React routes · OAuth.jsx Google sign-in · DashboardComp.jsx Admin dashboard · post.route.js Post routes
Components 31
Reading and discovery
- React routes
client/src/App.jsx - Home feed
client/src/pages/Home.jsx - Post search
client/src/pages/Search.jsx - Post and comments
client/src/pages/PostPage.jsx - Comment section
client/src/components/CommentSection.jsx - Post card
client/src/components/PostCard.jsx
Authoring and administration
- Post editor
client/src/pages/CreatePost.jsx - Post updater
client/src/pages/UpdatePost.jsx - Admin dashboard
client/src/components/DashboardComp.jsx - Post management
client/src/components/DashPost.jsx - User management
client/src/components/DashUsers.jsx - Comment management
client/src/components/DashComments.jsx
Identity and client state
- Sign-in and signup
client/src/pages/SignIn.jsx - Google sign-in
client/src/components/OAuth.jsx - Firebase auth client
client/src/firebase.js - User state
client/src/redux/user/userSlice.js
REST API
- Auth routes
api/routes/auth.route.js - Auth controller
api/controller/auth.controller.js - Post routes
api/routes/post.route.js - Post controller
api/controller/post.controller.js - Comment routes
api/routes/comment.route.js - Comment controller
api/controller/comment.controller.js - User routes
api/routes/user.route.js - User controller
api/controller/user.controller.js - JWT verification
api/utils/verifyUser.js
Persistence
- Post records
api/models/post.model.js - Comment records
api/models/comment.model.js - User records
api/models/user.model.js
Other components
- Visitor or user
- Google identity
- MongoDB
Connections 34
- Visitor or user → React routes: uses
client/src/App.jsx - React routes → Home feed: routes to
client/src/App.jsx - React routes → Post search: routes to
client/src/App.jsx - React routes → Post and comments: routes to
client/src/App.jsx - React routes → Admin dashboard: routes to
client/src/App.jsx - Home feed → Post card: renders
client/src/pages/Home.jsx - Post search → Post card: renders
client/src/pages/Search.jsx - Post and comments → Comment section: renders
client/src/pages/PostPage.jsx - Visitor or user → Sign-in and signup: authenticates
README.md - Sign-in and signup → Google sign-in: offers
client/src/pages/SignIn.jsx - Google sign-in → Firebase auth client: authenticates with
client/src/components/OAuth.jsx - Google sign-in → Google identity: signs in via
client/src/components/OAuth.jsx - Google sign-in → Auth routes: posts Google login
client/src/components/OAuth.jsx - Google sign-in → User state: updates
client/src/components/OAuth.jsx - Sign-in and signup → User state: updates
client/src/pages/SignIn.jsx - Post editor → Post routes: submits post
- Post updater → Post routes: updates post
- Admin dashboard → Post management: selects
client/src/pages/Dashboard.jsx - Admin dashboard → User management: selects
client/src/pages/Dashboard.jsx - Admin dashboard → Comment management: selects
client/src/pages/Dashboard.jsx - Auth routes → Auth controller: dispatches
api/routes/auth.route.js - Post routes → Post controller: dispatches
api/routes/post.route.js - Comment routes → Comment controller: dispatches
api/routes/comment.route.js - User routes → User controller: dispatches
api/routes/user.route.js - Post routes → JWT verification: protects routes
api/routes/post.route.js - Comment routes → JWT verification: protects routes
api/routes/comment.route.js - User routes → JWT verification: protects routes
api/routes/user.route.js - Auth controller → User records: reads and writes
api/controller/auth.controller.js - Post controller → Post records: reads and writes
api/controller/post.controller.js - Comment controller → Comment records: reads and writes
api/controller/comment.controller.js - User controller → User records: reads and writes
api/controller/user.controller.js - User records → MongoDB: persists in
README.md - Post records → MongoDB: persists in
README.md - Comment records → MongoDB: persists in
README.md