A background job processing system that handles heavy or time-consuming tasksβlike sending emails, processing images, or automating workflowsβso your main app stays fast and responsive.
# Start development environment
docker compose -f docker-compose.dev.yml up --build
# Run database migrations
docker exec -i postgres-db psql -U admin -d taskmaster < db/schema.sql
# Run tests
go test ./... -v- Project structure and module setup
- PostgreSQL database integration
- Redis for state management
- Kafka message queue setup
- Docker containerization
- Basic authentication (JWT)
- Configuration management
- gRPC API implementation
- REST API endpoints (Fiber)
- Job creation and storage
- Kafka producer implementation
- Worker service setup
- Basic job status tracking
- Simple retry mechanism
- Job type registry system
- Payload validation
- Configurable retry policies
- Job timeout handling
- Progress tracking
- Job dependencies
- Job cancellation
- Priority queues
- Dead-letter queue
- Result storage
- Distributed locking
- Job batching
- Workflow engine
- Cron scheduling
- Rate limiting
- Job routing
- Job chaining
- Recovery system
- Job type documentation
- Debugging tools
- Testing/simulation tools
- Job templates
- Payload transformation
- Hooks/middleware system
- React + Tailwind UI
- Real-time updates (WebSocket)
- Job filtering and search
- Analytics dashboard
- Retry controls
- Logs viewer
- Worker management
- Structured logging (slog)
- Prometheus metrics
- Grafana dashboards
- OpenTelemetry tracing
- Health checks
- Resource monitoring
- Job archival
- Cleanup policies
- Audit logging
- Cost tracking
- Quota management
- Statistics collection
- Alerts/notifications
- Kubernetes setup
- Helm charts
- Worker auto-scaling
- Multi-region support
- Backup/restore system
- Blue-green deployments
- Terraform configurations
- AWS/GCP deployment
- Cost optimization
- Security hardening
-
API Service
- REST/gRPC endpoints
- Request validation
- Job creation & queuing
-
Message Queue
- Kafka-based processing
- Job distribution
- Order guarantee
-
Worker Service
- Job execution
- Status management
- Error handling
-
Storage Layer
- PostgreSQL: Job data
- Redis: Status cache
- Kafka: Message queue
- Submit job via API
- Store in PostgreSQL
- Queue in Kafka
- Process via Worker
- Update status
- Store results
- Go 1.23+
- Docker & Docker Compose
- Make (optional)
DATABASE_URL=postgres://admin:admin@postgres-db:5432/taskmaster?sslmode=disable
KAFKA_BROKER=kafka:9092
REDIS_ADDR=redis:6379
JWT_SECRET=supersecretkey# Authentication
POST /api/login
{
"username": "admin",
"password": "password"
}
# Job Management
POST /api/jobs
{
"type": "sendEmail",
"payload": {
"to": "user@example.com",
"subject": "Welcome!",
"template": "welcome_email"
}
}
GET /api/jobs/:id
GET /api/jobs- Fork repository
- Create feature branch
- Commit changes
- Push to branch
- Open Pull Request
MIT License