@fayz-ai/admin
v0.16.0
Published
Fayz SDK admin layer — the admin shell, CRUD engine, multi-tenancy, billing, permissions and org management
Downloads
3,196
Readme
@fayz-ai/admin
Turn plugins into a real multi-tenant SaaS with one
defineSaascall.
Status: beta — published to npm and used across Fayz dogfood apps. Pre-1.0: minor APIs may change before 1.0.
This is where the Fayz pitch becomes a product. @fayz-ai/admin is the multi-tenant layer that wraps the headless core in everything a commercial app needs: organizations and tenancy, role-based permissions, billing, a native CRUD engine, and a full admin shell. You enable a set of plugins, call defineSaas, and get a running app with auth, org switching, permission gates, and a generated admin UI.
A salon and a clinic ship from the same engine — @fayz-ai/admin is the part that makes each one a real, isolated, billable tenant. Plugins snap in; this layer gives them an org to live in, a user to act as, and a shell to render through.
What's inside
- App factory —
defineSaas,AdminScaffold,AdminShell,LoginPage(manifest-first admin entry) - CRUD engine —
CrudPage,CrudListView,CrudFormPage,CrudDetailPage,CrudCardGrid,createCrudPage,ImportWizard,exportToCSV - Org / multi-tenancy —
createSupabaseOrgAdapter,createMockOrgAdapter,OrgProvider,useTenant,useOrganizationStore - Permissions —
PermissionsProvider,PermissionGate,usePermission,useHasPermission,usePermissions - Billing —
useBillingStorewithSubscription/Invoicetypes (Stripe-backed) - Plugin framework UI —
WidgetSlot,SettingsGroup,QuickActionsButton,ModuleActionBar,createPluginContext,createViewRouter,PluginRegistryManager - Supabase + theme —
createFayzSupabaseClient,getCoreSchemaClient,createFayzTheme,fayzThemePresets
Install
npm install @fayz-ai/adminPeer dep: react (^18/^19). Pulls in @fayz-ai/core, @fayz-ai/auth, and @fayz-ai/ui.
Usage
import { defineSaas } from '@fayz-ai/admin'
export default defineSaas({
name: 'Glow Studio',
plugins: [crmPlugin, agendaPlugin, financialPlugin],
org: { adapter: orgAdapter },
})Part of the Fayz SDK
The top of the stack — the multi-tenant SaaS layer that composes core, auth, and ui into a shippable app.
Roadmap & contributing
Built and evolving in the open. See the Fayz SDK roadmap for current gaps, missing features, and good first issues.
