@vicacha-devs/medusa-plugin-stories 0.0.0-stage → 0.1.0
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/.medusa/server/src/__tests__/stories-plugin.spec.js +358 -0
- package/.medusa/server/src/admin/i18n/index.js +35 -0
- package/.medusa/server/src/admin/i18n/json/ar.json +196 -0
- package/.medusa/server/src/admin/i18n/json/de.json +196 -0
- package/.medusa/server/src/admin/i18n/json/en.json +196 -0
- package/.medusa/server/src/admin/i18n/json/es.json +196 -0
- package/.medusa/server/src/admin/i18n/json/fr.json +196 -0
- package/.medusa/server/src/admin/i18n/json/it.json +196 -0
- package/.medusa/server/src/admin/i18n/json/nl.json +196 -0
- package/.medusa/server/src/admin/i18n/json/pl.json +196 -0
- package/.medusa/server/src/admin/i18n/json/pt.json +196 -0
- package/.medusa/server/src/admin/i18n/json/tr.json +196 -0
- package/.medusa/server/src/admin/index.cjs +4699 -0
- package/.medusa/server/src/admin/index.js +4699 -0
- package/.medusa/server/src/api/admin/plugin/route.js +4 -0
- package/.medusa/server/src/api/admin/stories/[id]/hotspots/route.js +14 -0
- package/.medusa/server/src/api/admin/stories/[id]/route.js +27 -0
- package/.medusa/server/src/api/admin/stories/[id]/stickers/route.js +14 -0
- package/.medusa/server/src/api/admin/stories/analytics/route.js +7 -0
- package/.medusa/server/src/api/admin/stories/groups/[id]/route.js +23 -0
- package/.medusa/server/src/api/admin/stories/groups/route.js +15 -0
- package/.medusa/server/src/api/admin/stories/route.js +21 -0
- package/.medusa/server/src/api/middlewares.js +58 -0
- package/.medusa/server/src/api/store/plugin/route.js +4 -0
- package/.medusa/server/src/api/store/stories/[id]/events/route.js +12 -0
- package/.medusa/server/src/api/store/stories/[id]/interact/route.js +14 -0
- package/.medusa/server/src/api/store/stories/route.js +33 -0
- package/.medusa/server/src/api/validators.js +136 -0
- package/.medusa/server/src/hooks/index.js +213 -0
- package/.medusa/server/src/hooks/use-sdk-primitives.js +93 -0
- package/.medusa/server/src/index.js +6 -0
- package/.medusa/server/src/jobs/expire-ephemeral-stories.js +10 -0
- package/.medusa/server/src/modules/index.js +7 -0
- package/.medusa/server/src/modules/stories/index.js +3 -0
- package/.medusa/server/src/modules/story/index.js +23 -0
- package/.medusa/server/src/modules/story/migrations/Migration20260514000000.js +181 -0
- package/.medusa/server/src/modules/story/models/index.js +141 -0
- package/.medusa/server/src/modules/story/service.js +673 -0
- package/.medusa/server/src/modules/story/types.js +3 -0
- package/.medusa/server/src/modules/story/utils/security.js +76 -0
- package/.medusa/server/src/rbac.js +75 -0
- package/.medusa/server/src/sdk/index.js +148 -0
- package/.medusa/server/src/subscribers/product-deleted.js +11 -0
- package/.medusa/server/src/types/index.js +2 -0
- package/.medusa/server/src/ui/index.js +5 -0
- package/.medusa/server/src/ui/story-hotspot-pin.js +43 -0
- package/.medusa/server/src/ui/story-player-modal.js +104 -0
- package/.medusa/server/src/ui/story-product-sheet.js +7 -0
- package/.medusa/server/src/ui/story-rings-bar.js +42 -0
- package/.medusa/server/src/workflows/index.js +50 -0
- package/LICENSE +21 -0
- package/README.md +246 -2
- package/package.json +132 -3
- package/src/__tests__/medusa-shim.mjs +533 -0
- package/src/__tests__/register-ts-resolver.mjs +141 -0
- package/src/__tests__/stories-plugin.spec.ts +526 -0
- package/src/admin/README.md +94 -0
- package/src/admin/components/analytics-tab.tsx +225 -0
- package/src/admin/components/canvas-editor-tab.tsx +77 -0
- package/src/admin/components/hotspot-form-section.tsx +155 -0
- package/src/admin/components/index.ts +15 -0
- package/src/admin/components/overview-cards.tsx +96 -0
- package/src/admin/components/product-stories-card.tsx +123 -0
- package/src/admin/components/rbac-guard.tsx +153 -0
- package/src/admin/components/slide-form-section.tsx +187 -0
- package/src/admin/components/slide-preview-canvas.tsx +166 -0
- package/src/admin/components/slide-timeline-section.tsx +126 -0
- package/src/admin/components/sticker-form-section.tsx +201 -0
- package/src/admin/components/sticker-list-section.tsx +113 -0
- package/src/admin/components/stickers-tab.tsx +34 -0
- package/src/admin/components/story-ring-form.tsx +241 -0
- package/src/admin/components/story-rings-tab.tsx +204 -0
- package/src/admin/components/story-rings-table.tsx +222 -0
- package/src/admin/components/studio-header.tsx +67 -0
- package/src/admin/hooks/use-product-stories.ts +71 -0
- package/src/admin/hooks/use-stories-studio.ts +439 -0
- package/src/admin/i18n/README.md +84 -0
- package/src/admin/i18n/index.ts +36 -0
- package/src/admin/i18n/json/ar.json +196 -0
- package/src/admin/i18n/json/de.json +196 -0
- package/src/admin/i18n/json/en.json +196 -0
- package/src/admin/i18n/json/es.json +196 -0
- package/src/admin/i18n/json/fr.json +196 -0
- package/src/admin/i18n/json/it.json +196 -0
- package/src/admin/i18n/json/nl.json +196 -0
- package/src/admin/i18n/json/pl.json +196 -0
- package/src/admin/i18n/json/pt.json +196 -0
- package/src/admin/i18n/json/tr.json +196 -0
- package/src/admin/routes/stories/analytics/page.tsx +66 -0
- package/src/admin/routes/stories/canvas/page.tsx +101 -0
- package/src/admin/routes/stories/page.tsx +164 -0
- package/src/admin/routes/stories/rings/@create/page.tsx +61 -0
- package/src/admin/routes/stories/rings/page.tsx +88 -0
- package/src/admin/routes/stories/stickers/page.tsx +74 -0
- package/src/admin/tsconfig.json +23 -0
- package/src/admin/utils/theme-presets.ts +94 -0
- package/src/admin/vite-env.d.ts +1 -0
- package/src/admin/widgets/product-stories-widget.tsx +32 -0
- package/src/api/README.md +61 -0
- package/src/api/admin/plugin/route.ts +5 -0
- package/src/api/admin/stories/[id]/hotspots/route.ts +17 -0
- package/src/api/admin/stories/[id]/route.ts +40 -0
- package/src/api/admin/stories/[id]/stickers/route.ts +20 -0
- package/src/api/admin/stories/analytics/route.ts +8 -0
- package/src/api/admin/stories/groups/[id]/route.ts +30 -0
- package/src/api/admin/stories/groups/route.ts +18 -0
- package/src/api/admin/stories/route.ts +31 -0
- package/src/api/middlewares.ts +73 -0
- package/src/api/store/plugin/route.ts +5 -0
- package/src/api/store/stories/[id]/events/route.ts +14 -0
- package/src/api/store/stories/[id]/interact/route.ts +18 -0
- package/src/api/store/stories/route.ts +44 -0
- package/src/api/validators.ts +166 -0
- package/src/hooks/index.ts +419 -0
- package/src/hooks/use-sdk-primitives.ts +114 -0
- package/src/index.ts +14 -0
- package/src/jobs/README.md +16 -0
- package/src/jobs/expire-ephemeral-stories.ts +14 -0
- package/src/links/README.md +18 -0
- package/src/modules/README.md +46 -0
- package/src/modules/index.ts +15 -0
- package/src/modules/stories/index.ts +11 -0
- package/src/modules/story/index.ts +34 -0
- package/src/modules/story/migrations/Migration20260514000000.ts +196 -0
- package/src/modules/story/models/index.ts +146 -0
- package/src/modules/story/service.ts +1052 -0
- package/src/modules/story/types.ts +190 -0
- package/src/modules/story/utils/security.ts +100 -0
- package/src/providers/README.md +14 -0
- package/src/rbac.ts +89 -0
- package/src/sdk/index.ts +233 -0
- package/src/subscribers/README.md +16 -0
- package/src/subscribers/product-deleted.ts +15 -0
- package/src/types/index.ts +1 -0
- package/src/types/medusa-ui.d.ts +451 -0
- package/src/ui/index.ts +4 -0
- package/src/ui/story-hotspot-pin.tsx +122 -0
- package/src/ui/story-player-modal.tsx +361 -0
- package/src/ui/story-product-sheet.tsx +85 -0
- package/src/ui/story-rings-bar.tsx +113 -0
- package/src/workflows/README.md +19 -0
- package/src/workflows/index.ts +217 -0
- package/tsconfig.json +39 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { createStep, createWorkflow, StepResponse, WorkflowResponse, } from "@medusajs/framework/workflows-sdk";
|
|
2
|
+
import { resolveStoriesService, } from "../modules/story";
|
|
3
|
+
const createStoryGroupStep = createStep("create-story-group", async (input, { container }) => {
|
|
4
|
+
const storiesService = resolveStoriesService(container);
|
|
5
|
+
const group = await storiesService.createGroup(input);
|
|
6
|
+
return new StepResponse(group, { groupId: group.id });
|
|
7
|
+
}, async (compInput, { container }) => {
|
|
8
|
+
if (!compInput?.groupId)
|
|
9
|
+
return;
|
|
10
|
+
const storiesService = resolveStoriesService(container);
|
|
11
|
+
await storiesService.deleteGroup(compInput.groupId);
|
|
12
|
+
});
|
|
13
|
+
export const createStoryGroupWorkflow = createWorkflow("create-story-group", (input) => {
|
|
14
|
+
const group = createStoryGroupStep(input);
|
|
15
|
+
return new WorkflowResponse(group);
|
|
16
|
+
});
|
|
17
|
+
const createStorySlideStep = createStep("create-story-slide", async (input, { container }) => {
|
|
18
|
+
const storiesService = resolveStoriesService(container);
|
|
19
|
+
const slide = await storiesService.createSlide(input);
|
|
20
|
+
return new StepResponse(slide, { slideId: slide.id });
|
|
21
|
+
}, async (compInput, { container }) => {
|
|
22
|
+
if (!compInput?.slideId)
|
|
23
|
+
return;
|
|
24
|
+
const storiesService = resolveStoriesService(container);
|
|
25
|
+
await storiesService.deleteSlide(compInput.slideId);
|
|
26
|
+
});
|
|
27
|
+
export const createStorySlideWorkflow = createWorkflow("create-story-slide", (input) => {
|
|
28
|
+
const slide = createStorySlideStep(input);
|
|
29
|
+
return new WorkflowResponse(slide);
|
|
30
|
+
});
|
|
31
|
+
const recordStoryEngagementStep = createStep("record-story-engagement", async (input, { container }) => {
|
|
32
|
+
const storiesService = resolveStoriesService(container);
|
|
33
|
+
const res = await storiesService.recordEngagementEvent(input);
|
|
34
|
+
return new StepResponse(res);
|
|
35
|
+
});
|
|
36
|
+
export const recordStoryEngagementWorkflow = createWorkflow("record-story-engagement", (input) => {
|
|
37
|
+
const res = recordStoryEngagementStep(input);
|
|
38
|
+
return new WorkflowResponse(res);
|
|
39
|
+
});
|
|
40
|
+
const expireEphemeralStoriesStep = createStep("expire-ephemeral-stories", async (_input, { container }) => {
|
|
41
|
+
const storiesService = resolveStoriesService(container);
|
|
42
|
+
const res = await storiesService.expireOutdatedStories();
|
|
43
|
+
return new StepResponse(res);
|
|
44
|
+
});
|
|
45
|
+
export const expireEphemeralStoriesWorkflow = createWorkflow("expire-ephemeral-stories", (input = {}) => {
|
|
46
|
+
const res = expireEphemeralStoriesStep(input);
|
|
47
|
+
return new WorkflowResponse(res);
|
|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FxQixFQUFFLENBQUE7SUFDeEQsT0FBTyxJQUFJLFlBQVksQ0FBQyxHQUFHLENBQUMsQ0FBQTtBQUM5QixDQUFDLENBQ0YsQ0FBQTtBQUVELE1BQU0sQ0FBQyxNQUFNLDhCQUE4QixHQUFHLGNBQWMsQ0FDMUQsMEJBQTBCLEVBQzFCLENBQUMsUUFBK0IsRUFBRSxFQUFFLEVBQUU7SUFDcEMsTUFBTSxHQUFHLEdBQUcsMEJBQTBCLENBQUMsS0FBSyxDQUFDLENBQUE7SUFDN0MsT0FBTyxJQUFJLGdCQUFnQixDQUFDLEdBQUcsQ0FBQyxDQUFBO0FBQ2xDLENBQUMsQ0FDRixDQUFBO0FBRUQsTUFBTSxDQUFDLE1BQU0scUJBQXFCLEdBQUcsOEJBQThCLENBQUEifQ==
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Medusa
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,247 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@vicacha-devs/medusa-plugin-stories`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Full-featured **9:16 Shoppable Stories, Highlight Rings, Interactive Stickers, Conversion Funnel Analytics, and Storefront React UI Kit** for **Medusa v2 (`2.21.x`)**.
|
|
4
|
+
|
|
5
|
+
100% drop-in backward-compatible with `@bambiste/medusa-stories` (`STORIES_MODULE = "stories"`, `Story` model, `expireStoriesWorkflow`) while adding multi-slide Story Highlight Rings (`StoryGroup`), interactive X/Y Product Hotspots (`StoryHotspot`), Poll/Countdown/Coupon/Q&A Stickers (`StorySticker`), Conversion Funnel Analytics (`StoryEvent`), a visual 9:16 Admin Studio, a Product Details Admin Widget, and drop-in Storefront React components (`@vicacha-devs/medusa-plugin-stories/ui`).
|
|
6
|
+
|
|
7
|
+
> **Medusa compatibility:** `2.21.x` — keep peer dependencies aligned with your host application.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Contents
|
|
12
|
+
|
|
13
|
+
- [Features](#features)
|
|
14
|
+
- [Requirements](#requirements)
|
|
15
|
+
- [Installation & Configuration](#installation--configuration)
|
|
16
|
+
- [Architecture](#architecture)
|
|
17
|
+
- [Module & Data Models](#module--data-models)
|
|
18
|
+
- [Workflows](#workflows)
|
|
19
|
+
- [Scheduled Jobs & Subscribers](#scheduled-jobs--subscribers)
|
|
20
|
+
- [REST API](#rest-api)
|
|
21
|
+
- [Admin UI & Widgets](#admin-ui--widgets)
|
|
22
|
+
- [Storefront SDK, Hooks & UI Kit](#storefront-sdk-hooks--ui-kit)
|
|
23
|
+
- [Development](#development)
|
|
24
|
+
- [License](#license)
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Features
|
|
29
|
+
|
|
30
|
+
- **Multi-Slide Story Groups & Highlight Rings (`StoryGroup`)** — Organize 9:16 slides into circular Highlight Rings (`instagram`, `tiktok`, `sunset`, `emerald`, `violet`, `cyber`, `neon`, `gold`, `minimal`, or `custom` hex gradients) scoped by placement zone (`home`, `collection`, `category`, `product`, `floating_bubble`, `global`).
|
|
31
|
+
- **Interactive X/Y Shoppable Product Hotspots (`StoryHotspot`)** — Pin up to `max_hotspots_per_slide` Medusa products at exact `(x_percent, y_percent)` coordinates on any 9:16 image or video slide with `pill`, `card`, or `dot` badge styles.
|
|
32
|
+
- **Interactive Engagement Stickers (`StorySticker`)** — Attach live **Polls** (with real-time vote tallying), **Countdown Timers**, **One-Tap Coupon Reveal badges**, and **Q&A Boxes** to slides.
|
|
33
|
+
- **24-Hour Ephemeral & Pinned Highlights** — Schedule `starts_at` and `expires_at` timestamps with automatic cron cleanup (`expire-ephemeral-stories` every 15 minutes) or pin evergreen Highlight Rings.
|
|
34
|
+
- **Conversion Funnel Analytics (`StoryEvent`)** — Track `impression` → `complete` → `hotspot_click` → `link_click` → `add_to_cart` → `sticker_interact` with per-slide completion rates and Hotspot CTR.
|
|
35
|
+
- **Decoupled Admin Studio & Product Widget (`src/admin/`)** —
|
|
36
|
+
- `/stories`, `/stories/canvas`, `/stories/rings`, `/stories/rings/create`, `/stories/stickers`, `/stories/analytics` — 9:16 Visual Canvas & Hotspot Tagger, Highlight Rings Manager, Interactive Stickers Builder, and Conversion Funnel Analytics (`< 170` lines per file), localized across 10 languages (`en`, `es`, `fr`, `de`, `it`, `pt`, `nl`, `pl`, `tr`, `ar`).
|
|
37
|
+
- `product.details.after` Widget — See which stories feature a product and 1-click generate a shoppable 9:16 slide directly from the product page.
|
|
38
|
+
- **Drop-In Storefront React UI Kit (`@vicacha-devs/medusa-plugin-stories/ui`)** —
|
|
39
|
+
- `<StoryRingsBar />` — Circular animated Story Highlight rings with seen/unseen `localStorage` state.
|
|
40
|
+
- `<StoryPlayerModal />` — Fullscreen 9:16 modal with segmented progress bars, hold-to-pause, keyboard arrows, hotspot pins, interactive stickers, and bottom product sheet.
|
|
41
|
+
- `<StoryHotspotPin />` & `<StoryProductSheet />` — Standalone building blocks for custom storefront players.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Requirements
|
|
46
|
+
|
|
47
|
+
| Dependency | Version |
|
|
48
|
+
| ------------------ | ---------------------------- |
|
|
49
|
+
| `@medusajs/medusa` | `2.21.x` |
|
|
50
|
+
| Node.js | `^20.19.0 \|\| >=22.12.0` |
|
|
51
|
+
| Package Manager | `pnpm 11.x` / `npm` / `yarn` |
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Installation & Configuration
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pnpm add @vicacha-devs/medusa-plugin-stories
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Register the plugin in `medusa-config.ts`:
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
import { defineConfig } from "@medusajs/framework/utils"
|
|
65
|
+
|
|
66
|
+
export default defineConfig({
|
|
67
|
+
plugins: [
|
|
68
|
+
{
|
|
69
|
+
resolve: "@vicacha-devs/medusa-plugin-stories",
|
|
70
|
+
options: {
|
|
71
|
+
default_slide_duration_ms: 5000,
|
|
72
|
+
max_hotspots_per_slide: 6,
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
})
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Run database migrations to create the 5 module tables:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npx medusa db:migrate
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Architecture
|
|
88
|
+
|
|
89
|
+
```text
|
|
90
|
+
Medusa v2 Host Application
|
|
91
|
+
├── Module: stories (StoriesModuleService)
|
|
92
|
+
│ ├─ StoryGroup (mps_story_group) ── 1:N ──► Story (story)
|
|
93
|
+
│ │ ├─ StoryHotspot[] (mps_story_hotspot)
|
|
94
|
+
│ │ ├─ StorySticker[] (mps_story_sticker)
|
|
95
|
+
│ │ └─ StoryEvent[] (mps_story_event)
|
|
96
|
+
│ └─ Security utils: sanitizeSafeUrl, sanitizeHexColor, clampPercentage
|
|
97
|
+
├── Workflows: create-story-group, create-story-slide, record-story-engagement, expire-ephemeral-stories
|
|
98
|
+
├── Job: expire-ephemeral-stories (*/15 * * * *)
|
|
99
|
+
├── Subscriber: product.deleted (removes StoryHotspot rows for deleted products)
|
|
100
|
+
├── Admin UI (/stories/* + product.details.after widget)
|
|
101
|
+
└── Storefront SDK, Hooks (useStoreStories, useStoryPlayer) & UI Kit (StoryRingsBar, StoryPlayerModal)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Module & Data Models
|
|
107
|
+
|
|
108
|
+
**Module Service Token:** `STORIES_MODULE = "stories"` (100% compatible with `@bambiste/medusa-stories`, also re-exported at `src/modules/stories/index.ts`)
|
|
109
|
+
**Service Class:** `StoriesModuleService` (`src/modules/story/service.ts`)
|
|
110
|
+
|
|
111
|
+
| Model | Table Name | Prefix | Key Columns |
|
|
112
|
+
| -------------- | ------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
113
|
+
| `StoryGroup` | `mps_story_group` | `sgrp_` | `id`, `title`, `handle`, `subtitle`, `avatar_url`, `ring_theme`, `custom_ring_color`, `placement`, `target_entity_id`, `is_pinned`, `is_ephemeral`, `is_active`, `display_order`, `metadata` |
|
|
114
|
+
| `Story` | `story` | `stry_` | `id`, `group_id`, `title`, `caption`, `media_type` (`image \| video`), `media_url`, `thumbnail_url`, `duration_ms`, `link_url`, `link_text`, `is_active`, `display_order`, `starts_at`, `expires_at`, `views_count`, `completions_count`, `clicks_count`, `cart_conversions_count`, `metadata` |
|
|
115
|
+
| `StoryHotspot` | `mps_story_hotspot` | `shsp_` | `id`, `story_id`, `product_id`, `variant_id`, `product_title`, `product_handle`, `product_thumbnail`, `price_formatted`, `price_amount`, `currency_code`, `x_percent`, `y_percent`, `label`, `badge_style` (`pill \| card \| dot`) |
|
|
116
|
+
| `StorySticker` | `mps_story_sticker` | `sstk_` | `id`, `story_id`, `type` (`poll \| countdown \| coupon \| question_badge`), `prompt`, `x_percent`, `y_percent`, `options`, `coupon_code`, `countdown_until`, `total_interactions`, `metadata` |
|
|
117
|
+
| `StoryEvent` | `mps_story_event` | `sevt_` | `id`, `story_id`, `group_id`, `event_type` (`impression \| complete \| tap_forward \| tap_back \| exit \| hotspot_click \| link_click \| add_to_cart \| sticker_interact`), `hotspot_id`, `sticker_id`, `product_id`, `session_id`, `metadata` |
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Workflows
|
|
122
|
+
|
|
123
|
+
| Workflow ID | Export | Compensation | Trigger |
|
|
124
|
+
| -------------------------- | ---------------------------------------------------------------- | --------------------------------------------------------- | ---------------------------------------- |
|
|
125
|
+
| `create-story-group` | `createStoryGroupWorkflow` | Deletes created `StoryGroup` | `POST /admin/stories/groups` |
|
|
126
|
+
| `create-story-slide` | `createStorySlideWorkflow` | Deletes created `Story` slide (and its hotspots/stickers) | `POST /admin/stories` |
|
|
127
|
+
| `record-story-engagement` | `recordStoryEngagementWorkflow` | — | `POST /store/stories/:id/events` |
|
|
128
|
+
| `expire-ephemeral-stories` | `expireEphemeralStoriesWorkflow` (alias `expireStoriesWorkflow`) | — | Scheduled job `expire-ephemeral-stories` |
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Scheduled Jobs & Subscribers
|
|
133
|
+
|
|
134
|
+
| Type | File | Trigger / Schedule | Behavior |
|
|
135
|
+
| -------------- | -------------------------------------- | --------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
|
136
|
+
| **Job** | `src/jobs/expire-ephemeral-stories.ts` | `*/15 * * * *` (Every 15 minutes) | Calls `storiesService.expireOutdatedStories()` to deactivate slides whose `expires_at` is in the past |
|
|
137
|
+
| **Subscriber** | `src/subscribers/product-deleted.ts` | `product.deleted` | Calls `storiesService.removeHotspotsByProductId(data.id)` so deleted products are removed from story slides |
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## REST API
|
|
142
|
+
|
|
143
|
+
### Storefront Endpoints (`/store/stories/*`)
|
|
144
|
+
|
|
145
|
+
| Method | Path | Description |
|
|
146
|
+
| ------ | ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
147
|
+
| `GET` | `/store/stories` | Lists active, non-expired Story Highlight Rings (`groups`) and slides (`stories`). Query params: `placement`, `target_entity_id`, `collection_id`, `group_id`, `product_id`. |
|
|
148
|
+
| `POST` | `/store/stories/:id/events` | Records `impression`, `complete`, `tap_forward`, `tap_back`, `exit`, `hotspot_click`, `link_click`, `add_to_cart`, or `sticker_interact` and increments funnel counters. |
|
|
149
|
+
| `POST` | `/store/stories/:id/interact` | Votes on a `poll` sticker (`option_id`), submits a `question_badge` answer (`answer_text`), or claims a `coupon` sticker. |
|
|
150
|
+
|
|
151
|
+
### Admin Endpoints (`/admin/stories/*`)
|
|
152
|
+
|
|
153
|
+
| Method | Path | Description |
|
|
154
|
+
| -------------------------- | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
155
|
+
| `GET` / `POST` | `/admin/stories` | List full studio state (`stories` + `groups`, optional `?product_id=...`) or create a 9:16 story slide (`createStorySlideWorkflow`). |
|
|
156
|
+
| `GET` / `PATCH` / `DELETE` | `/admin/stories/:id` | Retrieve, update, or delete a story slide. |
|
|
157
|
+
| `GET` / `POST` | `/admin/stories/groups` | List or create Story Highlight Rings (`createStoryGroupWorkflow`). |
|
|
158
|
+
| `GET` / `PATCH` / `DELETE` | `/admin/stories/groups/:id` | Retrieve, update, or delete a Story Highlight Ring. |
|
|
159
|
+
| `POST` / `DELETE` | `/admin/stories/:id/hotspots` | Pin a new X/Y product hotspot (`POST`) or remove a hotspot (`DELETE`). |
|
|
160
|
+
| `POST` / `DELETE` | `/admin/stories/:id/stickers` | Attach an interactive sticker (`POST`) or remove a sticker (`DELETE`). |
|
|
161
|
+
| `GET` | `/admin/stories/analytics` | Retrieve conversion funnel analytics (`total_impressions`, `total_completions`, `total_hotspot_clicks`, `total_add_to_cart`, `overall_completion_rate_pct`, `overall_ctr_pct`, `overall_conversion_rate_pct`, and per-slide breakdown). |
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## Admin UI & Widgets
|
|
166
|
+
|
|
167
|
+
All Admin routes, components, and hooks in `src/admin/` are decoupled into focused files (`< 170` lines per file):
|
|
168
|
+
|
|
169
|
+
| Route / Zone | File | Description |
|
|
170
|
+
| ----------------------- | ------------------------------------------------- | ---------------------------------------------------------------------- |
|
|
171
|
+
| `/stories` | `src/admin/routes/stories/page.tsx` | Overview dashboard with KPI `StatCard`s and `NavigationCard`s |
|
|
172
|
+
| `/stories/canvas` | `src/admin/routes/stories/canvas/page.tsx` | Interactive 9:16 Visual Canvas & X/Y Product Hotspot Tagger |
|
|
173
|
+
| `/stories/rings` | `src/admin/routes/stories/rings/page.tsx` | Story Highlight Rings (`StoryGroup`) preview & table |
|
|
174
|
+
| `/stories/rings/create` | `src/admin/routes/stories/rings/@create/page.tsx` | Focus modal to create a new Story Highlight Ring |
|
|
175
|
+
| `/stories/stickers` | `src/admin/routes/stories/stickers/page.tsx` | Interactive Stickers Builder (Polls, Countdowns, Coupons, Q&A) |
|
|
176
|
+
| `/stories/analytics` | `src/admin/routes/stories/analytics/page.tsx` | Conversion Funnel Analytics & per-slide performance table |
|
|
177
|
+
| `product.details.after` | `src/admin/widgets/product-stories-widget.tsx` | Product detail widget showing tagged slides and 1-click story creation |
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Storefront SDK, Hooks & UI Kit
|
|
182
|
+
|
|
183
|
+
```tsx
|
|
184
|
+
import { useState } from "react"
|
|
185
|
+
import {
|
|
186
|
+
StoryRingsBar,
|
|
187
|
+
StoryPlayerModal,
|
|
188
|
+
useStoreStories,
|
|
189
|
+
} from "@vicacha-devs/medusa-plugin-stories"
|
|
190
|
+
|
|
191
|
+
export function StorefrontHeroStories() {
|
|
192
|
+
const { data } = useStoreStories({ placement: "home" })
|
|
193
|
+
const [activeGroupIndex, setActiveGroupIndex] = useState<number | null>(null)
|
|
194
|
+
|
|
195
|
+
const groups = data?.groups ?? []
|
|
196
|
+
|
|
197
|
+
return (
|
|
198
|
+
<>
|
|
199
|
+
<StoryRingsBar
|
|
200
|
+
groups={groups}
|
|
201
|
+
activeGroupId={
|
|
202
|
+
activeGroupIndex !== null ? groups[activeGroupIndex]?.id : null
|
|
203
|
+
}
|
|
204
|
+
onSelectGroup={(_group, index) => setActiveGroupIndex(index)}
|
|
205
|
+
/>
|
|
206
|
+
|
|
207
|
+
<StoryPlayerModal
|
|
208
|
+
groups={groups}
|
|
209
|
+
initialGroupIndex={activeGroupIndex ?? 0}
|
|
210
|
+
isOpen={activeGroupIndex !== null}
|
|
211
|
+
onClose={() => setActiveGroupIndex(null)}
|
|
212
|
+
onAddToCart={(hotspot) => {
|
|
213
|
+
console.log(
|
|
214
|
+
"Add to Medusa cart:",
|
|
215
|
+
hotspot.product_id,
|
|
216
|
+
hotspot.variant_id
|
|
217
|
+
)
|
|
218
|
+
}}
|
|
219
|
+
/>
|
|
220
|
+
</>
|
|
221
|
+
)
|
|
222
|
+
}
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## Development
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
# Typecheck
|
|
231
|
+
pnpm typecheck
|
|
232
|
+
|
|
233
|
+
# Lint (@medusajs/eslint-plugin)
|
|
234
|
+
pnpm lint
|
|
235
|
+
|
|
236
|
+
# Run unit & integration test suite
|
|
237
|
+
pnpm test
|
|
238
|
+
|
|
239
|
+
# Build plugin
|
|
240
|
+
pnpm build
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## License
|
|
246
|
+
|
|
247
|
+
MIT — see [LICENSE](./LICENSE).
|
package/package.json
CHANGED
|
@@ -1,6 +1,135 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vicacha-devs/medusa-plugin-stories",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Shoppable Stories, Highlights Rings & Interactive 9:16 Video/Image Player plugin for Medusa v2 — Story Groups, Multi-Slide Timelines, X/Y Product Hotspots, Interactive Stickers (Polls, Countdowns, Coupons), Conversion Funnel Analytics, Storefront React UI Kit, Typed SDK & 9:16 Admin Studio.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"highlights",
|
|
7
|
+
"medusa",
|
|
8
|
+
"medusa-plugin",
|
|
9
|
+
"medusa-plugin-integration",
|
|
10
|
+
"medusa-plugin-stories",
|
|
11
|
+
"medusa-v2",
|
|
12
|
+
"product-hotspots",
|
|
13
|
+
"shoppable-stories",
|
|
14
|
+
"shoppable-video",
|
|
15
|
+
"social-stories",
|
|
16
|
+
"stories"
|
|
17
|
+
],
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"author": "Vicacha Devs",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/Vicacha-Devs/medusa-plugins.git",
|
|
23
|
+
"directory": "packages/stories"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
".medusa/server",
|
|
27
|
+
"src",
|
|
28
|
+
"src/modules/story/migrations/*.js",
|
|
29
|
+
"src/modules/story/migrations/.snapshot-*.json",
|
|
30
|
+
"README.md",
|
|
31
|
+
"LICENSE",
|
|
32
|
+
"tsconfig.json"
|
|
33
|
+
],
|
|
34
|
+
"type": "module",
|
|
35
|
+
"exports": {
|
|
36
|
+
"./package.json": "./package.json",
|
|
37
|
+
".": {
|
|
38
|
+
"import": "./.medusa/server/src/index.js",
|
|
39
|
+
"default": "./.medusa/server/src/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./admin": {
|
|
42
|
+
"import": "./.medusa/server/src/admin/index.js",
|
|
43
|
+
"default": "./.medusa/server/src/admin/index.js"
|
|
44
|
+
},
|
|
45
|
+
"./ui": {
|
|
46
|
+
"import": "./src/ui/index.ts",
|
|
47
|
+
"default": "./.medusa/server/src/ui/index.js"
|
|
48
|
+
},
|
|
49
|
+
"./hooks": {
|
|
50
|
+
"import": "./src/hooks/index.ts",
|
|
51
|
+
"default": "./.medusa/server/src/hooks/index.js"
|
|
52
|
+
},
|
|
53
|
+
"./sdk": {
|
|
54
|
+
"import": "./src/sdk/index.ts",
|
|
55
|
+
"default": "./.medusa/server/src/sdk/index.js"
|
|
56
|
+
},
|
|
57
|
+
"./types": {
|
|
58
|
+
"import": "./src/types/index.ts",
|
|
59
|
+
"default": "./.medusa/server/src/types/index.js"
|
|
60
|
+
},
|
|
61
|
+
"./workflows": "./.medusa/server/src/workflows/index.js",
|
|
62
|
+
"./.medusa/server/src/modules/*": "./.medusa/server/src/modules/*/index.js",
|
|
63
|
+
"./.medusa/server/src/modules/story": "./.medusa/server/src/modules/story/index.js",
|
|
64
|
+
"./modules/*": "./.medusa/server/src/modules/*/index.js",
|
|
65
|
+
"./providers/*": "./.medusa/server/src/providers/*/index.js",
|
|
66
|
+
"./rbac": {
|
|
67
|
+
"import": "./src/rbac.ts",
|
|
68
|
+
"default": "./.medusa/server/src/rbac.js"
|
|
69
|
+
},
|
|
70
|
+
"./*": "./.medusa/server/src/*.js"
|
|
71
|
+
},
|
|
72
|
+
"devDependencies": {
|
|
73
|
+
"@hookform/resolvers": "5.7.1",
|
|
74
|
+
"@medusajs/admin-sdk": "2.23.0",
|
|
75
|
+
"@medusajs/admin-shared": "2.23.0",
|
|
76
|
+
"@medusajs/cli": "2.23.0",
|
|
77
|
+
"@medusajs/core-flows": "2.23.0",
|
|
78
|
+
"@medusajs/dashboard": "2.23.0",
|
|
79
|
+
"@medusajs/framework": "2.23.0",
|
|
80
|
+
"@medusajs/icons": "2.23.0",
|
|
81
|
+
"@medusajs/js-sdk": "2.23.0",
|
|
82
|
+
"@medusajs/medusa": "2.23.0",
|
|
83
|
+
"@medusajs/test-utils": "2.23.0",
|
|
84
|
+
"@medusajs/types": "2.23.0",
|
|
85
|
+
"@medusajs/ui": "4.3.0",
|
|
86
|
+
"@mikro-orm/migrations": "6.4.3",
|
|
87
|
+
"@swc/core": "1.7.28",
|
|
88
|
+
"@types/node": "20.0.0",
|
|
89
|
+
"@types/react": "^19.3.0",
|
|
90
|
+
"@types/react-dom": "^19.3.0",
|
|
91
|
+
"jiti": "2.0.0",
|
|
92
|
+
"prop-types": "15.8.1",
|
|
93
|
+
"react": "^19.3.1",
|
|
94
|
+
"react-dom": "^19.3.1",
|
|
95
|
+
"react-hook-form": "7.92.0",
|
|
96
|
+
"react-i18next": "18.0.1",
|
|
97
|
+
"react-router-dom": "7.18.5",
|
|
98
|
+
"ts-node": "10.9.2",
|
|
99
|
+
"tsc-alias": "^1.9.2",
|
|
100
|
+
"typescript": "5.6.2",
|
|
101
|
+
"vite": "^8.3.8"
|
|
102
|
+
},
|
|
103
|
+
"peerDependencies": {
|
|
104
|
+
"@hookform/resolvers": "5.7.1",
|
|
105
|
+
"@medusajs/admin-sdk": "2.23.0",
|
|
106
|
+
"@medusajs/admin-shared": "2.23.0",
|
|
107
|
+
"@medusajs/cli": "2.23.0",
|
|
108
|
+
"@medusajs/core-flows": "2.23.0",
|
|
109
|
+
"@medusajs/framework": "2.23.0",
|
|
110
|
+
"@medusajs/icons": "2.23.0",
|
|
111
|
+
"@medusajs/js-sdk": "2.23.0",
|
|
112
|
+
"@medusajs/medusa": "2.23.0",
|
|
113
|
+
"@medusajs/test-utils": "2.23.0",
|
|
114
|
+
"@medusajs/types": "2.23.0",
|
|
115
|
+
"@medusajs/ui": "4.3.0",
|
|
116
|
+
"react": "^19.3.1",
|
|
117
|
+
"react-dom": "^19.3.1",
|
|
118
|
+
"react-hook-form": "7.92.0",
|
|
119
|
+
"react-i18next": "18.0.1",
|
|
120
|
+
"react-router-dom": "7.18.5",
|
|
121
|
+
"zod": "4.6.7"
|
|
122
|
+
},
|
|
123
|
+
"engines": {
|
|
124
|
+
"node": ">=22.22.0"
|
|
125
|
+
},
|
|
126
|
+
"scripts": {
|
|
127
|
+
"build": "medusa plugin:build && tsc-alias -p tsconfig.json --resolve-full-paths",
|
|
128
|
+
"publish:local": "medusa plugin:publish",
|
|
129
|
+
"dev": "medusa plugin:develop",
|
|
130
|
+
"lint": "medusa lint",
|
|
131
|
+
"typecheck": "tsc --noEmit",
|
|
132
|
+
"test": "node --import ./src/__tests__/register-ts-resolver.mjs --import ../plugin-testing/register-js-extension.mjs --test src/__tests__/*.spec.ts",
|
|
133
|
+
"clean": "rm -rf .medusa node_modules"
|
|
134
|
+
}
|
|
6
135
|
}
|