Whity Core Framework
Welcome to the Whity Core documentation.
Quick Links
Section titled “Quick Links”- Sprint 1 Setup Guide — Local development setup for Sprint 1 MVP
- Installation — Setup guide
- Plugin Development — Build plugins
System documentation
Section titled “System documentation”- Architecture — Full system guide: request lifecycle, plugins, RBAC, multi-tenancy, schema, deployment (start here).
- Permission System — RBAC permissions, registry, role hierarchy, enforcement.
- Tenant Isolation — Multi-tenancy,
TenantContext, query scoping. - Monetization & Metering — Entitlements → plans → subscriptions → payment wall → rate limits: the one runtime access gate, per-tenant enforcement modes, and plan-driven throughput (the operator never walls themselves).
- Sign in with Google (SSO) — End-to-end federated sign-in setup: Google OAuth client, provider config, trust tiers, first-login behaviour, troubleshooting.
- Email (SMTP) Setup — Configure outbound email end to end: cPanel/SMTP credentials, the
mail.*settings + write-only encrypted password, local Mailpit testing, troubleshooting. - Hook System — Plugin event/extension mechanism.
- Offline PHP plugin host — the Tauri desktop template’s bundled FrankenPHP process that runs real, unmodified whity plugins fully offline (discovery, hooks, RBAC), plus
Whity\Sdk\Testing\OfflinePluginHostConformanceTestCase(seesdk/README.md) for proving your own plugin works there. - Desktop plugin releases — the
bin/desktop-plugin-releasepipeline that source-obfuscates a plugin, packages it in the shape the desktop installer requires, and catalogues it indesktop_plugin_releasesforGET /api/desktop-plugins. - Plugin UI Blocks — Server-driven UI: the platform-neutral block contract (display / data-bound / interactive) plugins declare and each platform renders.
- Plugin Data Types —
registerDataType: a plugin declares its records’ lifecycle (trashed ≠ retired) and reference graph as data; core owns the guard evaluation, the refusals, and the generated trash/restore/retire surface. - Family Relations — Person-node graph, relationship types, the relations API + admin hub.
- Document & Label Designer — WYSIWYG designer for docs/labels: multi-page, variable-data batch (serials/CSV), N-up sheets, reusable blocks, starters, RTL; model, rendering, and the backend persistence/PDF contract.
- Document Render Service — Operating the optional
whity_renderPDF tier: the publishedghcr.io/<repo>/renderimage, why its tag must match the app’s, the memory a render actually costs, and the settings that bound it. - Navigation Customization — Design for a customizable sidebar: tenant default layout + per-user overrides gated by a tenant setting; server resolves RBAC ∩ tenant ∩ user.
- Internationalization — Translation keys derived from the code that renders them:
t('key', 'English')→ extracted catalogue → seeded rows → the console where a translator closes the gap. Includes the CI drift gate and how dynamic keys are declared. - Feature Flags — The
SettingsRegistry-based capability toggle mechanism: how a flag gates code, the generic admin page, the recipe for adding a new one, and the current inventory.
Contributing
Section titled “Contributing”- Development Workflow — How work is planned and shipped: the Instruction Set (IS) and the Tasker flow (
WC-XXnumbering, task lifecycle, parallel execution). - Testing Against PostgreSQL — Closing the SQLite/PostgreSQL dialect gap: how to point core’s and a plugin’s suites at a real engine, and the catalogue of differences that pass silently on SQLite.
- Package Releases — How the publishable packages (
@amroksaleh/ui, the PHP plugin SDK) are versioned and released: monorepo + independently-versioned packages, changesets, version-gated publish. - CONTRIBUTING.md — Dev setup, coding standards, testing, and the PR process.
- Plugin Development — Build plugins against
PluginInterface.
What is Whity Core?
Section titled “What is Whity Core?”Whity Core is a white-labeled multi-tenant PHP 8.4 framework for SaaS applications, served by FrankenPHP persistent workers over a shared PostgreSQL database.
Features:
- ✅ Multi-tenant (shared PostgreSQL, tenant isolation via
tenant_id+ request-scoped context) - ✅ Extensible plugins (auto-discovery, hot-reload, lifecycle isolation)
- ✅ Built-in RBAC security (
resource:actionpermissions, role hierarchy) - ✅ FrankenPHP persistent workers
- ✅ Production-ready
Getting Started
Section titled “Getting Started”composer require amroksaleh/whity-core:^1.0See Installation for details.
License
Section titled “License”AGPL-3.0-only with the Whity Plugin Exception (free software; plugins MIT)
Commercial licensing: amroksaleh@gmail.com