You can check it at GridU public repository
Application is made of two microservices

Directory naming follows project-layout standatrs
API documentation for each microservice can be found if api directories
Important: for the study purpose I used the same database for locations and logging. In a real project it must be separated storages
You can run all the required infrastructure using the command
make dev-services
it will start both databases and the monitoring services.
- Open
http://localhost:8007to access the adminer panel - Open
http://localhost:8004to access the kibana panel
There is a migration app in tools/migrate/migrate.go, which allows you to control the users database structure.
Source to the library and documentation
TLDR:
- Files in
users/migrationsrepresent migrations. Bothupanddownmigrations required go run tools/migrate/migrate.go upto setup databasego run tools/migrate/migrate.go 7to set specific versiongo run tools/migrate/migrate.go dropyou never want to use it on your production server
make run-locationsto run the locations servicemake run-usersto run the users service
Tests do not require database being up and migrated, because in unit cases the fake storage is always used.
You can run testing by make-test command
For these you need the test-db set up
docker-compose -f deploy/docker-compose.yml up db_test -d
go run tools/migrate/migrate.go up test
make test-integrationMake sure you run tests with make command, or you provided integration tag. Otherwise, the tests won't be run.
Just run make release and wait until the message that both servers are ready arrive.
- You can access the
usersservice on port 8000 - And
locationsservice on port 8001