The Satisfactory Mod Repository backend API - a Go-based service providing REST and GraphQL endpoints for mod management.
- mise for tool management
- Docker (and Docker Compose)
# Install tools and start development services
mise install
# If this command fails, ensure you have Docker running and configured correctly
mise run setup
# Generate code and start API
mise run generate
mise run api
If running api
produces errors about the database fails to apply migrations,
you may have switched branches without cleaning up after database changes you were working on.
The easiest way to get back from this state
is to delete the postgres
Docker container
and delete all not-in-use volumes so it creates a fresh one.
# Code generation (run after schema changes)
mise run generate
# Start API server
mise run api
# Testing
mise run test
mise run coverage
# Linting
mise run lint
# Environment management
mise run setup # Start PostgreSQL, Redis, MinIO
mise run teardown # Stop services
The development docker compose also includes a pgadmin container for testing database related stuff
exposed at http://localhost:5433/.
The credentials are specified in docker-compose-dev.yml
.
Once logged in, add a server.
The "Host name/address" should be postgres
, username should be postgres
, password should be POSTGRES_PASSWORD
from docker-compose.yml
.
You can view tables via Servers >(name)> Databases > postgres > Schemas > public > Tables
.
Tech Stack:
- Framework: Echo v4 with middleware
- Database: PostgreSQL with Ent ORM
- GraphQL: gqlgen with custom resolvers
- Authentication: Multi-provider OAuth + PASETO tokens
- Storage: S3-compatible (MinIO for dev)
- Background Processing: Temporal.io workflows
- Monitoring: OpenTelemetry tracing
Key Components:
- REST API at
/v1/
- GraphQL at
/v2/
with playground - Swagger docs at
/swagger/
- Generated code in
generated/
- Database schemas in
db/schema/
Create config.json
or use environment variables with REPO_
prefix.
Required services:
- PostgreSQL - Database (dev: port 5432)
- Redis - Cache/sessions (dev: port 6379)
- MinIO - Object storage (dev: ports 9000/9001)
- OAuth providers - GitHub, Google, Facebook
- PASETO keys - Generate with
go run cmd/paseto/main.go
- VirusTotal API key - For mod scanning
Development services are started automatically with mise run setup
. MinIO configuration is included in the setup task.
See config/config.go
for full configuration structure.
-
Code Generation: Always run
mise run generate
after modifying:- GraphQL schemas (
schemas/*.graphql
) - Database schemas (
db/schema/*.go
) - Swagger annotations
- GraphQL schemas (
-
Database Changes: Use Atlas migrations
- SQL migrations in
migrations/sql/
- Code migrations in
migrations/code/
- SQL migrations in
-
Testing: Tests require development services running
mise run setup # Start services mise run test # Run tests
Before submitting:
mise run lint # Check code quality
mise run test # Run test suite
mise run generate # Regenerate if needed
Development patterns:
- Use Ent ORM for database operations
- Implement GraphQL resolvers for complex queries
- Use Temporal workflows for background processing
- Follow structured logging with
slog
- Use context for request tracing