Architecture
Learn how architecture work in SPCBot and how to configure them for your team.
Visual Guide
Drop real screenshots into the paths below. This grid is rendered by src/app/docs/components/image-placeholder.tsx.
Dashboard Overview
Main dashboard with stats and recent deployments
public/docs/images/dashboard-overview.pngServer List
Connected servers and their health status
public/docs/images/servers-list.pngDeployment View
Live deployment logs and progress
public/docs/images/deployment-view.pngClient Layer
Users & Admins
Browser / Mobile
- Authentication
- Dashboard Access
- Notifications
Presentation Layer
Next.js Frontend
Port 3000
- Dashboard UI
- Environment Management
- Real-time Deployment Logs (SSE)
API Layer
NestJS API
Port 4000
- REST API / WebSocket
- Authentication (JWT)
- Business Logic
- Queue Management (BullMQ)
Data & Messaging Layer
PostgreSQL
Primary Data
Redis
Queue / Cache
Background Worker
BullMQ Jobs
Orchestration Layer
Docker Orchestration
Per Instance
- Odoo App Container
- PostgreSQL per env
- Nginx Reverse Proxy
- Dynamic Port Allocation
Infrastructure Layer
VPS / Cloud
Ubuntu / Debian
SSL & Security
Auto HTTPS
Monitoring
Logs & Alerts
Domains
Custom endpoints
SPCBot follows a microservices architecture with clear separation of concerns between the dashboard UI, API, background workers, and deployed Odoo instances.
High-Level Overview
Data Flow
- User creates environment via Dashboard
- API generates Docker Compose configuration
- DeploymentWorker queues job via BullMQ
- Worker executes SSH commands on target server
- Server runs Docker containers (Odoo, DB, Nginx)
- Instance accessible on allocated port/domain
Component Responsibilities
- Frontend (Next.js): Dashboard UI, real-time logs, user interactions
- API (NestJS): Business logic, authentication, database operations
- Worker (BullMQ): Background job processing, deployments, SSH operations
- PostgreSQL: Persistent storage for all platform data
- Redis: Job queue, caching, real-time event publishing
Instance Isolation
Each Odoo instance runs in isolated Docker containers with:
- Dedicated PostgreSQL database (container or shared with unique DB)
- Isolated filestore volume for attachments
- Unique port allocation (auto-assigned or custom)
- Separate nginx configuration for domain routing
- Environment-specific configuration (odoo.conf)