How sohila-khaled-abbas/n8n-production-queue-setup works
This repository packages a self-hosted n8n automation stack and an optional AI workflow-building assistant. The main runtime path is browser or webhook input into n8n, queued execution through Redis, and worker execution with task-runner sidecars; queue depth also drives autoscaling and monitoring. PostgreSQL persists n8n state, while the assistant generates workflows, keeps chat history, and can ingest workflows and credentials through the n8n API. Runtime wiring is documented in the README; assistant module relationships are supported by the excerpts and SOURCE INDEX. Some integrations and backup behavior are documented but their detailed implementation was not sampled.
Main entry points: docker-compose.yml n8n workers · autoscaler.py Worker autoscaler · llm_generator.py Workflow generator · server.py Assistant chat API
Components 20
Workflow execution
- n8n editor and API
docker-compose.yml - Webhook processor
docker-compose.yml - n8n workers
docker-compose.yml - Task runners
n8n-task-runners.json - Workflow portfolio
workflows
Scaling and operations
- Worker autoscaler
autoscaler/autoscaler.py - Queue monitor
monitor/monitor_redis_queue.py - Scheduled backups
docker-compose.yml
AI assistant
- Assistant chat API
mcp_server/server.py - Workflow generator
mcp_server/llm_generator.py - Chat history store
mcp_server/database.py - n8n API client
mcp_server/n8n_client.py
State and integrations
- Execution queue
docker-compose.yml - PostgreSQL persistence
docker-compose.yml - Qdrant vector database
docker-compose.yml - WhatsApp gateway
docker-compose.yml
Other components
- Browser users
- Webhook callers
- External model APIs
- Cloud backup target
Connections 21
- Browser users → n8n editor and API: uses editor
README.md - Webhook callers → Webhook processor: sends webhooks
README.md - Webhook processor → Execution queue: enqueues executions
README.md - n8n editor and API → Execution queue: enqueues executions
README.md - n8n workers → Execution queue: dequeues jobs
README.md - n8n workers → Task runners: runs with sidecars
README.md - n8n editor and API → PostgreSQL persistence: persists state
README.md - Worker autoscaler → Execution queue: reads queue depth
README.md - Worker autoscaler → n8n workers: scales replicas
README.md - Worker autoscaler → Task runners: scales alongside
README.md - Queue monitor → Execution queue: monitors depth
README.md - Scheduled backups → PostgreSQL persistence: backs up data
README.md - Scheduled backups → Cloud backup target: uploads backups
README.md - Assistant chat API → Chat history store: reads and writes history
mcp_server/server.py - Assistant chat API → Workflow generator: requests generation
mcp_server/server.py - Workflow generator → n8n API client: uses workflow context
mcp_server/llm_generator.py - n8n API client → n8n editor and API: fetches workflows and credentials
mcp_server/n8n_client.py - Workflow generator → External model APIs: calls model APIs
README.md - n8n workers → Qdrant vector database: supports RAG workflows
README.md - n8n workers → WhatsApp gateway: supports WhatsApp workflows
README.md - Workflow portfolio → n8n editor and API: imports workflows
README.md