Monolithic backend for all adjacent services to the game.
Structure must always stay easy to divide into microservices and escalate if needed.
For detailed information, please refer to the specific documentation files in the docs/ directory:
- Architecture & Modular Monolith Details
- Development Guide & Local Setup
- Production Usage & Deployment
- Testing Setup
- CI/CD & GitHub Actions
- Install golang
- Install Docker & Docker Compose
- Install
make
# Setup environment variables
cp .env.example .env
# Run development environment (API, DB, Buckets)
make devHow to use docker to build and run server.
# Setup environment variables
cp .env.example .env
# Run production environment
make up-buildSee the Testing Guide for more details.
# Run tests in Docker (includes acceptance tests)
make testThe project includes a Makefile with convenient commands for development and testing. See Development Guide for more usage examples.
# Show all available commands with descriptions
make help
# Development commands
make dev # Starts detached containers and an interactive shell
make up-build # Builds & starts production profile containers, or just: make up
make build # Builds production profile containers
make down # Stops all running containers
make logs # Tail logs from all containers
make logs-<svc> # Tail logs from a specific service (e.g. make logs-db)
make db # Open a psql shell in the Postgres container
make clean # Remove all containers, images, and local bucket data
# Testing commands
make test # Build, run, and execute tests in a clean Docker environment
make test-unit # Run Go unit tests only
make test-acceptance # Run Python/behave acceptance tests only
# Database migrations
make migration service=<name> name=<migration_name> # Create a new migration file
# Data seeding
make seed ASSETS_BASE_PATH=<path> # Seed local environment
make seed-prod ASSETS_BASE_PATH=<path> JWT_TOKEN=<token> # Seed production
# Documentation
make swagger # Generate Swagger documentationThe project uses golang-migrate for database migrations. Migration files are located in the migrations/ directory. For setup details, see Development Guide.
See Architecture Documentation for a comprehensive breakdown of the modular monolith design.
Endpoint documentation was made with Swagger. Once starting up the project, navigate to this link to test out the endpoints:
http://localhost:8000/swagger/index.htmlCheck the Development Guide for full descriptions of maintenance scripts like seed_initial_cosmetics.py.