docker compose -f .github/docker-dev.yaml up
This application supports multiple worker backend options for processing asynchronous tasks via RabbitMQ:
- Go Worker (Default) - Modern Go-based worker implementation (see the companion
base-go-apprepository) - Celery (Fallback) - Traditional Python Celery worker backend for legacy support or specific use cases
- Both - Send tasks to both Go and Celery workers simultaneously (for migration scenarios)
Set the worker backend type in your .env file:
RABBITMQ_ENABLED=true
RABBITMQ_HOST=rabbitmq
RABBITMQ_PORT=5672
RABBITMQ_USER=queueuser
RABBITMQ_PASSWORD=queuepass
RABBITMQ_VHOST=queuevhost
WORKER_BACKEND=go # Options: go (default), celery (fallback), bothDefault: go - The application defaults to the Go worker backend for optimal performance.
The Go worker backend uses a modern JSON-based task envelope format and is optimized for performance. This is the default and recommended option.
Setup:
- Clone and deploy the
base-go-appworker - Configure the same RabbitMQ connection settings
- Set
WORKER_BACKEND=goin.env(or omit it to use the default)
The Go worker provides:
- Optimized RabbitMQ consumer
- PostgreSQL persistence using GORM
- Health check endpoints for monitoring
- Docker support with multi-stage builds
- Superior performance and lower resource usage
The Celery backend uses the traditional Celery v2 message protocol. Use this option as a fallback or for specific scenarios requiring Celery features (e.g., massive data processing with Python-specific libraries).
Setup:
- Install and configure RabbitMQ
- Set up Celery worker (Python-based)
- Set
WORKER_BACKEND=celeryin.env
Use Cases:
- Legacy compatibility during transition period
- Specific Python library requirements
- Massive data processing scenarios where Python ecosystem is beneficial
You can send tasks to both backends simultaneously for migration or testing purposes.
Setup:
- Set up both Go and Celery workers
- Set
WORKER_BACKEND=bothin.env
Note: When using both backends, tasks will be sent to both workers. Ensure your database can handle duplicate operations or that your tasks are idempotent.
$this->sendGoTask('task_name', $data, 'queue_name');The Go worker expects tasks in the following format:
{
"version": "1.0",
"id": "uuid",
"task": "task_name",
"payload": { ... },
"created_at": "ISO8601 timestamp",
"attempt": 0,
"max_attempts": 5,
"timeout_seconds": 60
}- PHP: ≥ 80% (current suite runs above this)
- Frontend (TS): aim ≥ 70% (branches have a 50% minimum threshold)
When creating a mutating endpoint (POST/PUT/DELETE):
- Validate request in Laravel.
- Use
sendGoTask()to enqueue the action. - Return
202 Acceptedwith thetask_id. - Poll status via
/api/v1/tasks/{task_id}on the frontend.
- Secrets: API keys are NEVER committed. Use encrypted
.envfiles. - Idempotency: All mutation tasks use SHA-256 hashing to prevent duplicate execution.
- Pruning: Old logs and webhook records are automatically pruned via the
Prunabletrait. - Auditing: Every mutation task is logged with user context and payload.
If using this repo as a base and needing to strip features:
- WhatsApp: Set
WHATSAPP_ENABLED=false, removeWa*controllers and models. - AI: Set
AI_DEFAULT_PROVIDER=null, removeAiProvider*interfaces andapp/Services/Ai. - Go Workers: Stop using
sendGoTaskand removemain-site-gorepo dependencies.
For detailed removal steps, see the implementation notes in AGENTS.md.
© 2026 Base App Template. Built for scale.