@fayz-ai/plugin-crm 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 +53 -0
- package/package.json +4 -4
package/README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# @fayz-ai/plugin-crm
|
|
2
|
+
|
|
3
|
+
> Leads, deals, quotes, and pipeline — the sales spine for any Fayz SaaS.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@fayz-ai/plugin-crm)
|
|
6
|
+
[](https://github.com/FayaLabs/fayz-sdk/blob/main/LICENSE)
|
|
7
|
+
|
|
8
|
+
Every business that sells anything needs a way to track who's interested, what's in motion, and what's about to close. Most verticals end up rebuilding the same CRM badly. `plugin-crm` is the one sales engine — leads, a drag-style pipeline, deals, quotes, and activities — that snaps into a `defineSaas` app and adapts to the vertical underneath it.
|
|
9
|
+
|
|
10
|
+
A salon tracks "customers", a clinic tracks "patients", an agency tracks "clients" — same engine, different labels and stages. The plugin ships a full UI today, a vertical-aware label/stage/source config, AI tools your assistant can call, and a data-provider seam that runs on a mock or a Supabase backend. When a lead is approved it can convert a person into a real client record in your domain schema. This is what "compose a real SaaS from plugins" means in practice.
|
|
11
|
+
|
|
12
|
+
## What's inside
|
|
13
|
+
- A `/sales` workspace: dashboard, pipeline, leads (list + detail + form), deals, quotes (list + detail + form), and activities — toggle modules on or off
|
|
14
|
+
- Configurable lead sources, deal stages (name/color/probability), activity types, and item types
|
|
15
|
+
- Currency-aware quotes (defaults to BRL/pt-BR) with cross-plugin entity lookups for products/services and contacts
|
|
16
|
+
- Lead → client conversion that updates `persons.kind` and writes your extension table (e.g. `clients`)
|
|
17
|
+
- Dashboard widgets contributed to the app's overview
|
|
18
|
+
- AI tools: `countCustomers`, `listLeads` — with vertical-flavored suggested prompts
|
|
19
|
+
- A central Settings tab (general + pipeline) and full i18n
|
|
20
|
+
- Pluggable data: mock provider out of the box, Supabase provider when a client is registered
|
|
21
|
+
|
|
22
|
+
## Install
|
|
23
|
+
```bash
|
|
24
|
+
npm install @fayz-ai/plugin-crm
|
|
25
|
+
```
|
|
26
|
+
Peer deps: `@fayz-ai/core`, `@fayz-ai/ui`, `@fayz-ai/saas`, plus `react` / `react-dom`.
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
```tsx
|
|
30
|
+
import { defineSaas } from '@fayz-ai/saas'
|
|
31
|
+
import { createCrmPlugin } from '@fayz-ai/plugin-crm'
|
|
32
|
+
|
|
33
|
+
export const app = defineSaas({
|
|
34
|
+
// ...
|
|
35
|
+
plugins: [
|
|
36
|
+
createCrmPlugin({
|
|
37
|
+
labels: { pageTitle: 'Sales', leads: 'Leads' },
|
|
38
|
+
currency: { code: 'BRL', locale: 'pt-BR', symbol: 'R$' },
|
|
39
|
+
dealStages: [
|
|
40
|
+
{ name: 'New', color: '#64748b', probability: 10 },
|
|
41
|
+
{ name: 'Won', color: '#16a34a', probability: 100 },
|
|
42
|
+
],
|
|
43
|
+
clientConversion: { archetypeKind: 'customer', extensionTable: 'clients', fkColumn: 'person_id' },
|
|
44
|
+
}),
|
|
45
|
+
],
|
|
46
|
+
})
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Part of the Fayz SDK
|
|
50
|
+
The sales core of the engine. Pairs naturally with `plugin-marketing` (where the leads come from), `plugin-conversations` (where you talk to them), and `plugin-reputation` (what they say afterward).
|
|
51
|
+
|
|
52
|
+
## Roadmap & contributing
|
|
53
|
+
Built and evolving in the open. See the [Fayz SDK roadmap](../../docs/ROADMAP.md#plugin-crm) 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-crm",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Fayz SDK — plugin-crm 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/saas": "^0.1.
|
|
31
|
-
"@fayz-ai/
|
|
29
|
+
"@fayz-ai/core": "^0.1.7",
|
|
30
|
+
"@fayz-ai/saas": "^0.1.7",
|
|
31
|
+
"@fayz-ai/ui": "^0.1.7"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/react": "^18.3.0",
|