minutework 0.1.31 → 0.1.33
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/EXTERNAL_ALPHA.md +33 -33
- package/README.md +34 -34
- package/assets/claude-local/CLAUDE.md.template +12 -12
- package/assets/claude-local/skills/README.md +3 -1
- package/assets/claude-local/skills/app-pack-authoring/SKILL.md +17 -4
- package/assets/claude-local/skills/capability-gap-reporting/SKILL.md +3 -3
- package/assets/claude-local/skills/contract-first-public-intake/SKILL.md +11 -3
- package/assets/claude-local/skills/generated-workspace-architecture/SKILL.md +12 -5
- package/assets/claude-local/skills/layering-and-import-modes/SKILL.md +2 -2
- package/assets/claude-local/skills/openclaw-skill-importer/SKILL.md +2 -2
- package/assets/claude-local/skills/project-overview-and-strategy/SKILL.md +8 -8
- package/assets/claude-local/skills/published-web-and-mw-core-site/SKILL.md +11 -8
- package/assets/claude-local/skills/standalone-mobile-client/SKILL.md +6 -5
- package/assets/claude-local/skills/vuilder-discovery-output-contract/SKILL.md +6 -6
- package/assets/claude-local/skills/workspace-guidance-refresh/SKILL.md +4 -4
- package/assets/templates/fastapi-sidecar/pyproject.toml +1 -1
- package/assets/templates/fastapi-sidecar/src/fastapi_sidecar/main.py +1 -1
- package/assets/templates/mobile-app/.env.example +4 -4
- package/assets/templates/mobile-app/AGENTS.md +3 -3
- package/assets/templates/mobile-app/README.md +10 -10
- package/assets/templates/mobile-app/app/(app)/_layout.tsx +2 -2
- package/assets/templates/mobile-app/app/(app)/index.tsx +2 -2
- package/assets/templates/mobile-app/app/(auth)/login.tsx +3 -3
- package/assets/templates/mobile-app/app/_layout.tsx +1 -1
- package/assets/templates/mobile-app/babel.config.js +1 -1
- package/assets/templates/mobile-app/eas.json +1 -1
- package/assets/templates/mobile-app/expo-env.d.ts +1 -1
- package/assets/templates/mobile-app/metro.config.js +2 -2
- package/assets/templates/mobile-app/package.json +1 -1
- package/assets/templates/mobile-app/src/mw/client.ts +3 -3
- package/assets/templates/mobile-app/src/mw/contracts.ts +2 -2
- package/assets/templates/mobile-app/src/mw/endpoints.ts +2 -2
- package/assets/templates/mobile-app/src/mw/env.ts +4 -4
- package/assets/templates/mobile-app/src/mw/session.ts +1 -1
- package/assets/templates/mobile-app/template.json +1 -1
- package/assets/templates/mobile-app/tools/template/validate-template.mjs +2 -2
- package/assets/templates/mobile-app/tsconfig.json +1 -1
- package/assets/templates/next-tenant-app/.env.example +1 -1
- package/assets/templates/next-tenant-app/README.md +26 -138
- package/assets/templates/next-tenant-app/package.json +1 -0
- package/assets/templates/next-tenant-app/src/app/app/demo/page.tsx +15 -0
- package/assets/templates/next-tenant-app/src/app/app/layout.tsx +1 -4
- package/assets/templates/next-tenant-app/src/app/app/page.tsx +2 -17
- package/assets/templates/next-tenant-app/src/app/blog/[slug]/page.tsx +9 -67
- package/assets/templates/next-tenant-app/src/app/blog/page.tsx +10 -46
- package/assets/templates/next-tenant-app/src/app/docs/[...slug]/page.tsx +9 -65
- package/assets/templates/next-tenant-app/src/app/docs/page.tsx +10 -46
- package/assets/templates/next-tenant-app/src/app/layout.tsx +8 -10
- package/assets/templates/next-tenant-app/src/app/login/page.tsx +3 -23
- package/assets/templates/next-tenant-app/src/app/page.tsx +11 -44
- package/assets/templates/next-tenant-app/src/app/pricing/page.tsx +10 -44
- package/assets/templates/next-tenant-app/src/app/providers.tsx +2 -1
- package/assets/templates/next-tenant-app/src/app/robots.ts +7 -18
- package/assets/templates/next-tenant-app/src/app/sitemap.ts +4 -39
- package/assets/templates/next-tenant-app/src/features/auth/components/login-screen.tsx +97 -98
- package/assets/templates/next-tenant-app/src/features/dashboard/components/tenant-dashboard.tsx +43 -78
- package/assets/templates/next-tenant-app/src/features/demo/components/manifest-demo.tsx +89 -0
- package/assets/templates/next-tenant-app/src/features/public-shell/components/static-public-page.tsx +58 -0
- package/assets/templates/next-tenant-app/src/features/shell/components/private-app-shell.tsx +48 -552
- package/assets/templates/next-tenant-app/src/lib/app-routes.ts +2 -2
- package/assets/templates/next-tenant-app/src/lib/public-site.test.ts +1 -1
- package/assets/templates/next-tenant-app/src/lib/public-site.ts +5 -30
- package/assets/templates/next-tenant-app/src/mw/client.ts +18 -0
- package/assets/templates/next-tenant-app/src/mw/mock.test.ts +21 -0
- package/assets/templates/next-tenant-app/src/mw/mock.ts +35 -0
- package/assets/templates/next-tenant-app/src/mw/provider.tsx +17 -0
- package/assets/templates/next-tenant-app/template.json +3 -3
- package/assets/templates/next-tenant-app/template.schema.json +1 -0
- package/assets/templates/next-tenant-app/tools/template/validate-route-contract.mjs +4 -5
- package/assets/templates/next-tenant-app/tools/template/with-public-site-fixture.mjs +2 -2
- package/bin/minutework.js +1 -1
- package/dist/agent.js +7 -7
- package/dist/agent.js.map +1 -1
- package/dist/auth.js +7 -7
- package/dist/auth.js.map +1 -1
- package/dist/compile.js +5 -5
- package/dist/config.js +6 -6
- package/dist/config.js.map +1 -1
- package/dist/deploy.js +7 -7
- package/dist/deploy.js.map +1 -1
- package/dist/developer-client.js +2 -2
- package/dist/developer-client.js.map +1 -1
- package/dist/index.js +30 -30
- package/dist/index.js.map +1 -1
- package/dist/init.js +10 -10
- package/dist/init.js.map +1 -1
- package/dist/launcher.js +1 -1
- package/dist/launcher.js.map +1 -1
- package/dist/managed-engine.js +6 -6
- package/dist/managed-engine.js.map +1 -1
- package/dist/orchestrator-context.js +1 -1
- package/dist/orchestrator-context.js.map +1 -1
- package/dist/orchestrator.js +15 -15
- package/dist/orchestrator.js.map +1 -1
- package/dist/paths.js +1 -1
- package/dist/paths.js.map +1 -1
- package/dist/publish.js +3 -3
- package/dist/publish.js.map +1 -1
- package/dist/reporting.js +8 -8
- package/dist/reporting.js.map +1 -1
- package/dist/sandbox.js +5 -5
- package/dist/sandbox.js.map +1 -1
- package/dist/state.js +1 -1
- package/dist/state.js.map +1 -1
- package/dist/tokens.js +9 -9
- package/dist/tokens.js.map +1 -1
- package/dist/workspace-assets.js +6 -6
- package/dist/workspace-assets.js.map +1 -1
- package/dist/workspace.js +3 -3
- package/dist/workspace.js.map +1 -1
- package/package.json +3 -3
- package/vendor/workspace-mcp/context.d.ts +6 -6
- package/vendor/workspace-mcp/context.js +56 -56
- package/vendor/workspace-mcp/context.js.map +1 -1
- package/vendor/workspace-mcp/types.d.ts +4 -0
- package/assets/templates/next-tenant-app/src/app/(cms)/[...path]/page.tsx +0 -89
- package/assets/templates/next-tenant-app/src/app/api/auth/context/route.test.ts +0 -90
- package/assets/templates/next-tenant-app/src/app/api/auth/context/route.ts +0 -78
- package/assets/templates/next-tenant-app/src/app/api/auth/login/route.ts +0 -31
- package/assets/templates/next-tenant-app/src/app/api/auth/logout/route.ts +0 -16
- package/assets/templates/next-tenant-app/src/app/api/auth/password-change/route.test.ts +0 -79
- package/assets/templates/next-tenant-app/src/app/api/auth/password-change/route.ts +0 -40
- package/assets/templates/next-tenant-app/src/app/api/auth/password-status/route.test.ts +0 -42
- package/assets/templates/next-tenant-app/src/app/api/auth/password-status/route.ts +0 -29
- package/assets/templates/next-tenant-app/src/app/api/auth/session/route.ts +0 -26
- package/assets/templates/next-tenant-app/src/app/api/gateway/commands/[runId]/route.test.ts +0 -40
- package/assets/templates/next-tenant-app/src/app/api/gateway/commands/[runId]/route.ts +0 -47
- package/assets/templates/next-tenant-app/src/app/api/gateway/commands/route.test.ts +0 -43
- package/assets/templates/next-tenant-app/src/app/api/gateway/commands/route.ts +0 -45
- package/assets/templates/next-tenant-app/src/app/app/examples/runtime-commands/page.test.ts +0 -83
- package/assets/templates/next-tenant-app/src/app/app/examples/runtime-commands/page.tsx +0 -30
- package/assets/templates/next-tenant-app/src/app/app/page.test.ts +0 -62
- package/assets/templates/next-tenant-app/src/app/app/private-content-source.test.ts +0 -88
- package/assets/templates/next-tenant-app/src/app/blog/[slug]/page.test.ts +0 -70
- package/assets/templates/next-tenant-app/src/app/blog/page.test.ts +0 -46
- package/assets/templates/next-tenant-app/src/app/docs/[...slug]/page.test.ts +0 -70
- package/assets/templates/next-tenant-app/src/app/docs/page.test.ts +0 -46
- package/assets/templates/next-tenant-app/src/app/login/page.test.ts +0 -55
- package/assets/templates/next-tenant-app/src/app/page.test.ts +0 -90
- package/assets/templates/next-tenant-app/src/app/pricing/page.test.ts +0 -59
- package/assets/templates/next-tenant-app/src/app/robots.test.ts +0 -40
- package/assets/templates/next-tenant-app/src/app/sitemap.test.ts +0 -63
- package/assets/templates/next-tenant-app/src/features/examples/runtime-command-demo/components/runtime-command-demo.tsx +0 -342
- package/assets/templates/next-tenant-app/src/features/public-shell/components/content-article.tsx +0 -66
- package/assets/templates/next-tenant-app/src/features/public-shell/components/content-collection.tsx +0 -108
- package/assets/templates/next-tenant-app/src/features/public-shell/components/marketing-page-canvas.tsx +0 -111
- package/assets/templates/next-tenant-app/src/features/public-shell/components/public-site-shell.tsx +0 -111
- package/assets/templates/next-tenant-app/src/features/public-shell/components/section-renderer.test.ts +0 -38
- package/assets/templates/next-tenant-app/src/features/public-shell/components/section-renderer.tsx +0 -145
- package/assets/templates/next-tenant-app/src/lib/content/__fixtures__/public-site-snapshot.ts +0 -189
- package/assets/templates/next-tenant-app/src/lib/content/adapter.server.test.ts +0 -444
- package/assets/templates/next-tenant-app/src/lib/content/adapter.server.ts +0 -383
- package/assets/templates/next-tenant-app/src/lib/content/contracts.test.ts +0 -138
- package/assets/templates/next-tenant-app/src/lib/content/contracts.ts +0 -399
- package/assets/templates/next-tenant-app/src/lib/content/custom-adapter.ts +0 -5
- package/assets/templates/next-tenant-app/src/lib/content/empty-state.ts +0 -96
- package/assets/templates/next-tenant-app/src/lib/content/release-manifest.test.ts +0 -93
- package/assets/templates/next-tenant-app/src/lib/content/release-manifest.ts +0 -123
- package/assets/templates/next-tenant-app/src/lib/platform/auth.server.test.ts +0 -75
- package/assets/templates/next-tenant-app/src/lib/platform/auth.server.ts +0 -25
- package/assets/templates/next-tenant-app/src/lib/platform/client.server.test.ts +0 -170
- package/assets/templates/next-tenant-app/src/lib/platform/client.server.ts +0 -661
- package/assets/templates/next-tenant-app/src/lib/platform/contracts.ts +0 -131
- package/assets/templates/next-tenant-app/src/lib/platform/endpoints.server.ts +0 -34
- package/assets/templates/next-tenant-app/src/lib/platform/env.server.test.ts +0 -211
- package/assets/templates/next-tenant-app/src/lib/platform/env.server.ts +0 -151
- package/assets/templates/next-tenant-app/src/lib/platform/route-response.ts +0 -33
- package/assets/templates/next-tenant-app/src/lib/platform/session.server.ts +0 -108
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: published-web-and-mw-core-site
|
|
3
|
-
description: "Public-site delivery, published-web flows, mw.core.site baseline, or the default
|
|
3
|
+
description: "Public-site delivery, published-web flows, mw.core.site baseline, or the default MinuteWork site model."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Published Web And mw.core.site
|
|
7
7
|
|
|
8
8
|
Use this skill when the request touches public-site delivery, published-web
|
|
9
|
-
flows, or the default
|
|
9
|
+
flows, or the default MinuteWork site model.
|
|
10
10
|
|
|
11
11
|
- Treat `mw.core.site` as a runtime baseline capability that already exists.
|
|
12
12
|
- For Vuilder-owned public websites, read
|
|
@@ -20,18 +20,21 @@ flows, or the default PandaWork site model.
|
|
|
20
20
|
runtime-canonical through `mw.core.site` and installed app-pack data.
|
|
21
21
|
- `tenant-app` is the combined web starter for public routes plus the private
|
|
22
22
|
`/app` workspace.
|
|
23
|
+
- Do not add a server-only public content token adapter to `tenant-app`.
|
|
24
|
+
Public content should come from hosted published releases/snapshots or
|
|
25
|
+
gateway-approved public-content routes over the MinuteWork substrate, not
|
|
26
|
+
from a baked-in platform token in the generated app.
|
|
23
27
|
- Author public content against runtime/CMS records, not a fixed in-repo site
|
|
24
28
|
starter.
|
|
25
29
|
- For contract-first intake pipeline decisions, also read
|
|
26
30
|
`contract-first-public-intake/SKILL.md`.
|
|
27
31
|
- Use `published-web` and hosted public-release flows for anonymous delivery by
|
|
28
32
|
default.
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
`MW_PUBLIC_SITE_ENV`
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
- `MW_PUBLIC_SITE_ENV=live` is for publication-safe reads only.
|
|
33
|
+
- Legacy starter variables such as `MW_PUBLIC_CONTENT_SOURCE`,
|
|
34
|
+
`MW_CONTENT_API_TOKEN`, `MW_PUBLIC_SITE_PROPERTY_KEY`,
|
|
35
|
+
`MW_STATIC_PUBLIC_CONTENT_PATH`, and `MW_PUBLIC_SITE_ENV` describe old
|
|
36
|
+
adapter modes. Do not introduce them into new `tenant-app` work unless a
|
|
37
|
+
compatibility task explicitly targets that legacy adapter.
|
|
35
38
|
- Anonymous live traffic should prefer published snapshots instead of direct
|
|
36
39
|
runtime reads on every request.
|
|
37
40
|
- `runtime_local_sidecar` is an explicit exception path for live serving, not
|
|
@@ -80,9 +80,9 @@ The native token flow mirrors the existing CLI developer-token flow
|
|
|
80
80
|
freshly returned pair. Re-run the browser-assisted authorize step only when
|
|
81
81
|
the refresh token itself is invalid or revoked.
|
|
82
82
|
|
|
83
|
-
The
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
The `tenant-app` web SDK / hosted-cookie path is **web-only**. The mobile app
|
|
84
|
+
does not ride the `tenant-app` cookie jar, and it does not read or forward
|
|
85
|
+
CSRF -- native uses the bearer token directly against the platform.
|
|
86
86
|
|
|
87
87
|
### Token binding (what is and isn't enforced)
|
|
88
88
|
|
|
@@ -100,7 +100,8 @@ boundary.
|
|
|
100
100
|
- Do not mint a JWT inside the app or stand up a local user table / token issuer.
|
|
101
101
|
- Do not expose access or refresh tokens to web pages or generic React state;
|
|
102
102
|
keep them in `expo-secure-store`.
|
|
103
|
-
- Do not route the mobile app through the `tenant-app`
|
|
103
|
+
- Do not route the mobile app through the `tenant-app` web SDK / hosted-cookie
|
|
104
|
+
session.
|
|
104
105
|
- Do not read or forward CSRF from native; bearer-token auth does not use it.
|
|
105
106
|
- Do not put native code inside `tenant-app` or `sidecar`.
|
|
106
107
|
|
|
@@ -109,4 +110,4 @@ boundary.
|
|
|
109
110
|
- The `mobile` starter is **init-only**. Scaffolding it lands the app in the
|
|
110
111
|
workspace; it does not deploy it.
|
|
111
112
|
- Distribution is the developer's own pipeline: EAS Build, TestFlight, and the
|
|
112
|
-
Play Store. It is **not** `
|
|
113
|
+
Play Store. It is **not** `minutework deploy`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: vuilder-discovery-output-contract
|
|
3
|
-
description: "Constrain Vuilder discovery to AI-native service operations and
|
|
3
|
+
description: "Constrain Vuilder discovery to AI-native service operations and MinuteWork-buildable delivery systems instead of generic startup ideas."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Vuilder Discovery Output Contract
|
|
@@ -22,7 +22,7 @@ Each card must describe:
|
|
|
22
22
|
- an AI-native service outcome the operator can credibly deliver
|
|
23
23
|
- the buyer or internal team receiving that service outcome
|
|
24
24
|
- evidence from the user's profile that makes the operator credible
|
|
25
|
-
- the
|
|
25
|
+
- the MinuteWork delivery system Builder can prepare
|
|
26
26
|
- the first workflow the system should support
|
|
27
27
|
- the runtime records, AI workers, Builder surfaces, and artifacts involved
|
|
28
28
|
- capability gap candidates for unsupported substrate
|
|
@@ -30,7 +30,7 @@ Each card must describe:
|
|
|
30
30
|
Discovery should ask:
|
|
31
31
|
|
|
32
32
|
> What service outcome can this operator credibly deliver, and what
|
|
33
|
-
>
|
|
33
|
+
> MinuteWork-supported system can Builder create to help deliver it?
|
|
34
34
|
|
|
35
35
|
Do not ask:
|
|
36
36
|
|
|
@@ -38,7 +38,7 @@ Do not ask:
|
|
|
38
38
|
|
|
39
39
|
## Builder Constraints
|
|
40
40
|
|
|
41
|
-
- Compose shared
|
|
41
|
+
- Compose shared MinuteWork substrate before bespoke code.
|
|
42
42
|
- Treat the app pack as the shipped product unit.
|
|
43
43
|
- Check shell fit first for member-facing collaboration and operator work.
|
|
44
44
|
- Use `tenant-app` only for public surfaces or explicit standalone UI
|
|
@@ -72,7 +72,7 @@ cards before it saves proposal fields:
|
|
|
72
72
|
|
|
73
73
|
- `extract_workflows_from_context` for repeatable work, bottlenecks, buyers, and
|
|
74
74
|
AI workforce jobs already implied by the user's context.
|
|
75
|
-
- `search_industry_examples` for curated
|
|
75
|
+
- `search_industry_examples` for curated MinuteWork service-business patterns.
|
|
76
76
|
This is not open web search.
|
|
77
77
|
- `estimate_market_pricing` for bounded pilot and retainer ranges with explicit
|
|
78
78
|
assumptions and uncertainty.
|
|
@@ -125,7 +125,7 @@ Use the `DiscoveryBuildCardV1` shape:
|
|
|
125
125
|
- `paid_blueprint_will_create`
|
|
126
126
|
- optional `service_packaging`
|
|
127
127
|
|
|
128
|
-
Plain-language fields are user-facing. They must express
|
|
128
|
+
Plain-language fields are user-facing. They must express MinuteWork's loop:
|
|
129
129
|
build the AI workforce from work the operator already does, use it first under
|
|
130
130
|
their own judgment, then sell it back to their industry. Do not expose Builder
|
|
131
131
|
jargon such as app pack, schemas, runtime records, right rail, runtime agent seed,
|
|
@@ -7,13 +7,13 @@ description: "Exported guidance looks stale, a newly added skill is missing, or
|
|
|
7
7
|
|
|
8
8
|
Use this skill when the generated workspace guidance looks stale, a newly added
|
|
9
9
|
Builder skill is missing from the local workspace, or `CLAUDE.md` / MCP wiring
|
|
10
|
-
does not match the current
|
|
10
|
+
does not match the current MinuteWork CLI export.
|
|
11
11
|
|
|
12
|
-
- From the generated workspace root, run `
|
|
12
|
+
- From the generated workspace root, run `minutework workspace sync-assets`.
|
|
13
13
|
- To preview drift without writing files, run
|
|
14
|
-
`
|
|
14
|
+
`minutework workspace sync-assets --check`.
|
|
15
15
|
- To overwrite conflicting managed files, run
|
|
16
|
-
`
|
|
16
|
+
`minutework workspace sync-assets --force`.
|
|
17
17
|
- This command refreshes the managed guidance surface only:
|
|
18
18
|
- `CLAUDE.md`
|
|
19
19
|
- `skills/**`
|
|
@@ -8,7 +8,7 @@ packages = [{ include = "fastapi_sidecar", from = "src" }]
|
|
|
8
8
|
[project]
|
|
9
9
|
name = "fastapi-sidecar-template"
|
|
10
10
|
version = "0.1.0"
|
|
11
|
-
description = "Canonical FastAPI internal sidecar scaffold for
|
|
11
|
+
description = "Canonical FastAPI internal sidecar scaffold for MinuteWork Builder."
|
|
12
12
|
readme = "README.md"
|
|
13
13
|
requires-python = ">=3.12,<4.0"
|
|
14
14
|
dependencies = [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# DEVELOPER-OWNED — replace freely. Only src/mw/ is
|
|
1
|
+
# DEVELOPER-OWNED — replace freely. Only src/mw/ is MinuteWork substrate.
|
|
2
2
|
#
|
|
3
3
|
# Copy this file to `.env` and set the values for your environment.
|
|
4
4
|
#
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
# the platform issues short-lived bearer tokens at runtime via the native
|
|
9
9
|
# device flow.
|
|
10
10
|
|
|
11
|
-
# Base URL of the
|
|
11
|
+
# Base URL of the MinuteWork platform this app talks to directly.
|
|
12
12
|
# Local dev defaults to http://127.0.0.1:8000 when this is omitted, but physical
|
|
13
13
|
# devices usually need your computer's LAN URL or a tunneled/dev platform URL.
|
|
14
14
|
# The app calls /api/v1/native/... here.
|
|
15
15
|
EXPO_PUBLIC_MW_PLATFORM_BASE_URL=https://<your-platform-base-url>
|
|
16
16
|
|
|
17
|
-
# Optional display name shown in the UI. Defaults to "
|
|
18
|
-
# EXPO_PUBLIC_MW_APP_NAME=
|
|
17
|
+
# Optional display name shown in the UI. Defaults to "MinuteWork".
|
|
18
|
+
# EXPO_PUBLIC_MW_APP_NAME=MinuteWork
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# AGENTS.md — mobile-app starter
|
|
2
2
|
|
|
3
3
|
You are working in a **bring-your-own-UI Expo (React Native + Expo Router)**
|
|
4
|
-
app. **You own all UI/UX.** The only
|
|
4
|
+
app. **You own all UI/UX.** The only MinuteWork-managed code is the thin
|
|
5
5
|
substrate under `src/mw/`.
|
|
6
6
|
|
|
7
7
|
## The one rule
|
|
8
8
|
|
|
9
|
-
**Only `src/mw/` is
|
|
9
|
+
**Only `src/mw/` is MinuteWork substrate.** Build your product in `app/` and your
|
|
10
10
|
own components/modules. Do not move product logic into `src/mw/`, and do not
|
|
11
11
|
build a parallel/local auth stack — the platform owns identity. The mobile app
|
|
12
12
|
is a **direct platform native API client** (bearer token to `/api/v1/native/...`),
|
|
@@ -25,7 +25,7 @@ For the native craft (UI, data, build/release), lean on your local IDE skills:
|
|
|
25
25
|
- `upgrading-expo` — SDK upgrades and dependency fixes
|
|
26
26
|
- `expo-cicd-workflows` — EAS build/deploy pipelines (`.eas/workflows/`)
|
|
27
27
|
|
|
28
|
-
##
|
|
28
|
+
## MinuteWork integration shape
|
|
29
29
|
|
|
30
30
|
For how this app fits the platform (the standalone-client exception, the native
|
|
31
31
|
session token, and the device flow), read the Builder skill
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Mobile App Starter (Expo, bring-your-own-UI)
|
|
2
2
|
|
|
3
3
|
A minimal **Expo (React Native + Expo Router)** starter for building a native
|
|
4
|
-
|
|
4
|
+
MinuteWork client. **You own all of the UI/UX.** The only MinuteWork-managed
|
|
5
5
|
code is the thin substrate under `src/mw/`. Everything else in this template is
|
|
6
6
|
a deliberately plain placeholder meant to be replaced.
|
|
7
7
|
|
|
8
|
-
There is **no
|
|
8
|
+
There is **no MinuteWork design system here** — bring your own. Style with
|
|
9
9
|
whatever you like (plain `StyleSheet`, NativeWind/Tailwind, Tamagui, etc.). The
|
|
10
10
|
plain screens use `StyleSheet` only so there is nothing to rip out.
|
|
11
11
|
|
|
@@ -13,17 +13,17 @@ plain screens use `StyleSheet` only so there is nothing to rip out.
|
|
|
13
13
|
|
|
14
14
|
| Path | Owner | Notes |
|
|
15
15
|
| --- | --- | --- |
|
|
16
|
-
| `src/mw/env.ts` | **
|
|
17
|
-
| `src/mw/endpoints.ts` | **
|
|
18
|
-
| `src/mw/contracts.ts` | **
|
|
19
|
-
| `src/mw/client.ts` | **
|
|
20
|
-
| `src/mw/session.ts` | **
|
|
21
|
-
| `tools/template/` | **
|
|
16
|
+
| `src/mw/env.ts` | **MinuteWork substrate** | Validates `EXPO_PUBLIC_MW_PLATFORM_BASE_URL` (+ optional app name) |
|
|
17
|
+
| `src/mw/endpoints.ts` | **MinuteWork substrate** | Builds platform `/api/v1/native/...` URLs |
|
|
18
|
+
| `src/mw/contracts.ts` | **MinuteWork substrate** | Zod schemas for native session + token payloads |
|
|
19
|
+
| `src/mw/client.ts` | **MinuteWork substrate** | Native token client — real browser-assisted PKCE device flow |
|
|
20
|
+
| `src/mw/session.ts` | **MinuteWork substrate** | Secure-store token wrapper (`expo-secure-store`) |
|
|
21
|
+
| `tools/template/` | **MinuteWork substrate** | Template-governance tooling, not shipped app code |
|
|
22
22
|
| `app/**` | **You** | Expo Router screens — replace freely |
|
|
23
23
|
| `package.json`, `app.json`, `eas.json` | **You** | App config — replace freely |
|
|
24
24
|
| `tsconfig.json`, `babel.config.js`, `metro.config.js` | **You** | Tooling config — replace freely |
|
|
25
25
|
|
|
26
|
-
Rule of thumb: **only `src/mw/` is
|
|
26
|
+
Rule of thumb: **only `src/mw/` is MinuteWork substrate.** If you find yourself
|
|
27
27
|
editing `src/mw/` to add product behavior, that behavior probably belongs in
|
|
28
28
|
your own `app/` / components instead.
|
|
29
29
|
|
|
@@ -115,7 +115,7 @@ skill.
|
|
|
115
115
|
|
|
116
116
|
## Distribution
|
|
117
117
|
|
|
118
|
-
**Distribution is your EAS pipeline, not `
|
|
118
|
+
**Distribution is your EAS pipeline, not `minutework deploy`.** This starter is
|
|
119
119
|
not a hosted web/sidecar deployable; it produces native binaries. Build and ship
|
|
120
120
|
with EAS (`eas build`, `eas submit`, EAS Update). `eas.json` ships minimal
|
|
121
121
|
`preview` and `production` profiles to start from. See the `expo-deployment` and
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// DEVELOPER-OWNED — replace freely. Only src/mw/ is
|
|
1
|
+
// DEVELOPER-OWNED — replace freely. Only src/mw/ is MinuteWork substrate.
|
|
2
2
|
//
|
|
3
|
-
// Authed area layout. This is where you'd guard on a loaded
|
|
3
|
+
// Authed area layout. This is where you'd guard on a loaded MinuteWork session
|
|
4
4
|
// (via `mwClient.loadSession()`) and redirect to /(auth)/login when there is no
|
|
5
5
|
// valid token. Left as a plain Stack so you can build your own gating/UX.
|
|
6
6
|
import { Stack } from "expo-router";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// DEVELOPER-OWNED — replace freely. Only src/mw/ is
|
|
1
|
+
// DEVELOPER-OWNED — replace freely. Only src/mw/ is MinuteWork substrate.
|
|
2
2
|
//
|
|
3
3
|
// Trivial authed screen. Replace with your real product home. Build your data
|
|
4
4
|
// fetching against the platform native API using the bearer token from
|
|
@@ -21,7 +21,7 @@ export default function HomeScreen() {
|
|
|
21
21
|
<View style={styles.container}>
|
|
22
22
|
<Text style={styles.title}>You are in.</Text>
|
|
23
23
|
<Text style={styles.body}>
|
|
24
|
-
Replace this screen with your product. Only `src/mw/` is
|
|
24
|
+
Replace this screen with your product. Only `src/mw/` is MinuteWork
|
|
25
25
|
substrate — everything else is yours.
|
|
26
26
|
</Text>
|
|
27
27
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
// DEVELOPER-OWNED — replace freely. Only src/mw/ is
|
|
1
|
+
// DEVELOPER-OWNED — replace freely. Only src/mw/ is MinuteWork substrate.
|
|
2
2
|
//
|
|
3
3
|
// This screen is intentionally plain and is meant to be REWRITTEN. It exists to
|
|
4
|
-
// show the one integration seam you care about: kicking off
|
|
4
|
+
// show the one integration seam you care about: kicking off MinuteWork's
|
|
5
5
|
// browser-assisted native sign-in through `src/mw/client.ts`.
|
|
6
6
|
//
|
|
7
7
|
// Pressing "Sign in" runs the real device flow: authorize in a system browser ->
|
|
@@ -50,7 +50,7 @@ export default function LoginScreen() {
|
|
|
50
50
|
]}
|
|
51
51
|
>
|
|
52
52
|
<Text style={styles.buttonText}>
|
|
53
|
-
{busy ? "Opening sign in…" : "Sign in with
|
|
53
|
+
{busy ? "Opening sign in…" : "Sign in with MinuteWork"}
|
|
54
54
|
</Text>
|
|
55
55
|
</Pressable>
|
|
56
56
|
</View>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"//": "DEVELOPER-OWNED — replace freely. Only src/mw/ is
|
|
2
|
+
"//": "DEVELOPER-OWNED — replace freely. Only src/mw/ is MinuteWork substrate. Distribution is YOUR EAS pipeline, not `minutework deploy`.",
|
|
3
3
|
"cli": {
|
|
4
4
|
"version": ">= 12.0.0",
|
|
5
5
|
"appVersionSource": "remote"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="expo/types" />
|
|
2
2
|
|
|
3
|
-
// DEVELOPER-OWNED — replace freely. Only src/mw/ is
|
|
3
|
+
// DEVELOPER-OWNED — replace freely. Only src/mw/ is MinuteWork substrate.
|
|
4
4
|
// NOTE: This file should not be edited and should be committed; Expo regenerates
|
|
5
5
|
// it. It gives `process.env.EXPO_PUBLIC_*` string typings for `src/mw/env.ts`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// DEVELOPER-OWNED — replace freely. Only src/mw/ is
|
|
1
|
+
// DEVELOPER-OWNED — replace freely. Only src/mw/ is MinuteWork substrate.
|
|
2
2
|
// Keep Metro scoped to this standalone Expo app even when the generated
|
|
3
|
-
//
|
|
3
|
+
// MinuteWork workspace root also has a pnpm workspace for tenant-app.
|
|
4
4
|
const path = require("node:path");
|
|
5
5
|
const { getDefaultConfig } = require("expo/metro-config");
|
|
6
6
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
//
|
|
1
|
+
// MinuteWork substrate. Thin layer — do not put product UI/logic here.
|
|
2
2
|
//
|
|
3
|
-
//
|
|
3
|
+
// MinuteWork native token client. Implements the browser-assisted device flow
|
|
4
4
|
// against the SHIPPED platform native-token endpoints (`/api/v1/native/session/*`).
|
|
5
5
|
//
|
|
6
|
-
// Authentication is owned by the
|
|
6
|
+
// Authentication is owned by the MinuteWork platform. This client only *obtains
|
|
7
7
|
// and uses* a platform-issued bearer token — there is NO JWT minting, NO password
|
|
8
8
|
// handling, NO local user table, and NO parallel auth stack here. Token plaintext
|
|
9
9
|
// is never logged.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
//
|
|
1
|
+
// MinuteWork substrate. Thin layer — do not put product UI/logic here.
|
|
2
2
|
//
|
|
3
|
-
// Zod schemas for the
|
|
3
|
+
// Zod schemas for the MinuteWork platform *native* session payloads. These match
|
|
4
4
|
// the SHIPPED platform native-token slice (`/api/v1/native/session/*`) response
|
|
5
5
|
// shapes exactly (DRF emits snake_case). They describe API responses, not product
|
|
6
6
|
// data. Keep them aligned with the platform serializers in
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
//
|
|
1
|
+
// MinuteWork substrate. Thin layer — do not put product UI/logic here.
|
|
2
2
|
//
|
|
3
|
-
// Builds absolute URLs for the
|
|
3
|
+
// Builds absolute URLs for the MinuteWork *platform native* session endpoints.
|
|
4
4
|
//
|
|
5
5
|
// These endpoints are the DIRECT platform API surface for native clients
|
|
6
6
|
// (`/api/v1/native/...`). The mobile app authenticates with a platform-issued
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//
|
|
1
|
+
// MinuteWork substrate. Thin layer — do not put product UI/logic here.
|
|
2
2
|
//
|
|
3
3
|
// Validates the EXPO_PUBLIC_* configuration the mobile app needs to talk to the
|
|
4
|
-
//
|
|
4
|
+
// MinuteWork platform. Mirrors the spirit of the next-tenant-app
|
|
5
5
|
// `env.server.ts`, but for Expo public env: in Expo, only `EXPO_PUBLIC_*`
|
|
6
6
|
// variables are inlined into the client bundle, and they must be referenced as
|
|
7
7
|
// *static* `process.env.EXPO_PUBLIC_FOO` property accesses so the Expo bundler
|
|
@@ -29,7 +29,7 @@ const optionalNameSchema = z.preprocess((value) => {
|
|
|
29
29
|
}
|
|
30
30
|
const normalized = value.trim();
|
|
31
31
|
return normalized.length > 0 ? normalized : undefined;
|
|
32
|
-
}, z.string().min(1).default("
|
|
32
|
+
}, z.string().min(1).default("MinuteWork"));
|
|
33
33
|
|
|
34
34
|
const envSchema = z.object({
|
|
35
35
|
platformBaseUrl: baseUrlSchema,
|
|
@@ -58,7 +58,7 @@ if (!parsed.success) {
|
|
|
58
58
|
|
|
59
59
|
throw new Error(
|
|
60
60
|
`Invalid Expo public environment for mobile-app: ${issues}. ` +
|
|
61
|
-
"Set EXPO_PUBLIC_MW_PLATFORM_BASE_URL to the
|
|
61
|
+
"Set EXPO_PUBLIC_MW_PLATFORM_BASE_URL to the MinuteWork platform URL.",
|
|
62
62
|
);
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// MinuteWork substrate. Thin layer — do not put product UI/logic here.
|
|
2
2
|
//
|
|
3
3
|
// Secure-store wrapper for the platform-issued native token pair. Persists the
|
|
4
4
|
// `{access, refresh, expiresAt}` triple in the device keychain/keystore via
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
"reference/mwv3-dj6-docs/auth_and_credential_contract.md"
|
|
15
15
|
],
|
|
16
16
|
"deployable": false,
|
|
17
|
-
"notes": "Bring-your-own-UI Expo (React Native + Expo Router) starter. Direct platform native API client (bearer token to /api/v1/native/...), NOT a tenant-app BFF cookie client. Distribution is the developer's EAS pipeline, not `
|
|
17
|
+
"notes": "Bring-your-own-UI Expo (React Native + Expo Router) starter. Direct platform native API client (bearer token to /api/v1/native/...), NOT a tenant-app BFF cookie client. Distribution is the developer's EAS pipeline, not `minutework deploy`. Only src/mw/ is MinuteWork substrate; everything else is developer-owned. src/mw/client.ts implements the real browser-assisted PKCE device flow against the platform native session endpoints; the OAuth-style redirect target is the app.json expo.scheme. This manifest is validated by tools/template/validate-template.mjs, not the strict shared template.schema.json (mobile is not a web/sidecar deployable kind)."
|
|
18
18
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// MinuteWork substrate — template governance tool (not part of the shipped app).
|
|
2
2
|
//
|
|
3
3
|
// Validates this template's `template.json`. The mobile starter is NOT a
|
|
4
4
|
// web/sidecar deployable, so it intentionally does NOT validate against the
|
|
@@ -55,7 +55,7 @@ if (manifest.builder_edit_mode !== "workspace_copy_only") {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
if (manifest.deployable !== false) {
|
|
58
|
-
throw new Error("mobile-app must declare deployable: false (EAS pipeline, not `
|
|
58
|
+
throw new Error("mobile-app must declare deployable: false (EAS pipeline, not `minutework deploy`)");
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
if (!Array.isArray(manifest.required_bootstrap_steps)) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
MW_PLATFORM_BASE_URL=http://127.0.0.1:8000
|
|
2
2
|
MW_PUBLIC_CONTENT_SOURCE=none
|
|
3
3
|
MW_CONTENT_API_TOKEN=
|
|
4
|
-
MW_TEMPLATE_APP_NAME=
|
|
4
|
+
MW_TEMPLATE_APP_NAME=MinuteWork Combined Starter
|
|
5
5
|
MW_PUBLIC_BASE_URL=
|
|
6
6
|
MW_PUBLIC_SITE_PROPERTY_KEY=
|
|
7
7
|
MW_PUBLIC_SITE_ENV=preview
|