BitsHost · PHP 8.3+ · v2.8.0 · MIT
upMVC
A thin, modular PHP 8.3+ kernel. Direct PHP first, zero magic. Compose universal packs (jobs, private files, PSR-7/15 bridge) and SaaS packs as Packagist libraries — you never fork the core.
composer require bitshost/upmvc:^2.8
The stack
Optional composable layers. Nothing is mandatory until you need it.
bitshost/upmvc → kernel (v2.8: Router v2, Middleware, Events, Validator)
bitshost/upmvc-jobs-pack → universal pack: DB background jobs & cron worker (zero Redis)
bitshost/upmvc-files-pack → universal pack: private storage, MIME policy & HMAC downloads
bitshost/upmvc-psr-bridge → universal pack: optional PSR-7 / PSR-15 / PSR-17 bridge
bitshost/upmvc-saas-pack → SaaS pack: tenancy + Harvest ops (mail, notify, audit, MFA)
bitshost/upmvc-payments-pack → SaaS pack: payments floor (Stripe / bank / cash / manual)
your host app → domain modules only (src/Modules/ & Api/Modules/*)
Pieces
Each repo has one job. Universal packs work on any upMVC app (standalone or SaaS).
-
upMVC
Thin Core kernel: boot, Router v2 (HTTP methods + typed params), middleware (JWT, CORS, CSRF, RateLimit, TrustedProxies), micro
Events, dumbValidator, migrate tool, AI agent pack. Packagistbitshost/upmvc(^2.8). -
upMVC-Jobs-Pack
Universal pack (standalone & SaaS): DB-backed background job queue and cron-safe CLI worker with retries, exponential backoff, dead-letter recovery, and
Eventshooks — zero Redis required. Packagistbitshost/upmvc-jobs-pack(^0.1). -
upMVC-Files-Pack
Universal pack (standalone & SaaS): private
storage/uploads (never underpublic/), realfinfobyte MIME allowlist, path-traversal defense, optional tenant prefix isolation, and HMAC-SHA256 expiring download tokens. Packagistbitshost/upmvc-files-pack(^0.1). -
upMVC-PSR-Bridge
Universal pack (opt-in): full PSR-7, PSR-15, and PSR-17 bridge (
nyholm/psr7) to run external PSR-15 middleware or PSR-7 handlers while keeping the upMVC kernel zero-dependency KISS. Packagistbitshost/upmvc-psr-bridge(^0.1). -
upMVC-SaaS
Thin composed SaaS starter —
public/,.env,packages.php, thinPlanBillingbridge. Requires kernel + saas-pack + payments-pack. Not a fork of the kernel. Packagistbitshost/upmvc-saas. -
upMVC-SaaS-Pack
Installable SaaS floor: tenants, plans, JWT auth APIs, platform admin, Harvest ops (mail, notify, audit, MFA),
saas-next. Packagistbitshost/upmvc-saas-pack(^1.2). -
upMVC-Payments-Pack
Payments floor: gateway contracts and tenant-scoped intents (Stripe, bank transfer, cash, manual) with strict platform-admin offline status RBAC. Packagist
bitshost/upmvc-payments-pack(^0.2.2). -
PHP CRUD API Generator
Optional API plane: REST over MySQL/MariaDB, auth, OpenAPI. Compose with the kernel when you want an instant data API.
Install
Start standalone or compose packs on top. Same kernel either way.
Kernel — standalone project
Clean app tree: public/, src/Etc/, Welcome module. Demos are
optional (Releases zip).
composer create-project bitshost/upmvc my-app
cd my-app
# configure src/Etc/.env
php -S localhost:8000 -t public
Kernel — as a library + universal packs
Kernel stays cleanly inside vendor/; your app owns public/,
src/, and src/Etc/.env.
composer require bitshost/upmvc:^2.8
# optional universal packs (standalone or SaaS):
composer require bitshost/upmvc-jobs-pack bitshost/upmvc-files-pack bitshost/upmvc-psr-bridge
SaaS — starter host
Thin composed starter requiring kernel + saas-pack + payments-pack.
composer create-project bitshost/upmvc-saas my-saas
cd my-saas
php scripts/setup.php
php vendor/bitshost/upmvc/src/Tools/migrate.php
php vendor/bitshost/upmvc-saas-pack/bin/saas-next.php doctor
Wire packs in src/Etc/packages.php
// src/Etc/packages.php
return [
\BitsHost\UpmvcJobs\JobsServiceProvider::class, // optional universal pack
\BitsHost\UpmvcFiles\FilesServiceProvider::class, // optional universal pack
\BitsHost\UpmvcPsr\PsrBridgeServiceProvider::class, // optional PSR-7/15/17 bridge
\BitsHost\UpmvcSaas\SaasServiceProvider::class, // optional SaaS floor
\BitsHost\UpmvcPayments\PaymentsServiceProvider::class, // optional payments floor
];
Architecture overview: ECOSYSTEM_ARCHITECTURE.md · SaaS walkthrough: BUILD_SAAS_APP.md · Security policy: SECURITY.md · Kernel docs: upMVC README
Facts
- PHP 8.3+, PSR-4, MIT — current kernel v2.8.0 (with frozen
Events&Validatorcontracts) public/is the only web root;Environment::load()resolves hostsrc/Etc/.envoutsidevendor/- Universal API-first layout: domain modules under
src/Modules/&src/Modules/Api/Modules/{Domain}/— works identically standalone or in SaaS - Frontend freedom: plain PHP/HTML, React/Vue/Svelte islands, full React/Vite SPA, or mobile WebViews
- Security-first defaults:
TrustedProxies/CIDR, rate limiting, CSRF, fail-closedValidator, HTTPS-awareSecurecookies,composer auditin CI - AI-native: root
AGENTS.md+php src/Tools/upmvc-next.phpin the kernel;saas-nexton composed SaaS hosts
Kernel vs Common: KERNEL_COMMON_BMVC.md