How wiem-kb/mern-todo works
MERN Todo is a single-user task manager: users add tasks, view the list, edit task text, toggle completion, and delete tasks. The React interface sends CRUD requests to an Express API; its controller validates and operates on Mongoose task records stored in MongoDB. The graph includes the principal UI components and backend layers. Frontend-to-API links are dashed because the configured API base URL is not shown, though the client requests and server routes are present.
Main entry points: ListItem.jsx Task actions · todoRoutes.js Todo routes · index.js Server setup · ToDoList.jsx Task form and fetch
Components 11
React interface
- App shell
client/src/App.jsx - Task form and fetch
client/src/ToDoList.jsx - Task actions
client/src/ListItem.jsx - Loading skeleton
client/src/ListItemSkeleton.jsx - Action tooltips
client/src/Tooltip.jsx
Express API
- Server setup
server/index.js - Todo routes
server/routes/todoRoutes.js - Todo operations
server/controllers/todoController.js
Task persistence
- Todo model
server/models/todoModel.js - MongoDB
Other components
- User
Connections 12
- User → App shell: uses
README.md - App shell → Task form and fetch: renders
client/src/App.jsx - Task form and fetch → Task actions: renders
client/src/ToDoList.jsx - Task actions → Action tooltips: wraps actions
client/src/ListItem.jsx - Task actions → Loading skeleton: shows while loading
client/src/ListItem.jsx - Task form and fetch → Todo routes: requests task CRUD
- Task actions → Todo routes: requests task updates
- Server setup → Todo routes: mounts routes
server/index.js - Server setup → Todo operations: serves root handler
server/index.js - Todo routes → Todo operations: dispatches requests
server/routes/todoRoutes.js - Todo operations → Todo model: queries records
server/controllers/todoController.js - Server setup → MongoDB: connects to
server/index.js