How praveenbanot/blog-application works
Blog Market is a full-stack blogging application. Readers browse and search posts, open details, and comment; signed-in users can create, edit, and delete posts, and view profiles and their own posts. The frontend routes these experiences and maintains a refetched user session, while the Express backend exposes authentication, user, post, and comment routes backed by MongoDB models. The excerpts show post-detail and session API calls; other page-to-API links are not verified here, so those connections are omitted.
Main entry points: App.jsx Route application · comments.js Comment routes · posts.js Post routes · index.js API server
Components 28
Frontend experience
- Route application
Blog_app-master/frontend/src/App.jsx - Home and search
Blog_app-master/frontend/src/pages/Home.jsx - Post listings
Blog_app-master/frontend/src/components/HomePosts.jsx - Post details
Blog_app-master/frontend/src/pages/PostDetails.jsx - Comment display
Blog_app-master/frontend/src/components/Comment.jsx - Create post
Blog_app-master/frontend/src/pages/CreatePost.jsx - Edit post
Blog_app-master/frontend/src/pages/EditPost.jsx - Author posts
Blog_app-master/frontend/src/pages/MyBlogs.jsx - User profile
Blog_app-master/frontend/src/pages/Profile.jsx - Profile listings
Blog_app-master/frontend/src/components/ProfilePosts.jsx - API and image URLs
Blog_app-master/frontend/src/url.js - Navigation bar
Blog_app-master/frontend/src/components/Navbar.jsx - User menu
Blog_app-master/frontend/src/components/Menu.jsx - Footer
Blog_app-master/frontend/src/components/Footer.jsx - Loading indicator
Blog_app-master/frontend/src/components/Loader.jsx
Identity
- Login
Blog_app-master/frontend/src/pages/Login.jsx - Registration
Blog_app-master/frontend/src/pages/Register.jsx - Session context
Blog_app-master/frontend/src/context/UserContext.jsx - Authentication routes
Blog_app-master/backend/routes/auth.js - Token verification
Blog_app-master/backend/verifyToken.js
Posts and comments
- Post routes
Blog_app-master/backend/routes/posts.js - Comment routes
Blog_app-master/backend/routes/comments.js - Post records
Blog_app-master/backend/models/Post.js - Comment records
Blog_app-master/backend/models/Comment.js
Backend and data
- API server
Blog_app-master/backend/index.js - User routes
Blog_app-master/backend/routes/users.js - User records
Blog_app-master/backend/models/User.js
Other components
- Reader or author
Connections 30
- Reader or author → Route application: uses
- Route application → Home and search: routes to
Blog_app-master/frontend/src/App.jsx - Route application → Login: routes to
Blog_app-master/frontend/src/App.jsx - Route application → Registration: routes to
Blog_app-master/frontend/src/App.jsx - Route application → Post details: routes to
Blog_app-master/frontend/src/App.jsx - Route application → Create post: routes to
Blog_app-master/frontend/src/App.jsx - Route application → Edit post: routes to
Blog_app-master/frontend/src/App.jsx - Route application → Author posts: routes to
Blog_app-master/frontend/src/App.jsx - Route application → User profile: routes to
Blog_app-master/frontend/src/App.jsx - Route application → Session context: provides session
Blog_app-master/frontend/src/App.jsx - Home and search → Post listings: renders
Blog_app-master/frontend/src/pages/Home.jsx - Author posts → Post listings: renders
Blog_app-master/frontend/src/pages/MyBlogs.jsx - User profile → Profile listings: renders
Blog_app-master/frontend/src/pages/Profile.jsx - Post details → Comment display: renders
Blog_app-master/frontend/src/pages/PostDetails.jsx - Navigation bar → User menu: renders
Blog_app-master/frontend/src/components/Navbar.jsx - Session context → Authentication routes: refetches session
Blog_app-master/frontend/src/context/UserContext.jsx - Post details → Post routes: fetches and deletes
Blog_app-master/frontend/src/pages/PostDetails.jsx - Post details → Comment routes: fetches and adds
Blog_app-master/frontend/src/pages/PostDetails.jsx - Authentication routes → User records: reads and writes
Blog_app-master/backend/routes/auth.js - Post routes → Post records: reads and writes
Blog_app-master/backend/routes/posts.js - Post routes → Comment records: deletes comments
Blog_app-master/backend/routes/posts.js - Comment routes → Comment records: uses records
Blog_app-master/backend/routes/comments.js - Comment routes → Post records: uses records
Blog_app-master/backend/routes/comments.js - Comment routes → User records: uses records
Blog_app-master/backend/routes/comments.js - Post routes → Token verification: guards mutations
Blog_app-master/backend/routes/posts.js - Comment routes → Token verification: checks access
Blog_app-master/backend/routes/comments.js - API server → Authentication routes: mounts routes
Blog_app-master/backend/index.js - API server → User routes: mounts routes
Blog_app-master/backend/index.js - API server → Post routes: mounts routes
Blog_app-master/backend/index.js - API server → Comment routes: mounts routes
Blog_app-master/backend/index.js