Production-ready backend for Unity games with JWT auth, state sync, and telemetry.
- JWT Authentication
- State synchronization
- Telemetry ingestion
- Docker ready
- Unity client example
- Comprehensive tests
- GitHub Actions CI
# Local development
uvicorn app.main:app --reload
# Docker
docker-compose up --buildcurl -s -X POST "http://localhost:8000/api/login" -H "Content-Type: application/json" -d '{"player_id":"alice"}' | jqTOKEN=$(curl -s -X POST "http://localhost:8000/api/login" -H "Content-Type: application/json" -d '{"player_id":"alice"}' | jq -r .token)
curl -s -X POST "http://localhost:8000/api/sync" -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"player_id":"alice","state":{"level":1,"score":100}}' | jqcurl -s -X POST "http://localhost:8000/api/telemetry" -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"player_id":"alice","event":"jump","payload":{"height":2.3}}' | jqNote: install
jqfor pretty JSON in examples. Replace<YOUR_USERNAME>in the badge URL with your GitHub username.
POST /api/login- Get JWT tokenPOST /api/sync- Sync game state (authenticated)POST /api/telemetry- Send analytics events
See unity_example/UnityClient.cs for a minimal C# example.