SPCBotSPCBot Docs

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.png

Server List

Connected servers and their health status

public/docs/images/servers-list.png

Deployment View

Live deployment logs and progress

public/docs/images/deployment-view.png
Client 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

  1. User creates environment via Dashboard
  2. API generates Docker Compose configuration
  3. DeploymentWorker queues job via BullMQ
  4. Worker executes SSH commands on target server
  5. Server runs Docker containers (Odoo, DB, Nginx)
  6. 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)