V vaha_

Case file · № 08 / 16

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.

Category
E-commerce SaaS · vshopr.org
Years
2025 → present
Status
live
vShopr — Multi-tenant e-commerce
Screenshot 08 · vShopr — storefront and admin on one PHP API, per tenant.
01

What was built

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

Layers of the system

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
03

Technologies

Programming languagesPHP, TypeScript, SQL, Bash
Frameworks & toolsReact, Vite, PWA, SQLite, Polar billing, Cloudflare for SaaS
InfrastructureCloudflare, Apache, Per-tenant isolation
04

Facts

PlatformsWeb · Server
Statuslive
Years2025 → present
CategoryE-commerce SaaS · vshopr.org

vShopr — storefront and admin on one PHP API, per tenant.

All projects

← Back to the index