@fayz-ai/saas 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +42 -0
  2. package/package.json +4 -4
package/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # @fayz-ai/saas
2
+
3
+ > Turn plugins into a real multi-tenant SaaS with one `defineSaas` call.
4
+
5
+ [![npm](https://img.shields.io/npm/v/@fayz-ai/saas.svg)](https://www.npmjs.com/package/@fayz-ai/saas)
6
+ [![license](https://img.shields.io/npm/l/@fayz-ai/saas.svg)](https://github.com/FayaLabs/fayz-sdk/blob/main/LICENSE)
7
+
8
+ This is where the Fayz pitch becomes a product. `@fayz-ai/saas` 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.
9
+
10
+ A salon and a clinic ship from the same engine — `@fayz-ai/saas` 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.
11
+
12
+ ## What's inside
13
+ - **App factory** — `defineSaas`, `createSaasApp`, `createFayzApp`, `AdminScaffold`, `AdminShell`, `LoginPage` (manifest-first admin entry)
14
+ - **CRUD engine** — `CrudPage`, `CrudListView`, `CrudFormPage`, `CrudDetailPage`, `CrudCardGrid`, `createCrudPage`, `ImportWizard`, `exportToCSV`
15
+ - **Org / multi-tenancy** — `createSupabaseOrgAdapter`, `createMockOrgAdapter`, `OrgProvider`, `useTenant`, `useOrganizationStore`
16
+ - **Permissions** — `PermissionsProvider`, `PermissionGate`, `usePermission`, `useHasPermission`, `usePermissions`
17
+ - **Billing** — `useBillingStore` with `Subscription` / `Invoice` types (Stripe-backed)
18
+ - **Plugin framework UI** — `WidgetSlot`, `SettingsGroup`, `QuickActionsButton`, `ModuleActionBar`, `createPluginContext`, `createViewRouter`, `PluginRegistryManager`
19
+ - **Supabase + theme** — `createFayzSupabaseClient`, `getCoreSchemaClient`, `createFayzTheme`, `fayzThemePresets`
20
+
21
+ ## Install
22
+ ```bash
23
+ npm install @fayz-ai/saas
24
+ ```
25
+ Peer dep: `react` (^18/^19). Pulls in `@fayz-ai/core`, `@fayz-ai/auth`, and `@fayz-ai/ui`.
26
+
27
+ ## Usage
28
+ ```tsx
29
+ import { defineSaas } from '@fayz-ai/saas'
30
+
31
+ export default defineSaas({
32
+ name: 'Glow Studio',
33
+ plugins: [crmPlugin, agendaPlugin, financialPlugin],
34
+ org: { adapter: orgAdapter },
35
+ })
36
+ ```
37
+
38
+ ## Part of the Fayz SDK
39
+ The top of the stack — the multi-tenant SaaS layer that composes `core`, `auth`, and `ui` into a shippable app.
40
+
41
+ ## Roadmap & contributing
42
+ Built and evolving in the open. See the [Fayz SDK roadmap](../../docs/ROADMAP.md#saas) for current gaps, missing features, and good first issues.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fayz-ai/saas",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Fayz SDK SaaS layer — multi-tenancy, billing, permissions, org management",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -47,9 +47,9 @@
47
47
  "@tanstack/react-table": "^8.20.0",
48
48
  "cmdk": "^1.0.0",
49
49
  "@radix-ui/react-dialog": "^1.1.0",
50
- "@fayz-ai/auth": "^0.1.6",
51
- "@fayz-ai/ui": "^0.1.6",
52
- "@fayz-ai/core": "^0.1.6"
50
+ "@fayz-ai/core": "^0.1.7",
51
+ "@fayz-ai/auth": "^0.1.7",
52
+ "@fayz-ai/ui": "^0.1.7"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/react": "^18.3.0",