- Golang
- Gin Gonic
- GORM
- gocron
- gorilla/websocket
- OAuth2 providers (Google, Yandex, Mail.ru)
- Geocoding providers (Graphhoper, Here, LocationIQ, OpenStreetMap (Nominatim), Yandex)
- PostgreSQL (PostGIS, gin)
- Redis
- MinIO
- WebSockets
- Nginx
- Mailhog
- Testcontainers
- K6
- Docker
- Git
- Make
- EditorConfig
Here you describe how to run project locally
To launch a project, you need:
Сlone this project:
git clone https://github.com/mandarine-io/Backend
YAML configuration file contains all base application settings.
Use the config/config.example.yaml
as reference to create your configuration file:
cp config/config.example.yaml config/config.yaml
nano config/config.yaml
To overwrite some properties from YAML file, you can use environment variables.
Use the config/.env.example
as reference to create your env file .env
:
cp config/.env.example .env
nano .env
To start server, you can run Makefile command:
make start
or you can run manually to use custom YAML config file and environment variables file:
go mod tidy
go build -o build/server cmd/api
MANDARINE_CONFIG_FILE=config/config.yaml ./build/server
To start server with hot reload (development mode), you can run Makefile command:
make start.dev
To format code, you can run Makefile command:
make format
With fixing found issues:
make format.fix
All linters and its settings describes file golangcli.yaml
. To run linters, you can execute Makefile
command:
make lint
With fixing found issues:
make lint.fix
The system is covered with various types of tests.
Created unit tests for services, various custom managers and clients, and util functions:
make test.unit
After finishing, you can see the results in the logs/unit-test
folder (logs and coverage reports).
The main business scenarios are covered with e2e tests, and for them a test environment is deployed in Docker containers:
make test.e2e
After finishing, you can see the results in the logs/e2e-test
folder (logs and coverage reports).
To test the system under load and identify bottlenecks, load tests are written:
make test.load LOAD_TEST_NAME=<test-file-name>
After finishing, you can see the results in the logs/load-test
folder (logs and performance reports).
This project is licensed under the Apache 2.0 License.