A simple yet complete todo API written in Go, allowing users to register accounts and manage their own tasks. The project also provides Swagger documentation for easy API interaction.
Clone the repo, install the dependencies, copy .env.example
contents to .env
and fill in the required fields
~ git clone [email protected]:krau5/hyper-todo.git
~ go mod download
~ cp .env.example .env
The application can be launched in two ways:
make dev
- run in development mode (API with Air for hot-reload, other services in Docker)make prod
- run everything in Docker (production mode)
- Gin for simplified http routing
- Gorm for DB interactions
- Project architecture inspired by go-clean-arch
- Cookie-based JWT authentication for simplicity and security
- Swag to generate RESTful API documentation with Swagger 2.0.
- Github Actions for CI
make build
- compiles the applicationmake test
- runs all the testsmake run
- builds and runs the application in release modemake generate-swagger
- parses annotations to generate Swagger specificationsmake dev
- launches development environment (API with Air for hot-reload, other services in Docker)make prod
- launches production environment with all services running in Dockermake dev-down
- stops the development environmentmake prod-down
- stops the production environment