No description
  • Go 97.7%
  • Python 1.2%
  • Nix 1.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
MaidFox b7c33f9462
All checks were successful
Go check / check-go (push) Successful in 4m2s
Nix check / check-nix (push) Successful in 4m3s
chore(reposyncer): update repo baseline (#88)
This PR was automatically created by the reposyncer script via https://git.foxden.network/FoxDen/maid

Reviewed-on: #88
2026-10-09 14:58:13 -07:00
.forgejo/workflows chore(reposyncer): update repo baseline (#88) 2026-10-09 14:58:13 -07:00
.vscode Rewrite API in Go (#87) 2026-09-29 16:05:30 -07:00
cmd/space_age_api Rewrite API in Go (#87) 2026-09-29 16:05:30 -07:00
internal Rewrite API in Go (#87) 2026-09-29 16:05:30 -07:00
util Rewrite API in Go (#87) 2026-09-29 16:05:30 -07:00
.editorconfig Rewrite API in Go (#87) 2026-09-29 16:05:30 -07:00
.gitignore Rewrite API in Go (#87) 2026-09-29 16:05:30 -07:00
flake.lock chore(deps): update dependency hackney to v4.7.2 (#72) 2026-08-06 09:46:04 -07:00
flake.nix Rewrite API in Go (#87) 2026-09-29 16:05:30 -07:00
go.mod Rewrite API in Go (#87) 2026-09-29 16:05:30 -07:00
go.sum Rewrite API in Go (#87) 2026-09-29 16:05:30 -07:00
README.md Rewrite API in Go (#87) 2026-09-29 16:05:30 -07:00
register_discord_command.py Fix wording, auto-delete outdated commands 2024-03-30 01:20:32 -07:00
renovate.json Rewrite API in Go (#87) 2026-09-29 16:05:30 -07:00
vendor-hash.txt Rewrite API in Go (#87) 2026-09-29 16:05:30 -07:00
vendor-hash.txt.doc Rewrite API in Go (#87) 2026-09-29 16:05:30 -07:00

SpaceAge API

HTTP API used by the SpaceAge GMod servers, clients and website (/v2/...).

Building

go build ./cmd/space_age_api
# or
nix build

Running

space_age_api migrate # apply pending database migrations
space_age_api start   # run the HTTP server (default command)

Migrations share Ecto's schema_migrations table, so databases created by the old Elixir API are picked up as-is.

Configuration

All configuration is done via environment variables:

Variable Default Description
SECRET_KEY_BASE (required) HS256 secret for client auth and Discord link JWTs
PORT 4000 Port to listen on (all interfaces)
LISTEN_ADDR :$PORT Full listen address, overrides PORT
MYSQL_SOCKET /var/run/mysqld/mysqld.sock MySQL/MariaDB unix socket
MYSQL_HOST host:port to connect via TCP instead of the unix socket
MYSQL_USERNAME root Database user
MYSQL_PASSWORD Database password
MYSQL_DATABASE spaceage_api Database name
POOL_SIZE 10 Maximum number of database connections
DISCORD_PUBLIC_KEY SpaceAge application key Hex encoded Ed25519 key used to verify Discord interactions
AUTO_MIGRATE If set, apply pending migrations on start

Discord

register_discord_command.py APP_ID BOT_TOKEN registers the /salink slash command.