Architecture Overview
The Sadeem SaaS Package is a set of Odoo modules that turns your Odoo installation into a full SaaS management platform. You use it to provision, monitor, and manage customer Odoo instances — entirely from inside Odoo.
The Three Planes
The platform is split across three distinct Odoo instances, each with a different role:
┌─────────────────────────────────────────────────────────┐
│ Master Odoo (Sadeem SaaS Package installed here) │
│ Operators manage subscriptions, infrastructure, billing │
└────────────┬──────────────────────────────┬─────────────┘
│ provisions & monitors │ registers backups
▼ ▼
┌────────────────────────┐ ┌──────────────────────────┐
│ Customer Instances │ │ Backup Server Odoo │
│ Docker stacks OR │ │ sadeem_saas_backup_ │
│ shared DBFilter Odoo │ │ manager installed here │
└────────────────────────┘ └──────────────────────────┘
| Plane | What runs here | Who manages it |
|---|---|---|
| Master | The Sadeem modules — subscriptions, infrastructure connectors, billing | You (the SaaS operator) |
| Customer instances | Each customer's Odoo — Docker stack or DBFilter database | Provisioned automatically by the Master |
| Backup server | sadeem_saas_backup_manager — a separate Odoo app for scheduled backups |
You (optional, separate server) |
Module Layers
The modules are layered — each depends on the one below it:
sadeem_saas_base
├── sadeem_cloudflare
├── sadeem_nginx_proxy_manager
└── sadeem_portainer
sadeem_subscription
├── sadeem_saas_docker
├── sadeem_saas_dbfilter
├── sadeem_subscription_trial
└── sadeem_subscription_website
Layer 1 — Infrastructure (sadeem_saas_base + connectors)
Manages the physical and cloud services your customer instances run on:
- Root servers (SSH, monitoring, terminal)
- Cloudflare (DNS records)
- Nginx Proxy Manager (reverse proxy, SSL)
- Portainer (Docker stack management)
- PostgreSQL servers
- Backup servers
- Notification servers (push, FCM)
- Git accounts and repositories
Layer 2 — Subscription Core (sadeem_subscription)
The heart of the platform. Manages the customer lifecycle:
- Subscription records and states (Draft → Running → Terminated)
- Stages — multiple deployed instances per subscription
- Packages and resource limits (modules, users, storage)
- Billing integration (sale orders, invoices)
- Customer portal (self-service)
- Backup scheduling
- Domain provisioning
- Update requests
Layer 3 — Deployment Strategy (sadeem_saas_docker / sadeem_saas_dbfilter)
Adds the actual provisioning logic for each strategy. Install one or both:
sadeem_saas_docker— creates and manages Portainer Docker stackssadeem_saas_dbfilter— creates and manages databases on a shared Odoo instance
Layer 4 — Optional Extensions
sadeem_subscription_trial— public trial request formsadeem_subscription_website— public plan marketplacesadeem_subscription_waha— WhatsApp notifications via Wahasadeem_saas_dbfilter_sync_db— import existing databases into subscriptions- Variant modules (e.g.
sadeem_subscription_trial_docker) combine two layers
What Happens When a Subscription is Built
Regardless of deployment strategy, the build sequence is always:
1. DNS → Create Cloudflare A record (if auto-create is enabled)
2. Nginx → Create proxy host in Nginx Proxy Manager with SSL
3. Instance → Provision the customer Odoo (Docker stack or DBFilter database)
Each step is tracked independently. If a step fails, the subscription moves to Build Failed and the error is recorded. Sadeem's Diagnosis & Fix tool can inspect the state and retry failed steps automatically.
External Service Connections
The Master Odoo communicates outward to five types of external services:
| Service | Protocol | Purpose |
|---|---|---|
| Root servers | SSH | Command execution, monitoring, file access |
| Cloudflare | HTTPS API | DNS record management |
| Nginx Proxy Manager | HTTP API | Proxy host and SSL management |
| Portainer | HTTPS API | Docker stack lifecycle |
| Backup server | HTTP API + API key | Backup registration and scheduling |
All credentials are stored in Odoo (never in config files) and encrypted where sensitive.
Customer Portal
Customers access their own subscription through the Odoo customer portal (/my/subscriptions). From the portal they can:
- View their subscription state and domain
- Monitor storage usage
- Request a backup
- Manage installed modules (within their package limits)
- Add collaborators
The portal is provided by sadeem_subscription and requires no additional setup.