bitshost / upmvc-saas
upMVC-SaaS — thin composed multi-tenant starter: Packagist kernel + saas-pack + payments-pack. App owns public/, .env, packages.php, and thin domain modules only.
Requires
- php: >=8.3
- bitshost/upmvc: ^2.7.1
- bitshost/upmvc-payments-pack: ^0.2.2
- bitshost/upmvc-saas-pack: ^1.1
- phpmailer/phpmailer: ^6.9
Requires (Dev)
- phpstan/phpstan: ^2.2
- phpunit/phpunit: ^11.0
Suggests
- paypal/paypal-server-sdk: Optional when PAYMENTS_DRIVER=paypal (pack driver still stubbing Order/Capture).
- stripe/stripe-php: Required only when PAYMENTS_DRIVER=stripe (PaymentIntent + plan webhook).
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-28 15:05:51 UTC
README
Thin composed multi-tenant SaaS starter. You do not fork the kernel — you require packs from Packagist and add only your domain.
bitshost/upmvc → kernel (boot, router, modules, JWT)
bitshost/upmvc-saas-pack → tenancy + Harvest ops (mail, notify, audit, MFA, …)
bitshost/upmvc-payments-pack → payment intents + drivers (required floor)
this repo → public/, .env, packages.php, thin PlanBilling + your domains
Human setup guide (authoritative N-step):
Build a SaaS app on upMVC
Compose helper (after composer install):
php vendor/bitshost/upmvc-saas-pack/bin/saas-next.php doctor php vendor/bitshost/upmvc-saas-pack/bin/saas-next.php init php vendor/bitshost/upmvc-saas-pack/bin/saas-next.php scaffold-domain YourDomain
See pack saas-next (saas-kit.json discovers optional packs such as payments).
Requirements
- PHP 8.3+
- Composer
- MySQL 5.7+ / MariaDB 10.3+
Quick start
composer create-project bitshost/upmvc-saas my-saas cd my-saas # or: clone this repo, then composer install php scripts/setup.php # .env + secrets + storage dirs # edit src/Etc/.env — DOMAIN_NAME, SITE_PATH, DB_* php vendor/bitshost/upmvc/src/Tools/migrate.php # optional seed (pack): # mysql -u root -p your_db < vendor/bitshost/upmvc-saas-pack/database/seed.sql php vendor/bitshost/upmvc-saas-pack/bin/saas-next.php doctor php -S localhost:8000 -t public
| URL | What you get |
|---|---|
/auth |
Login (pack) |
/platform-admin |
Platform admin shell |
/app / /app/{slug} |
Tenant app / public |
/shop/{slug} |
Tenant shop shell |
Prefer migrate (kernel users → pack 001/002 Harvest). database/demo.sql remains a one-shot shortcut if you want it; pack database/README.md explains seed vs schema.
Package registration
// src/Etc/packages.php return [ \BitsHost\UpmvcSaas\SaasServiceProvider::class, \BitsHost\UpmvcPayments\PaymentsServiceProvider::class, ];
Pack APIs: /api/payments* (drivers, intents, offline status).
Host thin bridge: PlanBilling — POST /api/billing/checkout|fulfill|webhook (plan price → pack charge → activate tenants.plan_id).
What this app owns
public/ front controller (UPMVC_APP_ROOT)
src/Etc/.env.example environment template
src/Etc/packages.php provider registration
src/Modules/ thin PlanBilling + your domain modules
scripts/setup.php create-project helper
docs/ starter docs
AGENTS.md Cursor / agent compose rules
Kernel and SaaS modules live under vendor/ — do not copy them into the app.
Local path repos (optional, maintainers only)
Released pins are Packagist (^2.5 / ^1.1). For sibling-folder work, add path repositories temporarily; do not commit them as the default for end users.
Documentation
| Doc | Why |
|---|---|
| docs/ | Starter index |
| BUILD_SAAS_APP | Compose floor |
| upMVC-SaaS-Pack | Tenancy + Harvest |
| Harvest ops | Mail / notify / dual-unseal |
| saas-next | doctor / init / agent / scaffold |
| upMVC-Payments-Pack | Payments floor (required in this starter) |
| Structure reference | myCMMS-PHP (layout only — not domain copy) |
License
MIT — see LICENSE.