vaha_
EN English
← Index No. 08 / 21

Case file · E-commerce SaaS · vshopr.org

vShopr

Multi-tenant e-commerce

Self-hosted, multi-tenant e-commerce SaaS. One repository, two parts: vShop (the storefront and admin, PHP API + React) and the vShopr control plane that turns a Polar checkout into a fully provisioned tenant — own subdomain, own SQLite database and admin user, in seconds.

Field
E-commerce SaaS · vshopr.org
Years
2025 → present
State
live
System
Web · Server
vShopr — Multi-tenant e-commerce
Screenshot · No. 08 vShopr — storefront and admin on one PHP API, per tenant.

What it does

01 / 08
  1. Storefront: catalogue, cart, checkout, orders, inventory, staff and theming
  2. Signup and billing: Polar checkout → signed webhook → account
  3. Automatic tenant provisioning: app copy, SQLite database and admin user
  4. Wildcard subdomains and custom domains (Cloudflare for SaaS)
  5. Owner and tenant dashboards — every store's state in one place
  6. One-shot installer: web server, TLS, firewall
  7. Security: Turnstile on every login, rate limiting, open_basedir tenant isolation
  8. Exec-block in the uploads folder, .env and secrets outside the web root, anti-tamper licence

Layers

02 / 02

Storefront and admin

ReactTypeScriptVitePHPSQLitePWA
  • React storefront + admin on a PHP API, one instance per tenant
  • Cart, checkout, orders and inventory management
  • Server-side plan caps (products, staff, storage)

Control plane

PHPCloudflareSQLite
  • Apex domain as the SaaS layer: signup, billing, provisioning
  • Polar signs the webhook, the server verifies it and creates the account
  • Email verification before the tenant gets a store
  • Wildcard subdomains and custom domains via Cloudflare for SaaS

Technologies

03 / 03
Languages PHPTypeScriptSQLBash 04
Frameworks & tools ReactVitePWASQLitePolar billingCloudflare for SaaS 06
Infrastructure CloudflareApachePer-tenant isolation 03

Every system on file

Back to the index →