How fiftysaw-png/todorest works
This is a small in-memory ToDo REST API. A client sends requests to the HTTP server, whose routes dispatch to handlers; handlers decode and validate JSON, invoke task-list operations, and serialize results or errors. The domain layer stores tasks in a mutex-protected map and models completion state. The README documents different endpoint methods and IDs than the sampled router, so the graph follows the implemented routes. No persistent or external service is shown.
Main entry points: handlers.go Request Handlers · list.go Task List · main.go Application Setup · server.go HTTP Server
Components 8
Runtime
- Application Setup
main.go
HTTP API
- HTTP Server
http/server.go - Request Handlers
http/handlers.go - JSON DTOs
http/dto.go
Task Domain
- Task List
todo/list.go - Task Model
todo/task.go - Domain Errors
todo/errors.go
Other components
- API Client
Connections 11
- Application Setup → Task List: creates
main.go - Application Setup → Request Handlers: constructs
main.go - Application Setup → HTTP Server: starts
main.go - API Client → HTTP Server: sends requests
README.md - HTTP Server → Request Handlers: routes requests
http/server.go - Request Handlers → JSON DTOs: decodes and validates
http/handlers.go - Request Handlers → Task List: invokes operations
http/handlers.go - Request Handlers → Task Model: creates tasks
http/handlers.go - Request Handlers → Domain Errors: checks errors
http/handlers.go - Task List → Task Model: updates completion
todo/list.go - Task List → Domain Errors: returns errors
todo/list.go