Savannah Cloud

Quickstart

Get all 5 Savannah Cloud services running locally with Docker.

Prerequisites

ToolVersion
Docker Desktop / Docker Engine24+
Docker Compose pluginv2+
Go1.25+ (local dev without Docker)
Node.js18+ (local dashboard dev)

1. Clone the Repository

git clone https://github.com/Mbuthia71/distributed-task-queue.git
cd distributed-task-queue

2. Create .env

# Linux / WSL / macOS
echo "JWT_SECRET=$(openssl rand -hex 32)" > .env
echo "RESEND_API_KEY=re_..." >> .env
echo "AT_API_KEY=atsk_..." >> .env
echo "AT_USERNAME=your_at_username" >> .env

# PowerShell
"JWT_SECRET=$([Convert]::ToBase64String((1..32 | ForEach-Object { Get-Random -Max 256 })))" | Out-File .env

Minimum required keys for full functionality:

VariablePurpose
JWT_SECRETSigns all JWTs — use a long random string
RESEND_API_KEYEnables email sending via Resend
AT_API_KEYAfrica's Talking — enables SMS
AT_USERNAMEAfrica's Talking username

DATABASE_URL and REDIS_URL are set automatically by Docker Compose.

3. Start All 5 Services

docker compose up -d --build
ContainerRolePort
riftcloud-app-1Go API + Worker pool8080
riftcloud-dashboard-1React UI (Nginx)80
riftcloud-postgres-1PostgreSQL 165432
riftcloud-redis-1Redis 76379
riftcloud-pdns-1PowerDNS Auth 4.953, 8081

Never rebuild the postgres container unless you intend to wipe data. Use --build app or --build dashboard specifically.

4. Verify Everything is Up

# API health — expects postgres and redis both "ok"
curl http://localhost:8080/health
# → {"status":"ok","postgres":"ok","redis":"ok"}

# Prometheus metrics
curl http://localhost:8080/metrics

# All container statuses
docker compose ps

5. Register Your First Account

curl -X POST http://localhost:8080/auth/register \
  -H "Content-Type: application/json" \
  -d '{"org_name":"My Org","email":"me@example.com","password":"secret123"}'

Returns { token, user, org }. Save the token.

6. Create an API Key

curl -X POST http://localhost:8080/api-keys \
  -H "Authorization: Bearer YOUR_JWT" \
  -H "Content-Type: application/json" \
  -d '{"name":"my-key"}'

Copy the raw_key — it starts with sc_ and is shown once only.

7. Push Your First Job

curl -X POST http://localhost:8080/jobs \
  -H "X-API-Key: sc_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "send_email",
    "payload": {"to": "user@example.com", "subject": "Hello", "body": "From Savannah Cloud"},
    "max_retries": 3
  }'

8. Open the Dashboard

Navigate to http://localhost:80 and sign in with your credentials. The dashboard shows live job status via WebSocket.

Common Commands

# Rebuild after code changes (preserves postgres data)
docker compose up -d --build app dashboard

# Stop all services
docker compose down

# Wipe all data (fresh start)
docker compose down -v

# Live logs
docker compose logs -f app

Next Steps

On this page