medusa-plugin-printify 0.2.0 → 0.2.1

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 (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +123 -21
  3. package/package.json +19 -8
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2026 Dawson Blackhouse
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,14 +1,104 @@
1
- # medusa-plugin-printify
1
+ <h1 align="center">medusa-plugin-printify</h1>
2
+
3
+ <p align="center">
4
+ Print-on-demand fulfillment for <a href="https://medusajs.com">Medusa v2</a>, powered by <a href="https://printify.com">Printify</a>.
5
+ </p>
6
+
7
+ <p align="center">
8
+ <a href="https://www.npmjs.com/package/medusa-plugin-printify"><img src="https://img.shields.io/npm/v/medusa-plugin-printify.svg" alt="npm version" /></a>
9
+ <a href="https://www.npmjs.com/package/medusa-plugin-printify"><img src="https://img.shields.io/npm/dm/medusa-plugin-printify.svg" alt="npm downloads" /></a>
10
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" /></a>
11
+ <a href="https://github.com/greedychipmunk/medusa-plugin-printify/actions/workflows/ci.yml"><img src="https://github.com/greedychipmunk/medusa-plugin-printify/actions/workflows/ci.yml/badge.svg" alt="CI" /></a>
12
+ <a href="https://codecov.io/gh/greedychipmunk/medusa-plugin-printify"><img src="https://codecov.io/gh/greedychipmunk/medusa-plugin-printify/branch/main/graph/badge.svg" alt="coverage" /></a>
13
+ <a href="https://medusajs.com"><img src="https://img.shields.io/badge/Medusa-v2-blueviolet" alt="Medusa v2" /></a>
14
+ <a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/TypeScript-strict-3178C6?logo=typescript&logoColor=white" alt="TypeScript" /></a>
15
+ </p>
16
+
17
+ <p align="center">
18
+ <a href="#quick-start">Quick start</a> ·
19
+ <a href="#configuration">Configuration</a> ·
20
+ <a href="#api-reference">API</a> ·
21
+ <a href="CHANGELOG.md">Changelog</a> ·
22
+ <a href="CONTRIBUTING.md">Contributing</a>
23
+ </p>
2
24
 
3
- A [Medusa v2](https://medusajs.com) plugin that integrates [Printify](https://printify.com) print-on-demand fulfillment into your store. It syncs Printify products and shops into Medusa, automatically submits orders to Printify for production, handles real-time webhook status updates, and adds a Printify management section to the Medusa Admin dashboard.
25
+ ---
26
+
27
+ ## Why this plugin
28
+
29
+ - **Real fulfillment, not just sync.** Automatic order submission, real-time webhook status, and a Medusa Admin widget that surfaces production state on every order page.
30
+ - **Type-safe, tested, CI-driven.** TypeScript strict mode, Jest coverage, and OIDC-signed npm releases driven by conventional-commit PR titles.
31
+ - **Decoupled and unopinionated.** No storefront assumptions; works with any Medusa v2 host application.
4
32
 
5
33
  ## Features
6
34
 
7
- - **Product sync** — pull your Printify catalog into Medusa on a schedule or on-demand
8
- - **Order fulfillment** — automatically submit Medusa orders to Printify when they are placed
9
- - **Webhook handling** — receive real-time status updates (shipped, in-production, delivered, etc.)
10
- - **Admin UI** — manage shops, browse synced products, and monitor order fulfillment status from the Medusa Admin dashboard
11
- - **Webhook auto-registration** — registers all required Printify webhook topics on startup
35
+ - **Product sync** — pull your Printify catalog into Medusa on a schedule or on-demand.
36
+ - **Order fulfillment** — automatically submit Medusa orders to Printify when they are placed.
37
+ - **Webhook handling** — real-time status updates (shipped, in-production, delivered, etc.).
38
+ - **Admin UI** — manage shops, browse synced products, and monitor order status from the Medusa Admin.
39
+ - **Webhook auto-registration** — registers all required Printify webhook topics on startup.
40
+
41
+ ## Screenshots
42
+
43
+ | Printify dashboard | Synced products |
44
+ |---|---|
45
+ | ![Printify dashboard](docs/screenshots/dashboard.png) | ![Products](docs/screenshots/products.png)
46
+
47
+ | Order widget | Order details |
48
+ |---|---|
49
+ | ![Order widget](docs/screenshots/order_widget_list.png) | ![Order details](docs/screenshots/order_widget_item.png) |
50
+
51
+ ## Quick start
52
+
53
+ ```bash
54
+ pnpm add medusa-plugin-printify
55
+ ```
56
+
57
+ Add to `medusa-config.ts`:
58
+
59
+ ```ts
60
+ import { defineConfig } from "@medusajs/framework/utils"
61
+
62
+ export default defineConfig({
63
+ plugins: [
64
+ {
65
+ resolve: "medusa-plugin-printify",
66
+ options: {
67
+ apiKey: process.env.PRINTIFY_API_KEY,
68
+ webhookSecret: process.env.PRINTIFY_WEBHOOK_SECRET,
69
+ shopId: process.env.PRINTIFY_SHOP_ID,
70
+ webhookBaseUrl: process.env.PRINTIFY_WEBHOOK_URL,
71
+ },
72
+ },
73
+ ],
74
+ })
75
+ ```
76
+
77
+ Run migrations:
78
+
79
+ ```bash
80
+ pnpm medusa db:migrate
81
+ ```
82
+
83
+ Done. See [Configuration](#configuration) for all options.
84
+
85
+ ---
86
+
87
+ ## Table of contents
88
+
89
+ - [Requirements](#requirements)
90
+ - [Installation](#installation)
91
+ - [Configuration](#configuration)
92
+ - [Local Development](#local-development)
93
+ - [Production Deployment](#production-deployment)
94
+ - [API Reference](#api-reference)
95
+ - [Order Fulfillment Flow](#order-fulfillment-flow)
96
+ - [Admin Dashboard](#admin-dashboard)
97
+ - [Contributing](#contributing)
98
+ - [Security](#security)
99
+ - [License](#license)
100
+
101
+ ---
12
102
 
13
103
  ## Requirements
14
104
 
@@ -103,7 +193,7 @@ This creates the `printify_shop`, `printify_product`, and `printify_order` table
103
193
  Clone this repository and install dependencies:
104
194
 
105
195
  ```bash
106
- git clone https://github.com/your-org/medusa-plugin-printify
196
+ git clone https://github.com/greedychipmunk/medusa-plugin-printify
107
197
  cd medusa-plugin-printify
108
198
  pnpm install
109
199
  ```
@@ -171,11 +261,9 @@ pnpm test -- --watch # watch mode
171
261
  pnpm build
172
262
  ```
173
263
 
174
- ### 2. Publish to npm (first time)
264
+ ### 2. Publish to npm
175
265
 
176
- ```bash
177
- npm publish
178
- ```
266
+ Releases are handled automatically by `.github/workflows/release.yml` when a PR with a conventional-commit title (`feat:`, `fix:`, or `feat!:`) is merged to `main`. There is no manual `npm publish` step.
179
267
 
180
268
  ### 3. Install in your Medusa application
181
269
 
@@ -235,12 +323,12 @@ All admin routes require authentication. Storefront routes are public.
235
323
 
236
324
  ## Order Fulfillment Flow
237
325
 
238
- 1. A customer places an order in your Medusa storefront
239
- 2. The `order.placed` subscriber detects any line items with `metadata.printify_product_id`
240
- 3. A Printify order is created and submitted to production automatically
241
- 4. Printify sends webhook events as the order moves through production and shipping
242
- 5. The plugin updates the local Printify order record and emits Medusa events for each status change
243
- 6. The Printify order widget on the Medusa Admin order detail page reflects the current status
326
+ 1. A customer places an order in your Medusa storefront.
327
+ 2. The `order.placed` subscriber detects any line items with `metadata.printify_product_id`.
328
+ 3. A Printify order is created and submitted to production automatically.
329
+ 4. Printify sends webhook events as the order moves through production and shipping.
330
+ 5. The plugin updates the local Printify order record and emits Medusa events for each status change.
331
+ 6. The Printify order widget on the Medusa Admin order detail page reflects the current status.
244
332
 
245
333
  ---
246
334
 
@@ -248,6 +336,20 @@ All admin routes require authentication. Storefront routes are public.
248
336
 
249
337
  The plugin adds two pages and one widget to the Medusa Admin:
250
338
 
251
- - **Printify** (sidebar) — lists synced shops with a one-click sync button
252
- - **Printify › Products** — browse all synced products with search and a sync button
253
- - **Order detail widget** — appears below the order details on any order page, showing the linked Printify order status and a manual submit button for pending orders
339
+ - **Printify** (sidebar) — lists synced shops with a one-click sync button.
340
+ - **Printify › Products** — browse all synced products with search and a sync button.
341
+ - **Order detail widget** — appears below the order details on any order page, showing the linked Printify order status and a manual submit button for pending orders.
342
+
343
+ ---
344
+
345
+ ## Contributing
346
+
347
+ PRs welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for setup. PR titles must follow [Conventional Commits](https://www.conventionalcommits.org/) — the release workflow uses them to bump versions automatically.
348
+
349
+ ## Security
350
+
351
+ See [SECURITY.md](SECURITY.md) for how to report vulnerabilities.
352
+
353
+ ## License
354
+
355
+ Licensed under the [MIT License](https://github.com/greedychipmunk/medusa-plugin-printify/blob/main/LICENSE).
package/package.json CHANGED
@@ -1,9 +1,17 @@
1
1
  {
2
2
  "name": "medusa-plugin-printify",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Printify print-on-demand integration plugin for Medusa v2",
5
- "author": "TrendTri",
5
+ "author": "Dawson Blackhouse",
6
6
  "license": "MIT",
7
+ "homepage": "https://github.com/greedychipmunk/medusa-plugin-printify#readme",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/greedychipmunk/medusa-plugin-printify.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/greedychipmunk/medusa-plugin-printify/issues"
14
+ },
7
15
  "files": [
8
16
  ".medusa/server"
9
17
  ],
@@ -22,10 +30,16 @@
22
30
  },
23
31
  "keywords": [
24
32
  "medusa",
25
- "plugin",
26
- "medusa-plugin-other",
33
+ "medusa-v2",
27
34
  "medusa-plugin",
28
- "medusa-v2"
35
+ "medusa-plugin-other",
36
+ "printify",
37
+ "print-on-demand",
38
+ "pod",
39
+ "dropshipping",
40
+ "ecommerce",
41
+ "fulfillment",
42
+ "webhooks"
29
43
  ],
30
44
  "devDependencies": {
31
45
  "@medusajs/admin-sdk": "2.13.1",
@@ -70,9 +84,6 @@
70
84
  "build": "medusa plugin:build",
71
85
  "dev": "medusa plugin:develop",
72
86
  "publish:npm": "pnpm publish --access public --no-git-checks",
73
- "release:patch": "pnpm version patch && pnpm publish --access public && git push --follow-tags",
74
- "release:minor": "pnpm version minor && pnpm publish --access public && git push --follow-tags",
75
- "release:major": "pnpm version major && pnpm publish --access public && git push --follow-tags",
76
87
  "test": "jest",
77
88
  "test:watch": "jest --watch",
78
89
  "test:coverage": "jest --coverage"