@fayz-ai/plugin-marketing 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.
Files changed (2) hide show
  1. package/README.md +49 -0
  2. package/package.json +4 -4
package/README.md ADDED
@@ -0,0 +1,49 @@
1
+ # @fayz-ai/plugin-marketing
2
+
3
+ > One acquisition & conversion engine — every channel, every vertical.
4
+
5
+ [![npm](https://img.shields.io/npm/v/@fayz-ai/plugin-marketing.svg)](https://www.npmjs.com/package/@fayz-ai/plugin-marketing)
6
+ [![license](https://img.shields.io/npm/l/@fayz-ai/plugin-marketing.svg)](https://github.com/FayaLabs/fayz-sdk/blob/main/LICENSE)
7
+
8
+ Marketing analytics are always the same shape — channels, campaigns, a funnel, landing-page CVR — but what counts as a "conversion" changes per business. A salon converts a booking, a store converts an order, an agency converts a lead. `plugin-marketing` is one plugin that adapts to all of them: pick a `domain` preset (or pass an explicit conversion model + channels) and the funnel, channel performance, and cost-per-acquisition are computed generically on top of it.
9
+
10
+ It ships a vertical-flavored mock today so the surface is real from the first install. Real attribution arrives through clean DI seams — an `AttributionBridge` to read conversions from CRM/agenda/orders, and a `SitesPerformanceBridge` to read landing-page numbers from your sites — so you wire reality in without rewriting the plugin. Campaigns and channels are first-class, and the whole thing exposes AI tools so your assistant can answer "which channel converts best?" out loud.
11
+
12
+ ## What's inside
13
+ - A `/marketing` workspace: overview, channels (list + detail), campaigns (list + composer), funnel, and landing pages
14
+ - `domain` presets that set the conversion model + acquisition channels per vertical (defaults to `agency`)
15
+ - Generic channel performance (reach, conversions, CVR, spend, CPA), funnel, and campaign CVR
16
+ - DI seams: `attributionBridge` and `sitesBridge` to feed real data when it's ready
17
+ - Domain events: `marketing.conversion.tracked`, `campaign.created`, `campaign.updated`, `channel.synced`
18
+ - AI tools: `channelPerformance`, `topChannels`, `campaignCvr`, and `createCampaign`
19
+ - Dashboard widgets, a central Settings tab, currency formatting, and full i18n
20
+ - Exported `MARKETING_PRESETS` and a mock provider for local development
21
+
22
+ ## Install
23
+ ```bash
24
+ npm install @fayz-ai/plugin-marketing
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 { createMarketingPlugin } from '@fayz-ai/plugin-marketing'
32
+
33
+ export const app = defineSaas({
34
+ // ...
35
+ plugins: [
36
+ createMarketingPlugin({
37
+ domain: 'beauty', // conversion model + channels from the preset
38
+ currency: { code: 'BRL' },
39
+ // attributionBridge / sitesBridge wire real data in later
40
+ }),
41
+ ],
42
+ })
43
+ ```
44
+
45
+ ## Part of the Fayz SDK
46
+ The acquisition half of growth. Pairs with `plugin-crm` (the leads and deals it converts into), `plugin-conversations` (broadcast replies land in the inbox), and `plugin-reputation` (social proof that lifts CVR).
47
+
48
+ ## Roadmap & contributing
49
+ Built and evolving in the open. See the [Fayz SDK roadmap](../../docs/ROADMAP.md#plugin-marketing) 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-marketing",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Fayz SDK — marketing campaigns & broadcasts plugin",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -26,9 +26,9 @@
26
26
  "@tanstack/react-table": "^8.20.0",
27
27
  "lucide-react": "^0.400.0",
28
28
  "zustand": "^4.5.0",
29
- "@fayz-ai/ui": "^0.1.6",
30
- "@fayz-ai/saas": "^0.1.6",
31
- "@fayz-ai/core": "^0.1.6"
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",