Biznetrix SaaS Engine — Multi-Tenant Platform Hub
A production-capable multi-tenant SaaS engine — separate database, separate domain per tenant — that hosts every business module on one chassis. My main business control hub.
CodeIgniter 4.x
PHP 8.3+
MySQL/MariaDB (PostgreSQL + pgvector migration planned)
Qdrant (1536-dim text-embedding-3-small)
AdminLTE
OpenAI
Gemini
Anthropic
Ollama
GitHub Actions CI
Docker deployment
Hetzner VPS
About This Project
CodeIgniter 4 platform on PHP 8.3 with MySQL (PostgreSQL + pgvector migration planned), Qdrant for vector search, and a multi-provider AI layer routing across OpenAI, Gemini, Anthropic, and Ollama. 70+ admin controllers, 109 models, 112 services (19 AI-specific, 18 chat/channel, 9 lead-management, 11 social), 145 migrations, 38 view module directories.
Hardened with 2FA enforcement, RBAC, admin audit logging, step-up authentication for sensitive operations, and a managed cron + Server CLI surface for operations. 215 PHPUnit tests, 801 assertions, 0 failures. Measured DR: RTO 3m17s, RPO 1m53s.
This is the platform layer underneath every business module — and where I run my own operations.
Key Features
- Multi-tenant isolation (separate database per tenant, separate domain per tenant).
- Host-based tenant resolution + per-tenant DB swapping.
- Platform/tenant UI separation (SuperAdmin vs TenantAdmin).
- CRM (lead, contact, opportunity, activity); Lead scoring + intelligence (rules + AI signals + human override).
- Omnichannel chat (web widget, WhatsApp, Messenger, Telegram, SMS).
- KB-grounded AI replies (hybrid retrieval: FULLTEXT + Qdrant cosine).
- Multi-provider AI with task/segment routing matrix.
- Knowledge base with moderation; HyDE + LLM re-ranking behind feature flags.
- Email operations (accounts, compose, templates, tracking).
- Social media management (Facebook, Instagram OAuth).
- Reporting (custom builder, scheduled exports, Ads ROI).
- Cron management with audit history; Server CLI with allowlists + step-up 2FA.
- Server Maintenance Center (not for tenant admin).
- 2FA enforcement.
- DR drill (RTO 3m17s, RPO 1m53s).
- Admin audit log; HMAC-signed webhooks.
- Biznetrix integration API (cursor-based lead pull/ack)
Problem Solved
Most single-founder SaaS hits the same wall at year two — the codebase started as "one product for one customer," and now every new tenant means a new deploy and a new config file. Migrations get risky, and onboarding takes a week. Biznetrix is the opposite — every tenant gets their own database and their own domain, but they all share one codebase, one operations team, one control surface. One platform, many tenants, one operator.