@fayz-ai/plugin-financial 0.1.1 → 0.1.2
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.
- package/README.md +50 -0
- package/package.json +4 -4
package/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# @fayz-ai/plugin-financial
|
|
2
|
+
|
|
3
|
+
> Order-to-cash for your SaaS — invoices, payables, cash, and commissions in one plugin.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@fayz-ai/plugin-financial)
|
|
6
|
+
[](https://github.com/FayaLabs/fayz-sdk/blob/main/LICENSE)
|
|
7
|
+
|
|
8
|
+
Most vertical SaaS bolts on finance as an afterthought: a "total" field, a spreadsheet export, and a prayer. `plugin-financial` makes money a first-class part of the app. It models the full order-to-cash loop — receivables, payables, cash registers, statements, card reconciliation, and commission rules — as composable modules you toggle per business.
|
|
9
|
+
|
|
10
|
+
It's built to be the financial spine other plugins lean on. Agenda creates orders against it, reports read from it, and the dashboard surfaces balance, cash flow, and overdue alerts without bespoke glue. Every module is optional, every label and currency is configurable, and item lines can resolve products and services from other plugins via entity lookups. Compose a real, money-aware SaaS instead of stitching one together.
|
|
11
|
+
|
|
12
|
+
## What's inside
|
|
13
|
+
- **Financial page** (`/financial`) — summary, accounts receivable & payable (with recurring), cash registers, statements, commissions (overview + rules), and cards (overview + reconciliation).
|
|
14
|
+
- **Invoice flow** — list, detail, and form views with configurable item types (service / product / other) and optional service-execution tracking.
|
|
15
|
+
- **Dashboard widgets** — total-balance / receivable / payable KPIs, a cash-flow chart, breakdown and overdue-alert panels, and a recent-transactions table.
|
|
16
|
+
- **AI tools** — `getRevenue`, `createInvoice`, `listPayables` for natural-language finance.
|
|
17
|
+
- **Cross-plugin hooks** — `entityLookups` and `contactLookup` to wire product/service/contact selectors, plus `onBookingClick` to jump from an invoice back to its booking.
|
|
18
|
+
- `createSafeFinancialProvider` (Supabase-or-mock) so the same provider can back both the plugin and a cross-plugin bridge; settings tab and i18n included.
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
```bash
|
|
22
|
+
npm install @fayz-ai/plugin-financial
|
|
23
|
+
```
|
|
24
|
+
Peer deps: `react`, `react-dom`. Runtime deps include `@fayz-ai/core`, `@fayz-ai/ui`, and `@fayz-ai/saas`.
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
```tsx
|
|
28
|
+
import { defineSaas } from '@fayz-ai/saas'
|
|
29
|
+
import { createFinancialPlugin } from '@fayz-ai/plugin-financial'
|
|
30
|
+
|
|
31
|
+
export const app = defineSaas({
|
|
32
|
+
// ...
|
|
33
|
+
plugins: [
|
|
34
|
+
createFinancialPlugin({
|
|
35
|
+
currency: { code: 'BRL', locale: 'pt-BR', symbol: 'R$' },
|
|
36
|
+
modules: { commissions: true, cards: false },
|
|
37
|
+
itemTypes: [
|
|
38
|
+
{ value: 'service', label: 'Service', icon: 'Briefcase' },
|
|
39
|
+
{ value: 'product', label: 'Product', icon: 'Package' },
|
|
40
|
+
],
|
|
41
|
+
}),
|
|
42
|
+
],
|
|
43
|
+
})
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Part of the Fayz SDK
|
|
47
|
+
`plugin-financial` is the money layer of the SDK. It pairs with `@fayz-ai/plugin-agenda` (bookings auto-create orders via the financial bridge) and feeds `@fayz-ai/plugin-reports` for revenue and commission reporting.
|
|
48
|
+
|
|
49
|
+
## Roadmap & contributing
|
|
50
|
+
Built and evolving in the open. See the [Fayz SDK roadmap](../../docs/ROADMAP.md#plugin-financial) for current gaps, missing features, and good first issues.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fayz-ai/plugin-financial",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Fayz SDK — plugin-financial plugin",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"lucide-react": "^0.400.0",
|
|
27
27
|
"zustand": "^4.5.0",
|
|
28
28
|
"@tanstack/react-table": "^8.20.0",
|
|
29
|
-
"@fayz-ai/
|
|
30
|
-
"@fayz-ai/
|
|
31
|
-
"@fayz-ai/
|
|
29
|
+
"@fayz-ai/saas": "^0.1.7",
|
|
30
|
+
"@fayz-ai/ui": "^0.1.7",
|
|
31
|
+
"@fayz-ai/core": "^0.1.7"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/react": "^18.3.0",
|