Quick Start
This guide gets you running locally in about 5 minutes using mock services. You don’t need to configure Google OAuth - the mock OAuth server simulates authentication with test users.
Prerequisites
Section titled “Prerequisites”Make sure you have these installed:
- Go 1.22+ - Install Go
- Docker & Docker Compose - Install Docker
- Bun 1.3+ - Install Bun
- mise - Install mise
See System Requirements for detailed installation instructions.
-
Clone the repository
Terminal window git clone https://github.com/DocSpring/rack-gateway.gitcd rack-gateway -
Install dependencies
Terminal window go mod downloadcd web && bun install && cd .. -
Configure environment
The default configuration uses mock services. Just copy the example file:
Terminal window cp mise.local.toml.example mise.local.toml -
Start everything
Terminal window task devThis starts:
- Gateway API server at
http://localhost:8447 - Web UI at
http://localhost:5223 - Mock OAuth server at
http://localhost:3345 - Mock Convox API at
http://localhost:5443 - PostgreSQL database in Docker
- Gateway API server at
Try It Out
Section titled “Try It Out”Web UI
Section titled “Web UI”-
Open
http://localhost:5223in your browser -
Click “Sign in with Google”
-
The mock OAuth server shows a user selection screen
-
Choose a test user:
- admin@example.com - Full access
- deployer@example.com - Deployment permissions
- ops@example.com - Operations permissions
- viewer@example.com - Read-only access
-
You’ll be redirected to the dashboard
-
Login to the gateway
Terminal window ./bin/rack-gateway login staging http://localhost:8447Your browser opens to the mock OAuth server. Select a test user.
-
Run Convox commands
Terminal window # List apps (from mock Convox)./bin/rack-gateway apps# View processes./bin/rack-gateway ps# Check rack status./bin/rack-gateway rack -
Set up a convenient alias
Terminal window alias cg="./bin/rack-gateway"cg appscg ps
What You’re Running
Section titled “What You’re Running”The development environment consists of:
| Component | URL | Description |
|---|---|---|
| Gateway API | http://localhost:8447 | Authentication proxy |
| Web UI | http://localhost:5223 | Admin interface (Vite dev server) |
| Mock OAuth | http://localhost:3345 | Simulates Google OAuth |
| Mock Convox | http://localhost:5443 | Simulates Convox rack API |
| PostgreSQL | localhost:55432 | Database (in Docker) |
Test Users
Section titled “Test Users”The mock OAuth server provides four test users with different roles:
| Role | Capabilities | |
|---|---|---|
| admin@example.com | Admin | Full access to everything |
| deployer@example.com | Deployer | Deploy apps, manage builds and releases |
| ops@example.com | Ops | Restart apps, manage processes |
| viewer@example.com | Viewer | Read-only access |
Explore the Features
Section titled “Explore the Features”User Management
Section titled “User Management”- Login as
admin@example.com - Go to Users in the sidebar
- View all users and their roles
- Try changing a user’s role
API Tokens
Section titled “API Tokens”- Go to API Tokens
- Create a new token for CI/CD
- Note the token permissions match the user’s role
Audit Logs
Section titled “Audit Logs”- Go to Audit Logs
- See all actions you’ve taken
- Note that secrets are automatically redacted
Account Security
Section titled “Account Security”- Go to Account Security
- Try enrolling a TOTP authenticator
- View your active sessions
Run Tests
Section titled “Run Tests”Verify everything is working:
# Run all teststask test
# Run linterstask lintNext Steps
Section titled “Next Steps”Now that you have Rack Gateway running locally:
- Explore the RBAC system
- Try the MFA features
- Review the audit logs
- Set up Google OAuth
- Review Production Checklist
- Deploy with Docker or Convox
- Read the Development Guide
- Understand the Architecture
- Check the Contributing Guide
Troubleshooting
Section titled “Troubleshooting”Port already in use
Section titled “Port already in use”If you see port conflict errors:
# Stop all servicestask docker:down
# Restarttask devDatabase connection failed
Section titled “Database connection failed”Ensure Docker is running:
docker ps # Should show rack-gateway-postgres-1If the container isn’t running:
task docker:resettask devOAuth redirect issues
Section titled “OAuth redirect issues”Make sure you’re using the mock OAuth server URLs:
- Gateway:
http://localhost:8447(nothttps) - OAuth redirect:
http://localhost:8447/api/v1/auth/callback
For more help, see Troubleshooting.