@endora-commerce/mod-pwa 0.100.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.
Files changed (119) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +63 -0
  3. package/dist/admin/api/pwa-client.d.ts +15 -0
  4. package/dist/admin/api/pwa-client.d.ts.map +1 -0
  5. package/dist/admin/api/pwa-client.js +56 -0
  6. package/dist/admin/api/pwa-client.js.map +1 -0
  7. package/dist/admin/components/PushAudienceRuleBuilder.d.ts +19 -0
  8. package/dist/admin/components/PushAudienceRuleBuilder.d.ts.map +1 -0
  9. package/dist/admin/components/PushAudienceRuleBuilder.js +211 -0
  10. package/dist/admin/components/PushAudienceRuleBuilder.js.map +1 -0
  11. package/dist/admin/index.d.ts +39 -0
  12. package/dist/admin/index.d.ts.map +1 -0
  13. package/dist/admin/index.js +61 -0
  14. package/dist/admin/index.js.map +1 -0
  15. package/dist/admin/pages/PwaPage.d.ts +16 -0
  16. package/dist/admin/pages/PwaPage.d.ts.map +1 -0
  17. package/dist/admin/pages/PwaPage.js +207 -0
  18. package/dist/admin/pages/PwaPage.js.map +1 -0
  19. package/dist/backend/entities/push-message-delivery.entity.d.ts +18 -0
  20. package/dist/backend/entities/push-message-delivery.entity.d.ts.map +1 -0
  21. package/dist/backend/entities/push-message-delivery.entity.js +68 -0
  22. package/dist/backend/entities/push-message-delivery.entity.js.map +1 -0
  23. package/dist/backend/entities/push-message.entity.d.ts +26 -0
  24. package/dist/backend/entities/push-message.entity.d.ts.map +1 -0
  25. package/dist/backend/entities/push-message.entity.js +102 -0
  26. package/dist/backend/entities/push-message.entity.js.map +1 -0
  27. package/dist/backend/entities/push-subscription.entity.d.ts +49 -0
  28. package/dist/backend/entities/push-subscription.entity.d.ts.map +1 -0
  29. package/dist/backend/entities/push-subscription.entity.js +117 -0
  30. package/dist/backend/entities/push-subscription.entity.js.map +1 -0
  31. package/dist/backend/entities/pwa-icon-rendition.entity.d.ts +21 -0
  32. package/dist/backend/entities/pwa-icon-rendition.entity.d.ts.map +1 -0
  33. package/dist/backend/entities/pwa-icon-rendition.entity.js +69 -0
  34. package/dist/backend/entities/pwa-icon-rendition.entity.js.map +1 -0
  35. package/dist/backend/index.d.ts +100 -0
  36. package/dist/backend/index.d.ts.map +1 -0
  37. package/dist/backend/index.js +107 -0
  38. package/dist/backend/index.js.map +1 -0
  39. package/dist/backend/plugin.d.ts +119 -0
  40. package/dist/backend/plugin.d.ts.map +1 -0
  41. package/dist/backend/plugin.js +109 -0
  42. package/dist/backend/plugin.js.map +1 -0
  43. package/dist/backend/request-actor.d.ts +24 -0
  44. package/dist/backend/request-actor.d.ts.map +1 -0
  45. package/dist/backend/request-actor.js +29 -0
  46. package/dist/backend/request-actor.js.map +1 -0
  47. package/dist/backend/routes.admin.d.ts +52 -0
  48. package/dist/backend/routes.admin.d.ts.map +1 -0
  49. package/dist/backend/routes.admin.js +222 -0
  50. package/dist/backend/routes.admin.js.map +1 -0
  51. package/dist/backend/routes.storefront.d.ts +29 -0
  52. package/dist/backend/routes.storefront.d.ts.map +1 -0
  53. package/dist/backend/routes.storefront.js +66 -0
  54. package/dist/backend/routes.storefront.js.map +1 -0
  55. package/dist/backend/services/cross-module-context.d.ts +90 -0
  56. package/dist/backend/services/cross-module-context.d.ts.map +1 -0
  57. package/dist/backend/services/cross-module-context.js +84 -0
  58. package/dist/backend/services/cross-module-context.js.map +1 -0
  59. package/dist/backend/services/providers/web-push-provider.d.ts +31 -0
  60. package/dist/backend/services/providers/web-push-provider.d.ts.map +1 -0
  61. package/dist/backend/services/providers/web-push-provider.js +72 -0
  62. package/dist/backend/services/providers/web-push-provider.js.map +1 -0
  63. package/dist/backend/services/push-audience-evaluator.d.ts +24 -0
  64. package/dist/backend/services/push-audience-evaluator.d.ts.map +1 -0
  65. package/dist/backend/services/push-audience-evaluator.js +29 -0
  66. package/dist/backend/services/push-audience-evaluator.js.map +1 -0
  67. package/dist/backend/services/push-delivery-queue.d.ts +14 -0
  68. package/dist/backend/services/push-delivery-queue.d.ts.map +1 -0
  69. package/dist/backend/services/push-delivery-queue.js +30 -0
  70. package/dist/backend/services/push-delivery-queue.js.map +1 -0
  71. package/dist/backend/services/push-event-subscriber.d.ts +86 -0
  72. package/dist/backend/services/push-event-subscriber.d.ts.map +1 -0
  73. package/dist/backend/services/push-event-subscriber.js +109 -0
  74. package/dist/backend/services/push-event-subscriber.js.map +1 -0
  75. package/dist/backend/services/push-message-service.d.ts +58 -0
  76. package/dist/backend/services/push-message-service.d.ts.map +1 -0
  77. package/dist/backend/services/push-message-service.js +145 -0
  78. package/dist/backend/services/push-message-service.js.map +1 -0
  79. package/dist/backend/services/push-provider-registry.d.ts +17 -0
  80. package/dist/backend/services/push-provider-registry.d.ts.map +1 -0
  81. package/dist/backend/services/push-provider-registry.js +32 -0
  82. package/dist/backend/services/push-provider-registry.js.map +1 -0
  83. package/dist/backend/services/push-subscription-service.d.ts +67 -0
  84. package/dist/backend/services/push-subscription-service.d.ts.map +1 -0
  85. package/dist/backend/services/push-subscription-service.js +165 -0
  86. package/dist/backend/services/push-subscription-service.js.map +1 -0
  87. package/dist/backend/services/pwa-config-resolver.d.ts +29 -0
  88. package/dist/backend/services/pwa-config-resolver.d.ts.map +1 -0
  89. package/dist/backend/services/pwa-config-resolver.js +92 -0
  90. package/dist/backend/services/pwa-config-resolver.js.map +1 -0
  91. package/dist/backend/services/pwa-icon-service.d.ts +44 -0
  92. package/dist/backend/services/pwa-icon-service.d.ts.map +1 -0
  93. package/dist/backend/services/pwa-icon-service.js +105 -0
  94. package/dist/backend/services/pwa-icon-service.js.map +1 -0
  95. package/dist/backend/workers/push-delivery-worker.d.ts +17 -0
  96. package/dist/backend/workers/push-delivery-worker.d.ts.map +1 -0
  97. package/dist/backend/workers/push-delivery-worker.js +105 -0
  98. package/dist/backend/workers/push-delivery-worker.js.map +1 -0
  99. package/dist/manifest.d.ts +184 -0
  100. package/dist/manifest.d.ts.map +1 -0
  101. package/dist/manifest.js +207 -0
  102. package/dist/manifest.js.map +1 -0
  103. package/dist/migrations/20260625T144228_pwa_init.d.ts +18 -0
  104. package/dist/migrations/20260625T144228_pwa_init.d.ts.map +1 -0
  105. package/dist/migrations/20260625T144228_pwa_init.js +105 -0
  106. package/dist/migrations/20260625T144228_pwa_init.js.map +1 -0
  107. package/dist/migrations/20260830T172022_pwa_organization_attribution.d.ts +102 -0
  108. package/dist/migrations/20260830T172022_pwa_organization_attribution.d.ts.map +1 -0
  109. package/dist/migrations/20260830T172022_pwa_organization_attribution.js +169 -0
  110. package/dist/migrations/20260830T172022_pwa_organization_attribution.js.map +1 -0
  111. package/dist/migrations/index.d.ts +28 -0
  112. package/dist/migrations/index.d.ts.map +1 -0
  113. package/dist/migrations/index.js +31 -0
  114. package/dist/migrations/index.js.map +1 -0
  115. package/docs/pwa.md +93 -0
  116. package/i18n/en.json +43 -0
  117. package/i18n/pl.json +43 -0
  118. package/package.json +105 -0
  119. package/tailwind.css +14 -0
