How thurpe/mern-blog works
This is a MERN blogging application: visitors browse and search posts, authenticate, read posts and comments, while authenticated users and administrators access account and content-management views. The client routes pages and calls the Express API; controllers implement authentication, user, post, and comment operations backed by MongoDB models. Source excerpts directly show search fetching posts and Google OAuth posting to the API; other client/API links and several route-to-controller bindings are not asserted where their implementation was not sampled.
Main entry points: index.js HTTP server · App.jsx App routing · OAuth.jsx Google sign-in · Search.jsx Post search
Components 24
Web client
- App routing
client/src/App.jsx - Sign-in/up pages
client/src/pages/SignIn.jsx - Post search
client/src/pages/Search.jsx - Post views/editing
client/src/pages/PostPage.jsx - Dashboard views
client/src/pages/Dashboard.jsx - Comment interface
client/src/components/CommentSection.jsx - Client state
client/src/redux/store.js
API services
- HTTP server
api/index.js - Auth routes
api/routes/auth.route.js - Authentication
api/controllers/auth.controller.js - User management
api/controllers/user.controller.js - Post management
api/controllers/post.controller.js - Comment management
api/controllers/comment.controller.js - User routes
api/routes/user.route.js - Post routes
api/routes/post.route.js - Comment routes
api/routes/comment.route.js
Persistence
- User records
api/models/user.model.js - Post records
api/models/post.model.js - Comment records
api/models/comment.model.js
Identity integrations
- Google sign-in
client/src/components/OAuth.jsx - Firebase auth
client/src/firebase.js
Other components
- Visitor
- MongoDB
- Google identity
Connections 20
- Visitor → App routing: browses
- App routing → Sign-in/up pages: routes
- App routing → Post search: routes
- App routing → Post views/editing: routes
- App routing → Dashboard views: routes
- App routing → Client state: renders with
- Post search → HTTP server: fetches posts
- Google sign-in → Firebase auth: uses auth
- Google sign-in → Google identity: signs in
- Google sign-in → HTTP server: posts identity
- HTTP server → Auth routes: mounts
- HTTP server → User routes: mounts
- HTTP server → Post routes: mounts
- HTTP server → Comment routes: mounts
- Auth routes → Authentication: routes auth calls
- Authentication → User records: reads/writes
- User management → User records: reads/writes
- Post management → Post records: reads/writes
- Comment management → Comment records: reads/writes
- HTTP server → MongoDB: connects