Task management system designed to improve task organisation and monitoring. It allows users to create, manage and track tasks.
This project is an example of a supporting backend application in the Go
language.
It aims to combine high-performance backend with Domain-Driven Design (DDD)
and Clean Architecture techniques.
Specifically, anemic models were opted as a pattern within the Domain-Driven Design approach
- Clean Architecture. The architecture prioritizes encapsulating business logic and domain concerns. Specific implementations of database/web/events/logging/other are not emphasized.
- High Performance. Designed with a focus on delivering efficient performance and low latency.
- Minimal dependencies. Using Go's rich standard library and idiomatic problem-solving approaches to minimize external dependencies. The project maximizes Go's capabilities.
- Minimal amount of database requests. Aiming for optimal performance by minimizing the number of database requests. Some Domain-Driven Design (DDD) or Clean Architecture (CA) applications suffer from IO performance issues due to excessive querying or complex domain object reconstruction. This project seeks to strike a balance that is easily comprehensible for humans while being less IO bound.
Run infrastructure dependencies
docker-compose up -d
Run a web application
go run ./src/cmd/rest_api
├── src - source code root
│ ├── application - applied logic of the service, including usecases and required interfaces
│ ├── cmd - entrypoints
│ ├── domain - domain entities
│ ├── storage_adapter - data-related implementations of interfaces that are required by applied logic layer
│ └── transport
│ └── rest_api
│ ├── app
│ │ ├── app.go
│ │ └── factory
│ ├── microframework
└── swagger
├── openapi.json - openapi specification rendering by swagger.
├── ... - the rest of the files are permanent immutable and need to render swagger from openapi.json.
curl -X POST 'localhost:8080/api/register' -d '{"username": "MyUsername", "password": "example"}'
{"username":"MyUsername"}
curl -X POST 'localhost:8080/api/tasks' -d '{"description": "code"}' -H 'Authorization: Basic ...'
{"task_id":1,"description":"code","stage":"todo"}
curl -X PATCH 'localhost:8080/api/tasks/1' -d '{"stage": "done"}' -H 'Authorization: Basic ...'
{"task_id":1}
curl -X GET 'localhost:8080/api/tasks' -H 'Authorization: Basic ...'
[{"task_id":1,"description":"code","stage":"todo"}]
Still in progress.