How daria-k15/todo-app works
This is a full-stack todo app: users manage prioritized tasks in a React interface, while the frontend hook and API client send requests to an Express backend that validates and updates in-memory state. The app also displays todo statistics and persists the theme choice in browser storage. The route-to-service flow is supported by sampled source; component internals beyond App and useTodos are represented only where the README documents their capabilities.
Main entry points: App.tsx App · app.js Express app · todoController.js Controller · todoService.js Todo service
Components 18
Todo interface
- App
frontend/src/App.tsx - Todo state
frontend/src/hooks/useTodos.ts - API client
frontend/src/services/todoService.ts - Todo form
frontend/src/components/TodoForm.tsx - Todo list
frontend/src/components/TodoList.tsx - Todo item
frontend/src/components/TodoItem.tsx - Stats view
frontend/src/components/TodoStats.tsx
API layer
- Todo routes
backend/src/routes/todoRoutes.js - Controller
backend/src/controller/todoController.js - Express app
backend/src/app.js - HTTP server
backend/server.js
Todo domain
- Todo service
backend/src/service/todoService.js - Todo model
backend/src/models/todoModel.js - In-memory store
backend/src/config/database.js
App support
- Error handler
backend/src/middleware/errorHandler.js - API docs
backend/src/docs/swagger.js - Browser storage
Other components
- User
Connections 17
- User → App: uses
- App → Todo state: reads state
- App → Todo form: renders
- App → Todo list: renders
- App → Stats view: renders
- App → Browser storage: reads/writes theme
- Todo state → API client: calls
- API client → Todo routes: HTTP requests
- HTTP server → Express app: starts
- Express app → Todo routes: mounts
- Todo routes → Controller: dispatches
- Controller → Todo service: calls
- Todo service → Todo model: creates
- Todo service → In-memory store: reads/writes
- Controller → Error handler: forwards errors
- Express app → Error handler: registers
- Express app → API docs: serves docs