@@ -0,0 +1,28 @@
1
+ /**
2
+ * The `./migrations` subpath — every migration class this module owns, as one
3
+ * ordered `migrations` array.
4
+ *
5
+ * The array is what the platform reads when this module is **installed**:
6
+ * `src/packages/package-runtime.ts` takes `exported['migrations']` and refuses
7
+ * the package outright when it is absent (D-168).
8
+ *
9
+ * Listed in ascending timestamp, which is the order of this module's own
10
+ * migrations and of nothing else (feature 081): a manifest `dependencies` array
11
+ * is the only thing ordering this block against another module's.
12
+ *
13
+ * The **named** exports stay beside the array, and the asymmetry with
14
+ * `./backend` — which publishes an array and no named class (D-168) — is
15
+ * deliberate. `db/migrations-registry.generated.ts` imports each class by name
16
+ * from this specifier, and a migration class name is contract in a way an entity
17
+ * class name is not: `mikro_orm_migrations` persists it, so it is a string every
18
+ * already-migrated database holds.
19
+ *
20
+ * A class that is in neither the array nor the barrel is a migration that does
21
+ * not run: `migration:pending` reports nothing pending and the first symptom is
22
+ * a query against a table nobody created.
23
+ */
24
+ import { Migration20260625T144228PwaInit } from './20260625T144228_pwa_init.js';
25
+ import { Migration20260830T172022PwaOrganizationAttribution } from './20260830T172022_pwa_organization_attribution.js';
26
+ export declare const migrations: (typeof Migration20260625T144228PwaInit)[];
27
+ export { Migration20260625T144228PwaInit, Migration20260830T172022PwaOrganizationAttribution, };
28
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,+BAA+B,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,kDAAkD,EAAE,MAAM,mDAAmD,CAAC;AAEvH,eAAO,MAAM,UAAU,4CAGtB,CAAC;AAEF,OAAO,EACL,+BAA+B,EAC/B,kDAAkD,GACnD,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * The `./migrations` subpath — every migration class this module owns, as one
3
+ * ordered `migrations` array.
4
+ *
5
+ * The array is what the platform reads when this module is **installed**:
6
+ * `src/packages/package-runtime.ts` takes `exported['migrations']` and refuses
7
+ * the package outright when it is absent (D-168).
8
+ *
9
+ * Listed in ascending timestamp, which is the order of this module's own
10
+ * migrations and of nothing else (feature 081): a manifest `dependencies` array
11
+ * is the only thing ordering this block against another module's.
12
+ *
13
+ * The **named** exports stay beside the array, and the asymmetry with
14
+ * `./backend` — which publishes an array and no named class (D-168) — is
15
+ * deliberate. `db/migrations-registry.generated.ts` imports each class by name
16
+ * from this specifier, and a migration class name is contract in a way an entity
17
+ * class name is not: `mikro_orm_migrations` persists it, so it is a string every
18
+ * already-migrated database holds.
19
+ *
20
+ * A class that is in neither the array nor the barrel is a migration that does
21
+ * not run: `migration:pending` reports nothing pending and the first symptom is
22
+ * a query against a table nobody created.
23
+ */
24
+ import { Migration20260625T144228PwaInit } from './20260625T144228_pwa_init.js';
25
+ import { Migration20260830T172022PwaOrganizationAttribution } from './20260830T172022_pwa_organization_attribution.js';
26
+ export const migrations = [
27
+ Migration20260625T144228PwaInit,
28
+ Migration20260830T172022PwaOrganizationAttribution,
29
+ ];
30
+ export { Migration20260625T144228PwaInit, Migration20260830T172022PwaOrganizationAttribution, };
31
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,+BAA+B,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,kDAAkD,EAAE,MAAM,mDAAmD,CAAC;AAEvH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,+BAA+B;IAC/B,kDAAkD;CACnD,CAAC;AAEF,OAAO,EACL,+BAA+B,EAC/B,kDAAkD,GACnD,CAAC"}
package/docs/pwa.md ADDED
@@ -0,0 +1,93 @@
1
+ ---
2
+ title: PWA (Progressive Web App)
3
+ description: Progressive-Web-App capabilities for the storefront and admin — installability, opt-in asset caching, a controlled update path and opt-in push
4
+ ---
5
+
6
+ # PWA (Progressive Web App)
7
+
8
+ The `pwa` module adds Progressive-Web-App capabilities to the
9
+ storefront and admin: home-screen installability, a Settings-driven per-Sales-
10
+ Channel installable identity, opt-in static-asset caching, a controlled service-
11
+ worker update path, and opt-in push notifications behind a provider-agnostic
12
+ abstraction.
13
+
14
+ ## For the Product Owner
15
+
16
+ - **Install to home screen** — buyers can add the storefront to their phone's
17
+ home screen; it launches like a native app with your configured name and icon.
18
+ Staff can likewise install the admin panel as a separate app.
19
+ - **Configure from Settings** — set the app name, short name, theme/background
20
+ color, upload an icon, and turn caching and push on/off in **Settings → PWA**.
21
+ Each value can be global or overridden per Sales Channel. Changes apply within
22
+ about a minute, no deploy needed.
23
+ - **Faster, offline-resilient storefront** — with caching on, repeat visits load
24
+ the shell from the device and a clear offline page shows when the network drops.
25
+ Prices, stock and cart are never cached — they always reflect live data.
26
+ - **Push notifications** — when enabled, buyers can opt in to notifications.
27
+ You can send a broadcast or targeted message from the admin, and order-status
28
+ changes / quote-request updates notify subscribed customers automatically.
29
+ The admin panel does not receive push in this version.
30
+
31
+ ## For developers
32
+
33
+ ### Configuration
34
+
35
+ All identity + toggles live in the Settings module, group `pwa`, resolved per
36
+ Sales Channel via the standard global + override chain:
37
+
38
+ | Setting | Type | Notes |
39
+ |---------|------|-------|
40
+ | `pwa.app_name`, `pwa.short_name` | string | manifest identity |
41
+ | `pwa.theme_color`, `pwa.background_color` | string | hex |
42
+ | `pwa.display_mode` | string | `standalone` / `fullscreen` / `minimal-ui` |
43
+ | `pwa.icon_asset_id` | string | assets-library source id |
44
+ | `pwa.caching_enabled`, `pwa.push_enabled` | boolean | default off |
45
+ | `pwa.vapid_public_key` | string | served to the subscribe flow |
46
+ | `pwa.vapid_private_key` | secret | signs Web-Push (AES-256-GCM at rest) |
47
+ | `pwa.fcm_service_account` | secret | reserved for the token-based FCM provider |
48
+
49
+ ### Push abstraction
50
+
51
+ `PushProvider` (in `@endora-commerce/contracts`) is the swappable delivery seam. The default
52
+ `WebPushProvider` sends standard Web-Push signed with VAPID via the `web-push`
53
+ library (on Chrome the endpoints ride Google's free FCM). A token-based
54
+ `FcmProvider` (`firebase-admin`) and `OneSignalProvider` are drop-in extension
55
+ points — register them in the composition root and set the registry default;
56
+ the storefront subscription flow is unchanged.
57
+
58
+ Delivery fan-out is a BullMQ consumer (`pwa.push.deliver`) with idempotent
59
+ `(message_id, subscription_id)` deliveries; dead endpoints (`404`/`410`) are
60
+ pruned automatically.
61
+
62
+ ### Service-worker updates
63
+
64
+ Cache names are keyed by the build id. Set `NEXT_PUBLIC_BUILD_ID` (storefront)
65
+ and `VITE_BUILD_ID` (admin) per deploy. The storefront SW does not `skipWaiting`
66
+ on its own — `PwaRegister` shows a "new version available" prompt and only
67
+ activates on the user's click, so an update never discards in-progress work.
68
+
69
+ ## App-store wrapping checklist
70
+
71
+ The storefront PWA is built to be wrappable for Google Play (Trusted Web
72
+ Activity) and the App Store (WKWebView wrapper). Producing/submitting the native
73
+ binaries is out of scope; the technical readiness is:
74
+
75
+ - [x] Complete web manifest: `name`, `short_name`, `start_url`, `scope`,
76
+ `display: standalone`, `theme_color`, `background_color`, and icons including a
77
+ 512×512 `maskable` icon (served per channel from `/manifest.webmanifest`).
78
+ - [x] Registered service worker with a `fetch` handler and an offline fallback.
79
+ - [x] HTTPS-only (secure context) in production.
80
+ - [x] No install-blocking patterns; graceful degradation on unsupported browsers.
81
+ - [ ] **Android TWA**: host `/.well-known/assetlinks.json` (Digital Asset Links)
82
+ with the wrapper app's signing-key fingerprint. *(Operator step at packaging.)*
83
+ - [ ] **iOS**: web push only works after the user installs the PWA to the home
84
+ screen — the opt-in already accounts for this ordering.
85
+
86
+ ## Operator runbook
87
+
88
+ 1. Set `SETTINGS_SECRET_ENCRYPTION_KEY` (for VAPID/FCM secrets) and run
89
+ `pnpm --filter backend run migration:up` (applies `080_pwa_init`).
90
+ 2. In **Settings → PWA**, set identity + upload an icon, toggle caching/push.
91
+ 3. Click **Generate VAPID keys** (or `POST /api/v1/admin/pwa/vapid/generate`).
92
+ 4. Set `NEXT_PUBLIC_BUILD_ID` / `VITE_BUILD_ID` in the deploy pipeline.
93
+ 5. Device-test install + push over HTTPS.
package/i18n/en.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "adminRoles.permission.pwa:read": "View PWA settings",
3
+ "adminRoles.permission.pwa:write": "Configure PWA",
4
+ "adminRoles.permission.pwa:send_push": "Send push notifications",
5
+ "nav.pwa.label": "PWA",
6
+ "settings.title": "Progressive Web App",
7
+ "settings.description": "Configure the installable app identity, asset caching, and push notifications.",
8
+ "settings.section.identity": "App identity",
9
+ "settings.field.appName": "App name",
10
+ "settings.field.shortName": "Short name",
11
+ "settings.field.themeColor": "Theme color",
12
+ "settings.field.backgroundColor": "Background color",
13
+ "settings.field.displayMode": "Display mode",
14
+ "settings.field.icon": "Home-screen icon",
15
+ "settings.icon.upload": "Upload icon",
16
+ "settings.icon.hint": "PNG or WebP, at least 512×512, square.",
17
+ "settings.icon.invalid": "The image must be a square PNG or WebP of at least 512×512 pixels.",
18
+ "settings.section.caching": "Asset caching",
19
+ "settings.field.cachingEnabled": "Enable static-asset caching",
20
+ "settings.section.push": "Push notifications",
21
+ "settings.field.pushEnabled": "Enable push notifications",
22
+ "settings.vapid.generate": "Generate VAPID keys",
23
+ "settings.vapid.generated": "VAPID keys generated.",
24
+ "settings.vapid.unset": "No VAPID keys configured.",
25
+ "settings.channel.global": "Global (all channels)",
26
+ "settings.channel.override": "Channel override",
27
+ "settings.save": "Save",
28
+ "settings.saved": "Settings saved.",
29
+ "push.title": "Send push notification",
30
+ "push.field.title": "Title",
31
+ "push.field.body": "Message",
32
+ "push.field.url": "Link (opened on tap)",
33
+ "push.field.audience": "Audience",
34
+ "push.audience.all": "All subscribers",
35
+ "push.audience.customers": "Specific customers",
36
+ "push.send": "Send",
37
+ "push.test": "Send test to me",
38
+ "push.queued": "Queued {count} notification(s).",
39
+ "push.unconfigured": "Push is not configured. Generate VAPID keys and enable push first.",
40
+ "push.subscribers": "Subscribers",
41
+ "push.subscribers.active": "Active",
42
+ "push.subscribers.invalid": "Invalid"
43
+ }
package/i18n/pl.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "adminRoles.permission.pwa:read": "Podgląd ustawień PWA",
3
+ "adminRoles.permission.pwa:write": "Konfiguracja PWA",
4
+ "adminRoles.permission.pwa:send_push": "Wysyłanie powiadomień push",
5
+ "nav.pwa.label": "PWA",
6
+ "settings.title": "Aplikacja PWA",
7
+ "settings.description": "Skonfiguruj tożsamość instalowanej aplikacji, cache zasobów i powiadomienia push.",
8
+ "settings.section.identity": "Tożsamość aplikacji",
9
+ "settings.field.appName": "Nazwa aplikacji",
10
+ "settings.field.shortName": "Nazwa skrócona",
11
+ "settings.field.themeColor": "Kolor motywu",
12
+ "settings.field.backgroundColor": "Kolor tła",
13
+ "settings.field.displayMode": "Tryb wyświetlania",
14
+ "settings.field.icon": "Ikona na ekranie głównym",
15
+ "settings.icon.upload": "Wgraj ikonę",
16
+ "settings.icon.hint": "PNG lub WebP, co najmniej 512×512, kwadrat.",
17
+ "settings.icon.invalid": "Obraz musi być kwadratowym plikiem PNG lub WebP o rozmiarze co najmniej 512×512 pikseli.",
18
+ "settings.section.caching": "Cache zasobów",
19
+ "settings.field.cachingEnabled": "Włącz cache zasobów statycznych",
20
+ "settings.section.push": "Powiadomienia push",
21
+ "settings.field.pushEnabled": "Włącz powiadomienia push",
22
+ "settings.vapid.generate": "Wygeneruj klucze VAPID",
23
+ "settings.vapid.generated": "Wygenerowano klucze VAPID.",
24
+ "settings.vapid.unset": "Brak skonfigurowanych kluczy VAPID.",
25
+ "settings.channel.global": "Globalnie (wszystkie kanały)",
26
+ "settings.channel.override": "Nadpisanie dla kanału",
27
+ "settings.save": "Zapisz",
28
+ "settings.saved": "Zapisano ustawienia.",
29
+ "push.title": "Wyślij powiadomienie push",
30
+ "push.field.title": "Tytuł",
31
+ "push.field.body": "Treść",
32
+ "push.field.url": "Odnośnik (otwierany po kliknięciu)",
33
+ "push.field.audience": "Odbiorcy",
34
+ "push.audience.all": "Wszyscy subskrybenci",
35
+ "push.audience.customers": "Wybrani klienci",
36
+ "push.send": "Wyślij",
37
+ "push.test": "Wyślij test do mnie",
38
+ "push.queued": "Zakolejkowano {count} powiadomień.",
39
+ "push.unconfigured": "Push nie jest skonfigurowany. Najpierw wygeneruj klucze VAPID i włącz push.",
40
+ "push.subscribers": "Subskrybenci",
41
+ "push.subscribers.active": "Aktywni",
42
+ "push.subscribers.invalid": "Nieaktywni"
43
+ }
package/package.json ADDED
@@ -0,0 +1,105 @@
1
+ {
2
+ "name": "@endora-commerce/mod-pwa",
3
+ "version": "0.100.0",
4
+ "type": "module",
5
+ "sideEffects": false,
6
+ "description": "Installability, static-asset caching, controlled service-worker updates, and provider-agnostic push notifications for the storefront and admin.",
7
+ "license": "MIT",
8
+ "endora": {
9
+ "type": "module",
10
+ "id": "pwa"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/endora-commerce/endora-commerce.git",
15
+ "directory": "packages/modules/pwa"
16
+ },
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
20
+ "exports": {
21
+ ".": {
22
+ "types": "./dist/manifest.d.ts",
23
+ "default": "./dist/manifest.js"
24
+ },
25
+ "./backend": {
26
+ "types": "./dist/backend/index.d.ts",
27
+ "default": "./dist/backend/index.js"
28
+ },
29
+ "./migrations": {
30
+ "types": "./dist/migrations/index.d.ts",
31
+ "default": "./dist/migrations/index.js"
32
+ },
33
+ "./admin": {
34
+ "types": "./dist/admin/index.d.ts",
35
+ "default": "./dist/admin/index.js"
36
+ },
37
+ "./tailwind.css": "./tailwind.css",
38
+ "./package.json": "./package.json"
39
+ },
40
+ "files": [
41
+ "dist",
42
+ "i18n",
43
+ "docs",
44
+ "tailwind.css"
45
+ ],
46
+ "engines": {
47
+ "node": ">=22.18.0"
48
+ },
49
+ "peerDependencies": {
50
+ "@fastify/multipart": "^10",
51
+ "@mikro-orm/core": "^6",
52
+ "@mikro-orm/migrations": "^6",
53
+ "@mikro-orm/postgresql": "^6",
54
+ "bullmq": "^5",
55
+ "fastify": "^5",
56
+ "ioredis": "^5",
57
+ "lucide-react": "^1",
58
+ "react": "^19",
59
+ "sharp": "^0",
60
+ "web-push": "^3",
61
+ "zod": "^4",
62
+ "@endora-commerce/admin-kit": "0.100.0",
63
+ "@endora-commerce/contracts": "0.100.0",
64
+ "@endora-commerce/platform": "0.100.0"
65
+ },
66
+ "peerDependenciesMeta": {
67
+ "@endora-commerce/admin-kit": {
68
+ "optional": true
69
+ },
70
+ "lucide-react": {
71
+ "optional": true
72
+ },
73
+ "react": {
74
+ "optional": true
75
+ }
76
+ },
77
+ "devDependencies": {
78
+ "@fastify/multipart": "^10.0.0",
79
+ "@mikro-orm/core": "^6.6.13",
80
+ "@mikro-orm/migrations": "^6.6.13",
81
+ "@mikro-orm/postgresql": "^6.6.13",
82
+ "@types/node": "^22.9.0",
83
+ "@types/react": "^19.2.14",
84
+ "@types/web-push": "^3.6.4",
85
+ "bullmq": "^5.76.1",
86
+ "fastify": "^5.12.5",
87
+ "ioredis": "^5.10.1",
88
+ "lucide-react": "^1.11.0",
89
+ "react": "^19.2.5",
90
+ "sharp": "^0.35.2",
91
+ "typescript": "^5.9.3",
92
+ "vitest": "^4.1.11",
93
+ "web-push": "^3.6.7",
94
+ "zod": "^4.2.0",
95
+ "@endora-commerce/contracts": "0.100.0",
96
+ "@endora-commerce/platform": "0.100.0",
97
+ "@endora-commerce/admin-kit": "0.100.0"
98
+ },
99
+ "scripts": {
100
+ "build": "tsc -p tsconfig.build.json && tsc -p tsconfig.ui.json",
101
+ "typecheck": "tsc -p tsconfig.json && tsc -p tsconfig.ui.json --noEmit",
102
+ "lint": "eslint src",
103
+ "test": "vitest run"
104
+ }
105
+ }
package/tailwind.css ADDED
@@ -0,0 +1,14 @@
1
+ /* @endora-commerce/mod-pwa — AUTO-GENERATED by `pnpm --filter backend run manifests:generate`.
2
+ *
3
+ * The `@source` directives this package asks its host to scan
4
+ * (`specs/110-instance-repository/contracts/admin-stylesheet-composition.md` R1).
5
+ * They resolve relative to **this file**, so they hold wherever the package is
6
+ * installed — a workspace link here, `node_modules` in a client's instance.
7
+ *
8
+ * The `dist` line is what a published tarball ships and is what an instance
9
+ * scans; the `src` line is inert there and is what keeps `pnpm --filter admin
10
+ * run dev` reading source in this repository. Do not edit: run
11
+ * `pnpm --filter backend run manifests:generate`.
12
+ */
13
+ @source "./dist/admin";
14
+ @source "./src/admin";