minutework 0.1.53 → 0.1.54
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 +1 -1
- package/assets/claude-local/skills/tenant-app-customer-auth-deploy/SKILL.md +8 -0
- package/assets/templates/next-tenant-app/.env.example +5 -3
- package/assets/templates/next-tenant-app/README.md +15 -0
- package/assets/templates/next-tenant-app/next.config.mjs +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -147,7 +147,7 @@ minutework deploy --preview
|
|
|
147
147
|
|
|
148
148
|
Combined **tenant-app + sidecar** workspaces keep sidecar setup explicit. Root `pnpm install` stays Node-only and does not run `poetry install` for you. If you need the sidecar, run `pnpm run install:sidecar` from the workspace root or `cd sidecar && poetry install` yourself before `minutework dev` or `minutework test`. Sidecar-only scaffolds have no root `package.json`; install Python deps once inside `sidecar/` before running local sidecar workflows.
|
|
149
149
|
|
|
150
|
-
For direct third-party web hosts such as Vercel, deploy `tenant-app` only. In Vercel, point the project Root Directory at `tenant-app`; the optional sidecar remains a separate Poetry-managed surface. To keep `@minutework/web-auth` same-origin on a bring-your-own host, set `MW_GATEWAY_BASE_URL` to the
|
|
150
|
+
For direct third-party web hosts such as Vercel, deploy `tenant-app` only. In Vercel, point the project Root Directory at `tenant-app`; the optional sidecar remains a separate Poetry-managed surface. To keep `@minutework/web-auth` same-origin on a bring-your-own host, set `MW_GATEWAY_BASE_URL` to the canonical live customer-web host returned by `minutework deploy --live` — the template's `next.config.mjs` then proxies `/_mw/*` to the gateway — and run `minutework deploy --live --host <your-domain>` so the gateway recognizes that host as your tenant's live canonical customer-web origin. For local auth against dev, target `https://dev.minutework.ai`, deploy live there, then set `MW_GATEWAY_BASE_URL` to the returned `https://<label>.customers.dev.minutework.ai` host, not bare `https://dev.minutework.ai`.
|
|
151
151
|
|
|
152
152
|
`link` provisions or resolves the default published-site property for the active tenant and stores that property key in repo-local state. The SDK-based `tenant-app/.env.example` contains only the app metadata contract used by the template: `NEXT_PUBLIC_MW_APP_ID`, `MW_TEMPLATE_APP_NAME`, and optional `MW_PUBLIC_BASE_URL`. Browser auth and manifest calls use same-origin `/_mw` routes through `@minutework/web-auth`; do not add platform content tokens or public-site property vars to the tenant app.
|
|
153
153
|
|
|
@@ -55,6 +55,14 @@ unattended; without `--yes` it returns `confirmation_required`).
|
|
|
55
55
|
activate. On a BYO host, set `MW_GATEWAY_BASE_URL` in the tenant-app so the
|
|
56
56
|
template's `next.config.mjs` proxies same-origin `/_mw/*` to the gateway
|
|
57
57
|
(managed-subdomain hosts are gateway-fronted and need no rewrite).
|
|
58
|
+
- **Local tenant-app against the dev platform:** target the dev platform
|
|
59
|
+
explicitly (`export MW_CLI_PLATFORM_BASE_URL=https://dev.minutework.ai` and
|
|
60
|
+
`minutework login --platform https://dev.minutework.ai`), link a sandbox
|
|
61
|
+
runtime, then run `minutework deploy --live`. Set `tenant-app/.env.local`
|
|
62
|
+
`MW_GATEWAY_BASE_URL` to the returned canonical live customer-web host such as
|
|
63
|
+
`https://<label>.customers.dev.minutework.ai` before running local `next dev`.
|
|
64
|
+
Do not set it to bare `https://dev.minutework.ai`; the gateway resolves
|
|
65
|
+
`/_mw` customer auth by the live customer-web host.
|
|
58
66
|
|
|
59
67
|
## Boundaries and current limits
|
|
60
68
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
NEXT_PUBLIC_MW_APP_ID=tenant.app
|
|
2
2
|
MW_TEMPLATE_APP_NAME=Tenant App
|
|
3
3
|
MW_PUBLIC_BASE_URL=
|
|
4
|
-
# Only needed when hosting this app off-platform (Vercel / custom domain)
|
|
5
|
-
#
|
|
6
|
-
#
|
|
4
|
+
# Only needed when hosting this app off-platform (Vercel / custom domain) or
|
|
5
|
+
# running local next dev against a live customer-web binding. Set this to the
|
|
6
|
+
# canonical live customer-web host returned by `minutework deploy --live`, such as
|
|
7
|
+
# https://<label>.customers.dev.minutework.ai. Do not set it to bare
|
|
8
|
+
# https://dev.minutework.ai.
|
|
7
9
|
MW_GATEWAY_BASE_URL=
|
|
@@ -64,6 +64,21 @@ runtime-command demo, or a server-only public-content token adapter.
|
|
|
64
64
|
defaults to `tenant.app`
|
|
65
65
|
- `MW_TEMPLATE_APP_NAME` controls the display name and defaults to `Tenant App`
|
|
66
66
|
- `MW_PUBLIC_BASE_URL` is optional and only affects metadata routes
|
|
67
|
+
- `MW_GATEWAY_BASE_URL` is only needed when the app is not directly
|
|
68
|
+
gateway-fronted. For local auth against dev, set it to the canonical live
|
|
69
|
+
customer-web host returned by `minutework deploy --live`, for example
|
|
70
|
+
`https://<label>.customers.dev.minutework.ai`. Do not set it to bare
|
|
71
|
+
`https://dev.minutework.ai`; `/_mw` auth is resolved from the live
|
|
72
|
+
customer-web host.
|
|
73
|
+
|
|
74
|
+
Local real-auth dev loop:
|
|
75
|
+
|
|
76
|
+
1. `export MW_CLI_PLATFORM_BASE_URL=https://dev.minutework.ai`
|
|
77
|
+
2. `minutework login --platform https://dev.minutework.ai`
|
|
78
|
+
3. `minutework link --runtime --sandbox`
|
|
79
|
+
4. `minutework deploy --live`
|
|
80
|
+
5. set `MW_GATEWAY_BASE_URL` to the returned `*.customers.dev.minutework.ai`
|
|
81
|
+
live host, then run local `next dev`.
|
|
67
82
|
|
|
68
83
|
## Validation
|
|
69
84
|
|
|
@@ -22,11 +22,11 @@ function resolveTurbopackRoot(startDirectory) {
|
|
|
22
22
|
|
|
23
23
|
// Bring-your-own host support: when this tenant-app is hosted off-platform (Vercel
|
|
24
24
|
// or a custom domain) instead of being fronted by the MinuteWork gateway, set
|
|
25
|
-
// MW_GATEWAY_BASE_URL
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
//
|
|
25
|
+
// MW_GATEWAY_BASE_URL to the live canonical customer-web host returned by
|
|
26
|
+
// `minutework deploy --live`. The gateway serves customer auth only for that
|
|
27
|
+
// host, so local dev should point at e.g. https://<label>.customers.dev.minutework.ai,
|
|
28
|
+
// not the bare platform origin. Unset by default: managed-subdomain hosts are
|
|
29
|
+
// gateway-fronted and need no rewrite.
|
|
30
30
|
const gatewayBaseUrl = (process.env.MW_GATEWAY_BASE_URL || "").trim().replace(/\/+$/, "");
|
|
31
31
|
|
|
32
32
|
const nextConfig = {
|