mirror of
https://gitlab.com/hmajid2301/banterbus.git
synced 2026-06-18 03:35:34 +01:00
A multiplayer browser-based game built using htmx and Golang. Leveraging web sockets.
- Go 88.4%
- templ 6.6%
- JavaScript 2.4%
- HCL 1.4%
- Nix 0.9%
- Other 0.3%
| containers | ||
| dashboards | ||
| docker | ||
| docs | ||
| infra/tf | ||
| internal | ||
| nix | ||
| static | ||
| tests/e2e | ||
| .air.toml | ||
| .copier-answers.yml | ||
| .envrc | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| .golangci.yml | ||
| .mockery.yaml | ||
| .sqlfluff | ||
| default.nix | ||
| docker-compose.yml | ||
| flake.lock | ||
| flake.nix | ||
| go.mod | ||
| go.sum | ||
| gomod2nix.toml | ||
| LICENSE | ||
| main.go | ||
| README.md | ||
| renovate.json | ||
| shell.nix | ||
| sqlc.yaml | ||
| tailwind.config.js | ||
| Taskfile.yml | ||
Banter Bus
Banter Bus is a multiplayer web-based party game inspired by JackBox games. Players join lobbies to play social deduction and guessing games together in real-time.
Table of Contents
Demo
Getting Started
# Clone the repository
git clone https://gitlab.com/hmajid2301/banterbus
cd banterbus
# Allow direnv to load the development environment
direnv allow
# Start the development server
task dev
The application will be available at http://localhost:7331 (proxy for templ -> :8080).
Preview Environments
When creating merge requests, you can deploy preview environments:
- Add the
deploy/flux-previewlabel to your merge request - CI will automatically build and deploy a preview environment
- Access your preview at
https://mr-{MR_ID}.dev.banterbus.games - Environment is automatically cleaned up when MR is merged/closed
Technology Stack
Backend
- Go - Core application language
- Standard library HTTP server
- gobwas/ws for WebSocket communication
- SQLC for type-safe database queries
- PostgreSQL - Primary database for game state and user data
- Redis - Pub/Sub messaging for real-time events between players
- templ - Type-safe HTML templating
Frontend
- HTMX - Dynamic HTML updates without JavaScript frameworks
- Alpine.js - Minimal JavaScript for interactive components
- Tailwind CSS - Utility-first styling
Development Experience
- Nix - Reproducible development environments
- gomod2nix for Go dependency management
- Automated development shells
- Pre-commit hooks for code quality
- Docker image builds
- Task - Simple task runner (alternative to Make)
- Air - Live reload during development
- SQLC - Generate type-safe Go code from SQL
Infrastructure & Deployment
- Terraform - Infrastructure as code
- Single state file with workspace separation (dev/prod)
- Automated DNS management via Cloudflare
- Secret management through OpenBao
- Kubernetes - Container orchestration
- GitOps deployment with Flux CD
- Automatic scaling and health checks
- GitLab CI/CD - Continuous integration and deployment
- Automated testing (unit, integration, e2e)
- Docker image builds and registry management
- Preview Environments - Automatic deployment for merge requests
- Temporary environments for testing features
- Automatic cleanup when MR is closed
- URL format:
https://mr-{ID}.dev.banterbus.games
Monitoring & Observability
- OpenTelemetry - Distributed tracing and metrics
- Grafana - Metrics visualization and alerting
- Prometheus - Metrics collection and storage
- Loki - Log aggregation
- Tempo - Distributed tracing backend