@terreno/mcp 57.3.0 → 57.4.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/README.md +7 -1
- package/dist/bootstrap.d.ts +0 -18
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +10 -2428
- package/dist/bootstrap.js.map +1 -1
- package/dist/docs/guidelines/admin-frontend/guidelines/core.md +5 -1
- package/dist/docs/guidelines/api/skills/mongoose-schema-safety/SKILL.md +23 -10
- package/dist/docs/resources/syncdb.md +4 -1
- package/dist/docs/upgrades/57.4.0.md +140 -0
- package/dist/docs/versioned/next/README.md +3 -0
- package/dist/docs/versioned/next/explanation/README.md +4 -1
- package/dist/docs/versioned/next/explanation/admin-interface.md +20 -13
- package/dist/docs/versioned/next/explanation/charts.md +29 -0
- package/dist/docs/versioned/next/explanation/deployment-architecture-gcp.md +32 -0
- package/dist/docs/versioned/next/explanation/deployment-baseline.md +1 -1
- package/dist/docs/versioned/next/explanation/example-coverage.md +43 -0
- package/dist/docs/versioned/next/explanation/local-first-data.md +5 -2
- package/dist/docs/versioned/next/explanation/loop-engineering.md +9 -6
- package/dist/docs/versioned/next/explanation/model-router-actions.md +19 -2
- package/dist/docs/versioned/next/explanation/organizations.md +88 -0
- package/dist/docs/versioned/next/explanation/planning-plugins.md +114 -0
- package/dist/docs/versioned/next/explanation/positioning.md +3 -3
- package/dist/docs/versioned/next/explanation/repository-settings.md +6 -5
- package/dist/docs/versioned/next/explanation/roadmap-seed-issues.md +44 -34
- package/dist/docs/versioned/next/explanation/source-rules.md +1 -1
- package/dist/docs/versioned/next/explanation/static-analysis.md +76 -16
- package/dist/docs/versioned/next/how-to/README.md +10 -0
- package/dist/docs/versioned/next/how-to/add-gpt-chat-mascot.md +92 -0
- package/dist/docs/versioned/next/how-to/add-organizations.md +204 -0
- package/dist/docs/versioned/next/how-to/admin-add-model.md +9 -1
- package/dist/docs/versioned/next/how-to/admin-import-prebuilt.md +7 -1
- package/dist/docs/versioned/next/how-to/audit-log.md +85 -0
- package/dist/docs/versioned/next/how-to/background-jobs.md +296 -0
- package/dist/docs/versioned/next/how-to/build-admin-screens.md +42 -13
- package/dist/docs/versioned/next/how-to/charts-and-dashboards.md +37 -0
- package/dist/docs/versioned/next/how-to/circleci.md +136 -27
- package/dist/docs/versioned/next/how-to/compare-chart-rendered-snapshots.md +36 -0
- package/dist/docs/versioned/next/how-to/configure-better-auth.md +4 -0
- package/dist/docs/versioned/next/how-to/create-a-terreno-app.md +154 -0
- package/dist/docs/versioned/next/how-to/deploy-backend-to-cloud-run.md +2 -0
- package/dist/docs/versioned/next/how-to/github-actions-ci.md +4 -3
- package/dist/docs/versioned/next/how-to/github-issue-lifecycle.md +12 -8
- package/dist/docs/versioned/next/how-to/in-app-notifications.md +147 -0
- package/dist/docs/versioned/next/how-to/install-agent-skills.md +24 -12
- package/dist/docs/versioned/next/how-to/migrate-rtk-to-syncdb.md +19 -3
- package/dist/docs/versioned/next/how-to/product-announcements.md +155 -0
- package/dist/docs/versioned/next/how-to/run-mongodb-migrations.md +127 -0
- package/dist/docs/versioned/next/how-to/run-tests-locally.md +102 -0
- package/dist/docs/versioned/next/how-to/seed-a-database.md +7 -2
- package/dist/docs/versioned/next/implementationPlans/README.md +8 -5
- package/dist/docs/versioned/next/implementationPlans/admin-scripts-durable-jobs.md +44 -0
- package/dist/docs/versioned/next/implementationPlans/agent-ui-blocks.md +386 -0
- package/dist/docs/versioned/next/implementationPlans/agentic-sdlc-plugin.md +11 -8
- package/dist/docs/versioned/next/implementationPlans/announcements-surfaces.md +231 -0
- package/dist/docs/versioned/next/implementationPlans/announcements.md +289 -0
- package/dist/docs/versioned/next/implementationPlans/b2b-platform-program.md +3 -1
- package/dist/docs/versioned/next/implementationPlans/charts-and-dashboards.md +246 -0
- package/dist/docs/versioned/next/implementationPlans/comms-admin-dashboard.md +4 -3
- package/dist/docs/versioned/next/implementationPlans/create-terreno-app.md +177 -0
- package/dist/docs/versioned/next/implementationPlans/datatable-server-side-filtering.md +219 -0
- package/dist/docs/versioned/next/implementationPlans/examples-demo-coverage.md +17 -17
- package/dist/docs/versioned/next/implementationPlans/framework-audit-log.md +247 -0
- package/dist/docs/versioned/next/implementationPlans/gpt-chat-mascot.md +40 -0
- package/dist/docs/versioned/next/implementationPlans/job-queues.md +330 -0
- package/dist/docs/versioned/next/implementationPlans/knip-cleanup.md +136 -0
- package/dist/docs/versioned/next/implementationPlans/migrate-admin-to-syncdb.md +210 -0
- package/dist/docs/versioned/next/implementationPlans/mongodb-migrations-tooling.md +254 -0
- package/dist/docs/versioned/next/implementationPlans/notification-center.md +185 -0
- package/dist/docs/versioned/next/implementationPlans/org-management-ui.md +8 -3
- package/dist/docs/versioned/next/implementationPlans/positioning-django-rails-universal.md +1 -1
- package/dist/docs/versioned/next/reference/README.md +4 -0
- package/dist/docs/versioned/next/reference/admin-backend.md +83 -5
- package/dist/docs/versioned/next/reference/admin-config.md +7 -0
- package/dist/docs/versioned/next/reference/admin-frontend.md +178 -5
- package/dist/docs/versioned/next/reference/admin-spa.md +18 -1
- package/dist/docs/versioned/next/reference/ai.md +2 -0
- package/dist/docs/versioned/next/reference/announcements.md +179 -0
- package/dist/docs/versioned/next/reference/api.md +343 -4
- package/dist/docs/versioned/next/reference/comms.md +33 -0
- package/dist/docs/versioned/next/reference/create-terreno-app.md +44 -0
- package/dist/docs/versioned/next/reference/environment-variables.md +29 -0
- package/dist/docs/versioned/next/reference/jobs.md +319 -0
- package/dist/docs/versioned/next/reference/legacy/rtk.md +5 -1
- package/dist/docs/versioned/next/reference/lifecycle-plugin.md +29 -11
- package/dist/docs/versioned/next/reference/mcp-server.md +2 -43
- package/dist/docs/versioned/next/reference/scan-plugin.md +169 -0
- package/dist/docs/versioned/next/reference/syncdb.md +38 -12
- package/dist/docs/versioned/next/reference/test.md +57 -6
- package/dist/docs/versioned/next/reference/ui-performance.md +2 -1
- package/dist/docs/versioned/next/reference/ui.md +257 -3
- package/dist/docs/versioned/next/tasks/admin-scripts-durable-jobs.md +10 -0
- package/dist/docs/versioned/next/tasks/agent-ui-blocks.md +114 -0
- package/dist/docs/versioned/next/tasks/announcements-surfaces.md +101 -0
- package/dist/docs/versioned/next/tasks/announcements.md +173 -0
- package/dist/docs/versioned/next/tasks/charts-and-dashboards.md +120 -0
- package/dist/docs/versioned/next/tasks/create-terreno-app.md +82 -0
- package/dist/docs/versioned/next/tasks/datatable-server-side-filtering.md +87 -0
- package/dist/docs/versioned/next/tasks/examples-demo-coverage.md +123 -17
- package/dist/docs/versioned/next/tasks/framework-audit-log.md +86 -0
- package/dist/docs/versioned/next/tasks/gpt-chat-mascot.md +13 -0
- package/dist/docs/versioned/next/tasks/job-queues.md +144 -0
- package/dist/docs/versioned/next/tasks/knip-cleanup.md +146 -0
- package/dist/docs/versioned/next/tasks/migrate-admin-to-syncdb.md +209 -0
- package/dist/docs/versioned/next/tasks/mongodb-migrations-tooling.md +107 -0
- package/dist/docs/versioned/next/tasks/notification-center.md +102 -0
- package/dist/docs/versioned/next/tasks/org-management-ui.md +14 -14
- package/dist/docs/versioned/next/tutorials/README.md +1 -1
- package/dist/docs/versioned/next/tutorials/getting-started.md +62 -22
- package/dist/help/excerpt.d.ts +2 -0
- package/dist/help/excerpt.d.ts.map +1 -0
- package/dist/help/excerpt.js +8 -0
- package/dist/help/excerpt.js.map +1 -0
- package/dist/help/updateNotes.d.ts +42 -0
- package/dist/help/updateNotes.d.ts.map +1 -0
- package/dist/help/updateNotes.js +235 -0
- package/dist/help/updateNotes.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/local/tools/databaseQuery.d.ts +1 -0
- package/dist/local/tools/databaseQuery.d.ts.map +1 -1
- package/dist/local/tools/databaseQuery.js +1 -0
- package/dist/local/tools/databaseQuery.js.map +1 -1
- package/dist/packageGuidelines.d.ts +2 -2
- package/dist/packageGuidelines.d.ts.map +1 -1
- package/dist/packageGuidelines.js +2 -8
- package/dist/packageGuidelines.js.map +1 -1
- package/dist/resources.d.ts +3 -0
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +3 -0
- package/dist/resources.js.map +1 -1
- package/dist/search/chunker.d.ts +1 -0
- package/dist/search/chunker.d.ts.map +1 -1
- package/dist/search/chunker.js +1 -0
- package/dist/search/chunker.js.map +1 -1
- package/dist/search/docIndex.d.ts +1 -5
- package/dist/search/docIndex.d.ts.map +1 -1
- package/dist/search/docIndex.js +1 -0
- package/dist/search/docIndex.js.map +1 -1
- package/dist/search/docVersion.d.ts +2 -1
- package/dist/search/docVersion.d.ts.map +1 -1
- package/dist/search/docVersion.js +3 -1
- package/dist/search/docVersion.js.map +1 -1
- package/dist/tools.d.ts +2 -2
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +113 -2
- package/dist/tools.js.map +1 -1
- package/package.json +28 -27
- package/src/docs/guidelines/admin-frontend/guidelines/core.md +5 -1
- package/src/docs/guidelines/api/skills/mongoose-schema-safety/SKILL.md +23 -10
- package/src/docs/resources/syncdb.md +4 -1
- package/src/docs/upgrades/57.4.0.md +140 -0
- package/src/docs/versioned/next/README.md +3 -0
- package/src/docs/versioned/next/explanation/README.md +4 -1
- package/src/docs/versioned/next/explanation/admin-interface.md +20 -13
- package/src/docs/versioned/next/explanation/charts.md +29 -0
- package/src/docs/versioned/next/explanation/deployment-architecture-gcp.md +32 -0
- package/src/docs/versioned/next/explanation/deployment-baseline.md +1 -1
- package/src/docs/versioned/next/explanation/example-coverage.md +43 -0
- package/src/docs/versioned/next/explanation/local-first-data.md +5 -2
- package/src/docs/versioned/next/explanation/loop-engineering.md +9 -6
- package/src/docs/versioned/next/explanation/model-router-actions.md +19 -2
- package/src/docs/versioned/next/explanation/organizations.md +88 -0
- package/src/docs/versioned/next/explanation/planning-plugins.md +114 -0
- package/src/docs/versioned/next/explanation/positioning.md +3 -3
- package/src/docs/versioned/next/explanation/repository-settings.md +6 -5
- package/src/docs/versioned/next/explanation/roadmap-seed-issues.md +44 -34
- package/src/docs/versioned/next/explanation/source-rules.md +1 -1
- package/src/docs/versioned/next/explanation/static-analysis.md +76 -16
- package/src/docs/versioned/next/how-to/README.md +10 -0
- package/src/docs/versioned/next/how-to/add-gpt-chat-mascot.md +92 -0
- package/src/docs/versioned/next/how-to/add-organizations.md +204 -0
- package/src/docs/versioned/next/how-to/admin-add-model.md +9 -1
- package/src/docs/versioned/next/how-to/admin-import-prebuilt.md +7 -1
- package/src/docs/versioned/next/how-to/audit-log.md +85 -0
- package/src/docs/versioned/next/how-to/background-jobs.md +296 -0
- package/src/docs/versioned/next/how-to/build-admin-screens.md +42 -13
- package/src/docs/versioned/next/how-to/charts-and-dashboards.md +37 -0
- package/src/docs/versioned/next/how-to/circleci.md +136 -27
- package/src/docs/versioned/next/how-to/compare-chart-rendered-snapshots.md +36 -0
- package/src/docs/versioned/next/how-to/configure-better-auth.md +4 -0
- package/src/docs/versioned/next/how-to/create-a-terreno-app.md +154 -0
- package/src/docs/versioned/next/how-to/deploy-backend-to-cloud-run.md +2 -0
- package/src/docs/versioned/next/how-to/github-actions-ci.md +4 -3
- package/src/docs/versioned/next/how-to/github-issue-lifecycle.md +12 -8
- package/src/docs/versioned/next/how-to/in-app-notifications.md +147 -0
- package/src/docs/versioned/next/how-to/install-agent-skills.md +24 -12
- package/src/docs/versioned/next/how-to/migrate-rtk-to-syncdb.md +19 -3
- package/src/docs/versioned/next/how-to/product-announcements.md +155 -0
- package/src/docs/versioned/next/how-to/run-mongodb-migrations.md +127 -0
- package/src/docs/versioned/next/how-to/run-tests-locally.md +102 -0
- package/src/docs/versioned/next/how-to/seed-a-database.md +7 -2
- package/src/docs/versioned/next/implementationPlans/README.md +8 -5
- package/src/docs/versioned/next/implementationPlans/admin-scripts-durable-jobs.md +44 -0
- package/src/docs/versioned/next/implementationPlans/agent-ui-blocks.md +386 -0
- package/src/docs/versioned/next/implementationPlans/agentic-sdlc-plugin.md +11 -8
- package/src/docs/versioned/next/implementationPlans/announcements-surfaces.md +231 -0
- package/src/docs/versioned/next/implementationPlans/announcements.md +289 -0
- package/src/docs/versioned/next/implementationPlans/b2b-platform-program.md +3 -1
- package/src/docs/versioned/next/implementationPlans/charts-and-dashboards.md +246 -0
- package/src/docs/versioned/next/implementationPlans/comms-admin-dashboard.md +4 -3
- package/src/docs/versioned/next/implementationPlans/create-terreno-app.md +177 -0
- package/src/docs/versioned/next/implementationPlans/datatable-server-side-filtering.md +219 -0
- package/src/docs/versioned/next/implementationPlans/examples-demo-coverage.md +17 -17
- package/src/docs/versioned/next/implementationPlans/framework-audit-log.md +247 -0
- package/src/docs/versioned/next/implementationPlans/gpt-chat-mascot.md +40 -0
- package/src/docs/versioned/next/implementationPlans/job-queues.md +330 -0
- package/src/docs/versioned/next/implementationPlans/knip-cleanup.md +136 -0
- package/src/docs/versioned/next/implementationPlans/migrate-admin-to-syncdb.md +210 -0
- package/src/docs/versioned/next/implementationPlans/mongodb-migrations-tooling.md +254 -0
- package/src/docs/versioned/next/implementationPlans/notification-center.md +185 -0
- package/src/docs/versioned/next/implementationPlans/org-management-ui.md +8 -3
- package/src/docs/versioned/next/implementationPlans/positioning-django-rails-universal.md +1 -1
- package/src/docs/versioned/next/reference/README.md +4 -0
- package/src/docs/versioned/next/reference/admin-backend.md +83 -5
- package/src/docs/versioned/next/reference/admin-config.md +7 -0
- package/src/docs/versioned/next/reference/admin-frontend.md +178 -5
- package/src/docs/versioned/next/reference/admin-spa.md +18 -1
- package/src/docs/versioned/next/reference/ai.md +2 -0
- package/src/docs/versioned/next/reference/announcements.md +179 -0
- package/src/docs/versioned/next/reference/api.md +343 -4
- package/src/docs/versioned/next/reference/comms.md +33 -0
- package/src/docs/versioned/next/reference/create-terreno-app.md +44 -0
- package/src/docs/versioned/next/reference/environment-variables.md +29 -0
- package/src/docs/versioned/next/reference/jobs.md +319 -0
- package/src/docs/versioned/next/reference/legacy/rtk.md +5 -1
- package/src/docs/versioned/next/reference/lifecycle-plugin.md +29 -11
- package/src/docs/versioned/next/reference/mcp-server.md +2 -43
- package/src/docs/versioned/next/reference/scan-plugin.md +169 -0
- package/src/docs/versioned/next/reference/syncdb.md +38 -12
- package/src/docs/versioned/next/reference/test.md +57 -6
- package/src/docs/versioned/next/reference/ui-performance.md +2 -1
- package/src/docs/versioned/next/reference/ui.md +257 -3
- package/src/docs/versioned/next/tasks/admin-scripts-durable-jobs.md +10 -0
- package/src/docs/versioned/next/tasks/agent-ui-blocks.md +114 -0
- package/src/docs/versioned/next/tasks/announcements-surfaces.md +101 -0
- package/src/docs/versioned/next/tasks/announcements.md +173 -0
- package/src/docs/versioned/next/tasks/charts-and-dashboards.md +120 -0
- package/src/docs/versioned/next/tasks/create-terreno-app.md +82 -0
- package/src/docs/versioned/next/tasks/datatable-server-side-filtering.md +87 -0
- package/src/docs/versioned/next/tasks/examples-demo-coverage.md +123 -17
- package/src/docs/versioned/next/tasks/framework-audit-log.md +86 -0
- package/src/docs/versioned/next/tasks/gpt-chat-mascot.md +13 -0
- package/src/docs/versioned/next/tasks/job-queues.md +144 -0
- package/src/docs/versioned/next/tasks/knip-cleanup.md +146 -0
- package/src/docs/versioned/next/tasks/migrate-admin-to-syncdb.md +209 -0
- package/src/docs/versioned/next/tasks/mongodb-migrations-tooling.md +107 -0
- package/src/docs/versioned/next/tasks/notification-center.md +102 -0
- package/src/docs/versioned/next/tasks/org-management-ui.md +14 -14
- package/src/docs/versioned/next/tutorials/README.md +1 -1
- package/src/docs/versioned/next/tutorials/getting-started.md +62 -22
|
@@ -26,7 +26,12 @@ CircleCI `run-preview-cleanup` parameter.
|
|
|
26
26
|
Copy Netlify and GCP values from GitHub Actions secrets/vars. Until they
|
|
27
27
|
are set, CircleCI deploy jobs skip with exit 0 and GHA remains the live
|
|
28
28
|
deployer.
|
|
29
|
-
5.
|
|
29
|
+
5. Set project Environment Variable `CODECOV_TOKEN` (Codecov upload token) so
|
|
30
|
+
package CI can upload `coverage/lcov.info`. Uploads skip when it is unset.
|
|
31
|
+
Mirror the same secret as GitHub Actions `CODECOV_TOKEN` for retained twins.
|
|
32
|
+
Public repos need a token unless the Codecov org disables token auth for
|
|
33
|
+
public repositories.
|
|
34
|
+
6. Build forked PRs if you want DCO + rulesync on forks.
|
|
30
35
|
|
|
31
36
|
GitHub App org/project slug (API and CLI):
|
|
32
37
|
`circleci/6UHiK7pThPXbhnNi3umQNe/W3HZeMJujyMB2sYiUXaQbs`.
|
|
@@ -43,13 +48,18 @@ list pipelines on the slug above.
|
|
|
43
48
|
| `.circleci/config.yml` | Setup workflow + `path-filtering` (this is the live config) |
|
|
44
49
|
| `.circleci/continue-config.yml` | Real jobs/workflows gated by those params |
|
|
45
50
|
|
|
46
|
-
|
|
51
|
+
Fork-only `dco` and PR `architectural-pr-review` always start on continuation
|
|
52
|
+
(review skips before checkout when the agentic/GitHub contexts are empty).
|
|
47
53
|
`rulesync-check` runs only when generated-rule sources change (`run-rulesync`).
|
|
54
|
+
`admin-backend/**` and `admin-frontend/**` start `packages-ci` (lint, compile,
|
|
55
|
+
`test:coverage`). Dedicated `admin-*-ci` job definitions stay in the config as
|
|
56
|
+
the same command sequence.
|
|
48
57
|
|
|
49
58
|
`.circleci/**` sets `run-circleci-config`. On **config-only** PRs that workflow
|
|
50
|
-
runs a representative slice (`api-ci`, `ui-ci`, `example-backend-ci`,
|
|
51
|
-
`
|
|
52
|
-
|
|
59
|
+
runs a representative slice (`api-ci`, `ui-ci`, `example-backend-ci`, `e2e`
|
|
60
|
+
shard `auth`). `repo-policies` still starts from `run-repo-policies` (also set
|
|
61
|
+
for `.circleci/**`); the kitchen-sink does not start a second copy. If the same
|
|
62
|
+
pipeline already set `run-api`, `run-ui`, `run-e2e`, `run-example-backend`, or
|
|
53
63
|
`run-admin-spa`, that kitchen-sink workflow is skipped so jobs are not doubled.
|
|
54
64
|
`comms/**` also sets `run-example-backend` and `run-example-backend-script`,
|
|
55
65
|
matching the GitHub Actions twins.
|
|
@@ -58,6 +68,76 @@ The example-backend Docker job runs only when its image recipe changes
|
|
|
58
68
|
(`Dockerfile`, `.dockerignore`, package manifests, or `bun.lock`). API/source
|
|
59
69
|
changes are covered by preview CD builds and do not start a duplicate image job.
|
|
60
70
|
|
|
71
|
+
UI, RTK, and admin-frontend changes do **not** start `example-backend-ci`.
|
|
72
|
+
Those packages are covered by `ui-ci` / `rtk-ci` / `packages-ci` plus e2e and
|
|
73
|
+
admin-spa. `new-file-coverage` starts on package `src/` (and example app
|
|
74
|
+
runtime paths including `example-frontend/components/`), not on every `*.ts`
|
|
75
|
+
file in the repo (Playwright specs no longer compile the world). Package CI
|
|
76
|
+
jobs that already ran `test:coverage` evaluate the 90% new-file gate against
|
|
77
|
+
that LCOV (`scripts/ci/check-new-file-coverage-lcov.sh`). Retained GitHub
|
|
78
|
+
Actions twins run that script with `working-directory: .` so a package-level
|
|
79
|
+
`defaults.run` cwd cannot nest `{package}/coverage/lcov.info`. GHA
|
|
80
|
+
`upload-codecov` steps pass `token: ${{ secrets.CODECOV_TOKEN }}`. The dedicated
|
|
81
|
+
`new-file-coverage` job skips those packages and only reruns tests for
|
|
82
|
+
workspaces without a coverage job in the same pipeline (example apps). Reruns
|
|
83
|
+
prefer colocated `*.test.ts` files and compile `@terreno/*` dist deps only
|
|
84
|
+
when the package imports them. Coverage-script unit tests run in the cheap
|
|
85
|
+
`coverage-scripts` job.
|
|
86
|
+
|
|
87
|
+
Playwright runs five shards after `e2e-prepare` (`auth`, `app`, `admin-core`,
|
|
88
|
+
`admin-table`, `syncdb`) instead of one container per spec file. Each shard
|
|
89
|
+
first checks the [affected gate](#e2e-affected-gate) and halts when no changed
|
|
90
|
+
file can reach it. Repository
|
|
91
|
+
policy checks share one `repo-policies` job so eight small checkouts do not
|
|
92
|
+
sit in the concurrency queue. `repo-policies` uses Node 22.14 because Knip's
|
|
93
|
+
oxc-parser throws `ERR_REQUIRE_ESM` on the shared 22.11 executor.
|
|
94
|
+
Require `repo-policies` in branch protection. Require `e2e-auth` /
|
|
95
|
+
`e2e-app` / … only as path-filtered checks; config-only PRs post `e2e-auth`
|
|
96
|
+
as the smoke shard and do not run the other four. Do not require the old
|
|
97
|
+
`no-barrel-imports` / `e2e-login` names.
|
|
98
|
+
|
|
99
|
+
## E2E affected gate
|
|
100
|
+
|
|
101
|
+
Path filters decide whether e2e is a *candidate*; `scripts/ci/e2eAffected`
|
|
102
|
+
decides which shards actually run. `e2e-prepare` runs
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
bun run check:e2e-affected --base origin/master --write e2e-affected.json
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
and persists the decision to the workspace (also stored as the
|
|
109
|
+
`e2e-affected.json` artifact). Each shard reads it and calls
|
|
110
|
+
`circleci-agent step halt` before `bun install` when it is unaffected, so an
|
|
111
|
+
unneeded shard costs one container start instead of a full Playwright run.
|
|
112
|
+
Run the same command locally to see what a branch would trigger.
|
|
113
|
+
|
|
114
|
+
`e2e-prepare` always runs when a path filter starts the workflow: compiling the
|
|
115
|
+
workspace and `bun expo export`ing the web bundle is the check that catches
|
|
116
|
+
build breakage the shards would otherwise miss.
|
|
117
|
+
|
|
118
|
+
The gate **fails open** — it runs every shard when the base revision cannot be
|
|
119
|
+
resolved, when a module cannot be resolved, or when the analysis throws. A
|
|
120
|
+
change is only skipped when it is provably outside a shard's surface:
|
|
121
|
+
|
|
122
|
+
| Change | Decision |
|
|
123
|
+
| --- | --- |
|
|
124
|
+
| Module reachable from the shard's screens, specs, or `example-backend/src` | run |
|
|
125
|
+
| Module nothing reachable imports (`ui/src/Avatar.tsx` today) | skip |
|
|
126
|
+
| Type-only edit to a reachable module (interfaces, `type`, `declare`) | skip |
|
|
127
|
+
| New export or lazy registry entry no consumer imports | skip |
|
|
128
|
+
| Re-export barrel that repoints a binding the app imports | run |
|
|
129
|
+
| `bun.lock` install the app resolves changing version | run |
|
|
130
|
+
| `bun.lock` or `package.json` churn outside that closure | skip |
|
|
131
|
+
| Docs, rules, `demo/**`, `scripts/**`, unit tests, snapshots, lint config | skip |
|
|
132
|
+
| Anything else (`metro.config.js`, `app.json`, `.circleci/**`, patches) | run |
|
|
133
|
+
|
|
134
|
+
Shard membership comes from `scripts/ci/e2eAffected/shards.ts`, which must
|
|
135
|
+
mirror the spec groups in `run_example_frontend_e2e`. `shards.test.ts` fails
|
|
136
|
+
when the two drift, when a spec is unassigned, or when a spec navigates to a
|
|
137
|
+
screen its shard does not declare. It also asserts that `ui/src/index.tsx`
|
|
138
|
+
stays a pass-through barrel — runtime code there would make every
|
|
139
|
+
`@terreno/ui` change look reachable.
|
|
140
|
+
|
|
61
141
|
## Automatic deploys
|
|
62
142
|
|
|
63
143
|
Path filters set `run-deploy-*` and `run-cd-*`. Production jobs run only on
|
|
@@ -80,8 +160,11 @@ and skip when `NETLIFY_AUTH_TOKEN` or the site id is missing. The same skip
|
|
|
80
160
|
applies to `gcp-cd-*` when `terreno-gcp` lacks WIF or SA emails, so GitHub
|
|
81
161
|
`cd.yml` remains the live GCP writer. GitHub `terraform-preview` and
|
|
82
162
|
`backend-deploy-preview` run only when
|
|
83
|
-
`github.event.pull_request.head.repo.full_name == github.repository`.
|
|
84
|
-
|
|
163
|
+
`github.event.pull_request.head.repo.full_name == github.repository`.
|
|
164
|
+
Terraform preview always describes the Infra Manager preview (state,
|
|
165
|
+
`errorCode`, `errorLogs`) before delete, including when `previews create`
|
|
166
|
+
fails. Fork PRs still present `repository: FlourishHealth/terreno` on the
|
|
167
|
+
OIDC token, so
|
|
85
168
|
WIF would accept them if those jobs ran. Netlify GHA jobs fail closed on
|
|
86
169
|
forks (secrets withheld). After filling a context, confirm a CircleCI deploy
|
|
87
170
|
URL, then set the matching GHA workflows to `on: []`. Turn off Netlify's
|
|
@@ -113,9 +196,12 @@ project, leave fork-PR secret passing off, and attach that context **only** to
|
|
|
113
196
|
unset, and it skips fork PRs. The job checks out `origin/master` before running
|
|
114
197
|
the review script so a PR cannot rewrite the reviewer.
|
|
115
198
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
199
|
+
Netlify and GCP jobs **halt as the first step** when `terreno-netlify` /
|
|
200
|
+
`terreno-gcp` are empty, before checkout or `bun install`. Path filters still
|
|
201
|
+
start those jobs so filling the context turns deploys on without a config
|
|
202
|
+
change; skip-green no longer pays for a full `large` install. Docker Layer
|
|
203
|
+
Caching is off (200 credits per job). The docs Netlify target disables
|
|
204
|
+
Docusaurus minification so the build stays within the 8 GB `large` executor.
|
|
119
205
|
|
|
120
206
|
`terreno-gcp` uses CircleCI OIDC (`CIRCLE_OIDC_TOKEN_V2`), never a JSON service
|
|
121
207
|
account key. Set `circleci_org_id`, `circleci_project_id`, and
|
|
@@ -130,39 +216,47 @@ ambient OIDC token for GCP impersonation.
|
|
|
130
216
|
Branch protection must require the CircleCI job names below. Remove disabled
|
|
131
217
|
GitHub check names or pull requests will wait for checks that can no longer run.
|
|
132
218
|
|
|
219
|
+
Dedicated package jobs (`api-ci`, `ai-ci`, `rtk-ci`, `ui-ci`, `syncdb-ci`,
|
|
220
|
+
`comms-ci`, `mcp-server-ci`, `admin-spa-ci`) run `bun run test:coverage`
|
|
221
|
+
(`scripts/check-coverage.ts`, 95% functions and lines). Isolated `syncdb` tests
|
|
222
|
+
are included by that script. Published packages without a dedicated workflow
|
|
223
|
+
(`admin-backend`, `admin-frontend`, `api-health`, `feature-flags`, `test`) run
|
|
224
|
+
the same commands through the parameterized `packages-ci` job, gated by
|
|
225
|
+
`run-admin-backend`, `run-admin-frontend`, `run-api-health`,
|
|
226
|
+
`run-feature-flags`, and `run-test-package`. The retained
|
|
227
|
+
`.github/workflows/packages-ci.yml` matrix twin stays `on: []`.
|
|
228
|
+
|
|
133
229
|
| GHA job `name:` / workflow | CircleCI job |
|
|
134
230
|
|----------------------------|--------------|
|
|
135
|
-
| Repository policies
|
|
136
|
-
| Repository policies / Production source rules | `source-rules` |
|
|
137
|
-
| Explicit any baseline | `explicit-any` |
|
|
138
|
-
| License coverage | `license-coverage` |
|
|
231
|
+
| Repository policies (barrels, source rules, explicit any, licenses, changelog, parity, lifecycle, static analysis) | `repo-policies` |
|
|
139
232
|
| Verify rules are in sync | `rulesync-check` |
|
|
140
233
|
| `dco` | `dco` |
|
|
141
234
|
| Run all tests (API CI) | `api-ci` |
|
|
235
|
+
| Admin backend lint, compile, coverage | `packages-ci` (`admin-backend`) |
|
|
236
|
+
| Admin frontend lint, compile, coverage | `packages-ci` (`admin-frontend`) |
|
|
142
237
|
| Run all tests (AI CI) | `ai-ci` |
|
|
143
238
|
| RTK Lint and Build | `rtk-ci` |
|
|
144
239
|
| Syncdb Lint, Build, and Tests | `syncdb-ci` |
|
|
145
|
-
| UI Lint, Build, Types, and Tests | `ui-ci` |
|
|
146
|
-
| Demo TypeScript Check
|
|
147
|
-
| Demo Lint and TypeScript Check | `ui-demo-ci` |
|
|
240
|
+
| UI Lint, Build, Types, and Tests + demo typecheck | `ui-ci` |
|
|
241
|
+
| Demo Lint and TypeScript Check | `ui-demo-ci` (demo-only PRs) |
|
|
148
242
|
| Lint, compile, and test communications | `comms-ci` |
|
|
149
243
|
| Lint, Build, and Test (MCP) | `mcp-server-ci` |
|
|
244
|
+
| Lint, compile, and coverage (create-terreno-app) | `create-terreno-app-ci` |
|
|
150
245
|
| Build Docker Image (MCP) | `mcp-server-docker` |
|
|
151
246
|
| Example Frontend Lint and Test | `example-frontend-ci` |
|
|
152
|
-
| Example Backend
|
|
153
|
-
| Run admin script CLI | `example-backend-script-runner` |
|
|
247
|
+
| Example Backend lint/test + admin script CLI | `example-backend-ci` |
|
|
248
|
+
| Run admin script CLI (when backend CI did not already run) | `example-backend-script-runner` |
|
|
154
249
|
| Build backend Docker image | `example-backend-docker` |
|
|
155
250
|
| Admin SPA Build and E2E | `admin-spa-ci` |
|
|
156
|
-
|
|
|
251
|
+
| Lint, compile, and coverage (matrix package) | `packages-ci` (`admin-backend`, `admin-frontend`, `api-health`, `feature-flags`, `test`) |
|
|
252
|
+
| E2E · `<shard>` | `e2e` (matrix `shard`: `auth`, `app`, `admin-core`, `admin-table`, `syncdb`) |
|
|
157
253
|
| E2E Load · syncdb-loadlab | `e2e-load` (trigger-gated, see below) |
|
|
158
254
|
| Admin SPA Backend Integration E2E | `admin-spa-integration` |
|
|
159
|
-
| _(new)_ CircleCI path-filter parity | `circleci-parity` |
|
|
160
|
-
| _(smoke)_ | `config-ok` |
|
|
161
255
|
| _(e2e compile+export once)_ | `e2e-prepare` |
|
|
162
256
|
| Architectural PR review | `architectural-pr-review` (non-blocking; skip forks / missing secrets) |
|
|
163
257
|
| Maestro E2E Tests | `maestro-e2e` (`include-demo` when ui/demo Maestro flows change) |
|
|
164
|
-
| Changelog fragments | `changelog-fragments` |
|
|
165
258
|
| New file coverage | `new-file-coverage` |
|
|
259
|
+
| Coverage gate scripts | `coverage-scripts` |
|
|
166
260
|
| Netlify production | `deploy-demo`, `deploy-frontend`, `deploy-docs` |
|
|
167
261
|
| Netlify PR preview | `deploy-demo-preview`, `deploy-frontend-preview`, `deploy-docs-preview` |
|
|
168
262
|
| GCP production | `gcp-cd-prod` |
|
|
@@ -226,6 +320,12 @@ preview **deploys** run on open PRs from this repository; fork PRs are skipped.
|
|
|
226
320
|
If `CIRCLE_PULL_REQUEST` is unset (GitHub App `push` pipelines), the job looks
|
|
227
321
|
up the open PR for `CIRCLE_BRANCH` via the GitHub API.
|
|
228
322
|
|
|
323
|
+
`mcp-server-docker` is push-only, matching GitHub Actions. It uses
|
|
324
|
+
`resolve-preview-pr.sh` for that lookup and skips when a PR exists. Its
|
|
325
|
+
production `bun install` passes `--ignore-scripts`: root `prepare` runs
|
|
326
|
+
`simple-git-hooks`, which is a devDependency and is missing from a production
|
|
327
|
+
tree.
|
|
328
|
+
|
|
229
329
|
## Path-filter parity guard
|
|
230
330
|
|
|
231
331
|
`bun run check:circleci-parity` guards active GitHub/CircleCI twins. Deploy
|
|
@@ -240,15 +340,21 @@ Edits to `.circleci/config.yml` / `continue-config.yml` /
|
|
|
240
340
|
`example-frontend/playwright.circleci.config.ts` set `run-circleci-config`.
|
|
241
341
|
When no package/e2e path param is also set, that workflow runs the slice above.
|
|
242
342
|
CircleCI e2e compiles the workspace and `bun expo export`s **once** in
|
|
243
|
-
`e2e-prepare`,
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
343
|
+
`e2e-prepare` (`large`, 8 GB — the export heap is 3 GB). Five shards then
|
|
344
|
+
attach that dist on `medium+` (6 GB, 15 credits/min). `xlarge` is not on this project's plan. In-job
|
|
345
|
+
compile+export jobs (`maestro-e2e`, `admin-spa-integration`, `e2e-load`) stay
|
|
346
|
+
on `large`. Chaos e2e treats a hidden Offline banner after `goOnline` as
|
|
347
|
+
reconnect — a `client.stop()`/`start()` handshake hung 30s on the static
|
|
247
348
|
export. `maestro-e2e` follows the same static-export rule: it exports
|
|
248
349
|
example-frontend and serves the static `dist`. If the browsers image has no
|
|
249
350
|
Xvfb on `:99`, a `background: true` fallback starts one and keeps it alive
|
|
250
351
|
for later steps.
|
|
251
352
|
|
|
353
|
+
Package jobs that only lint/compile/test one workspace package stay on
|
|
354
|
+
`medium` (including `mcp-server-ci`, `example-backend-ci`, and
|
|
355
|
+
`new-file-coverage`). `coverage-scripts` is `small`. Do not put Docker Layer Caching on remote-docker jobs
|
|
356
|
+
unless a profiled image build reuses layers enough to beat 200 credits/run.
|
|
357
|
+
|
|
252
358
|
## Nightly load test
|
|
253
359
|
|
|
254
360
|
`e2e-load` (syncdb-loadlab) is never PR-blocking. Trigger the **setup** pipeline
|
|
@@ -266,6 +372,9 @@ This replaces the GHA cron / `workflow_dispatch` / `load-test` label triggers in
|
|
|
266
372
|
|
|
267
373
|
## Local validation
|
|
268
374
|
|
|
375
|
+
Map every CircleCI test job to a local command with
|
|
376
|
+
[run tests locally](run-tests-locally.md). Config syntax:
|
|
377
|
+
|
|
269
378
|
```bash
|
|
270
379
|
circleci config validate .circleci/config.yml
|
|
271
380
|
circleci config validate .circleci/continue-config.yml
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Compare rendered chart snapshots
|
|
2
|
+
|
|
3
|
+
JSON snapshots of the React tree do not prove chart paint. Terreno renders a gallery of
|
|
4
|
+
easy-through-hard charts in the demo app and diffs those PNGs against goldens.
|
|
5
|
+
|
|
6
|
+
1. Start from the repo root (reuses demo web on port 8085 if it is already up):
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
bun run ui:charts:compare
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
2. Open `http://localhost:8085/demo/chart-visual-gallery` if you want to see the same
|
|
13
|
+
fixtures a person sees.
|
|
14
|
+
|
|
15
|
+
3. On a mismatch, inspect:
|
|
16
|
+
|
|
17
|
+
- `demo/rendered-snapshots/<id>.png` — accepted render
|
|
18
|
+
- `demo/chart-visual-output/actual/<id>.png` — this checkout
|
|
19
|
+
- `demo/chart-visual-output/diff/<id>.png` — pixel highlight
|
|
20
|
+
|
|
21
|
+
4. If the new paint is the intended design, write goldens:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
bun run ui:charts:update-snapshots
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
5. Limit one fixture while iterating:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
bun scripts/charts/compareRenderedSnapshots.ts --only=line-three-points
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Agents reviewing a fail should follow the `review-chart-visuals` skill and look at the
|
|
34
|
+
PNGs, not only the code diff.
|
|
35
|
+
|
|
36
|
+
`CHART_VISUAL_BASE_URL` overrides the demo origin when the gallery is already hosted.
|
|
@@ -113,6 +113,10 @@ const config: BetterAuthConfig = {
|
|
|
113
113
|
};
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
+
Throwaway in-process seed apps (CLI / container smoke tests that call Better Auth
|
|
117
|
+
sign-up many times) should set `disableRateLimit: true` on that instance only.
|
|
118
|
+
Better Auth enables its limiter in production, which 429s the fourth seeded user.
|
|
119
|
+
|
|
116
120
|
### 3. Register BetterAuthApp Plugin
|
|
117
121
|
|
|
118
122
|
Use the TerrenoApp plugin system:
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Create a Terreno app
|
|
2
|
+
|
|
3
|
+
Scaffold a deployable full-stack Terreno app (backend, Expo frontend, seed script, consumer `Dockerfile`, CI, MCP config) with one non-interactive command.
|
|
4
|
+
|
|
5
|
+
The CLI writes files only — it does not run `bun install`, start MongoDB, or seed data.
|
|
6
|
+
|
|
7
|
+
## Prerequisites
|
|
8
|
+
|
|
9
|
+
- [Bun](https://bun.sh/) (or Node/npm for `npm create`)
|
|
10
|
+
- An empty target directory (see [Non-empty targets](#non-empty-targets))
|
|
11
|
+
- MongoDB as a **replica set** before running the backend (see [Start MongoDB](#3-start-mongodb-replica-set))
|
|
12
|
+
|
|
13
|
+
## 1. Scaffold the app
|
|
14
|
+
|
|
15
|
+
From the parent directory where you want `<appName>/`:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
bunx create-terreno-app my-app --display-name "My App"
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
npm alternative (note the `--` before flags):
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm create terreno-app my-app -- --display-name "My App"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Derive the display name from `appName` when you do not need a custom title:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
bunx create-terreno-app my-app --yes
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Optional flags:
|
|
34
|
+
|
|
35
|
+
| Flag | Required | Default |
|
|
36
|
+
| --- | --- | --- |
|
|
37
|
+
| `appName` (positional) | yes | — kebab-case directory and package name (`^[a-z][a-z0-9-]*$`) |
|
|
38
|
+
| `--display-name` | unless `--yes` | derived from `appName` when `--yes` |
|
|
39
|
+
| `--description` | no | empty |
|
|
40
|
+
| `--mcp-server-url` | no | `https://mcp.terreno.flourish.health` |
|
|
41
|
+
| `--yes` | no | off |
|
|
42
|
+
|
|
43
|
+
The CLI creates `<cwd>/<appName>/`. Package source: [`create-terreno-app/`](https://github.com/FlourishHealth/terreno/tree/master/create-terreno-app) in the Terreno monorepo.
|
|
44
|
+
|
|
45
|
+
## Non-empty targets
|
|
46
|
+
|
|
47
|
+
The CLI refuses to write when the target already contains anything other than `.git` or `.gitignore`. It exits non-zero and leaves existing files unchanged.
|
|
48
|
+
|
|
49
|
+
Initializing git first is fine:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
mkdir my-app && cd my-app && git init
|
|
53
|
+
cd .. && bunx create-terreno-app my-app --yes
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Generated layout
|
|
57
|
+
|
|
58
|
+
| Path | Purpose |
|
|
59
|
+
| --- | --- |
|
|
60
|
+
| `backend/` | Express/Mongoose API (`@terreno/api`, Better Auth, admin, sync) |
|
|
61
|
+
| `frontend/` | Expo universal app (`@terreno/ui`, `@terreno/syncdb`, `@terreno/rtk`) |
|
|
62
|
+
| `Dockerfile` | Consumer backend image (`backend/` only — not the Terreno monorepo) |
|
|
63
|
+
| `.dockerignore` | Excludes local env secrets, dependencies, and build output from the image context |
|
|
64
|
+
| `backend/.env`, `frontend/.env` | Gitignored local-dev defaults (written on scaffold) |
|
|
65
|
+
| `backend/.env.example`, `frontend/.env.example` | Committed templates for production and export |
|
|
66
|
+
| `.github/workflows/` | Backend and frontend CI |
|
|
67
|
+
| `.cursor/mcp.json`, `.cursorrules`, `CLAUDE.md` | Agent tooling |
|
|
68
|
+
| `README.md` | App-specific next steps and deploy links |
|
|
69
|
+
|
|
70
|
+
Generated `@terreno/*` dependencies pin to `^<create-terreno-app version>` at scaffold time.
|
|
71
|
+
|
|
72
|
+
## 2. Install dependencies
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
cd my-app
|
|
76
|
+
(cd backend && bun install)
|
|
77
|
+
(cd frontend && bun install)
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## 3. Start MongoDB (replica set)
|
|
81
|
+
|
|
82
|
+
Sync and realtime require a replica set (even a single-node dev set). See the [deployment baseline](../explanation/deployment-baseline.md).
|
|
83
|
+
|
|
84
|
+
From the generated app root, run this local single-node example after `mongod` is available:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
mkdir -p .devdata/mongo
|
|
88
|
+
mongod --replSet rs0 --port 27017 --bind_ip 127.0.0.1 --dbpath .devdata/mongo &
|
|
89
|
+
# Initiate once (use node for the driver command if bun errors on bson):
|
|
90
|
+
node -e 'import("mongodb").then(async ({MongoClient})=>{const c=new MongoClient("mongodb://127.0.0.1:27017/?directConnection=true");await c.connect();await c.db("admin").command({replSetInitiate:{_id:"rs0",members:[{_id:0,host:"127.0.0.1:27017"}]}}).catch(()=>{});await c.close();})'
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
The scaffold sets `MONGO_URI` in `backend/.env` to `mongodb://127.0.0.1:27017/<app_name>?replicaSet=rs0` (hyphens in `appName` become underscores in the database name). Copy from `backend/.env.example` when you need production values.
|
|
94
|
+
|
|
95
|
+
## 4. Seed login users
|
|
96
|
+
|
|
97
|
+
With MongoDB running as a replica set:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
(cd backend && bun run seed)
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Creates:
|
|
104
|
+
|
|
105
|
+
| Email | Password | Notes |
|
|
106
|
+
| --- | --- | --- |
|
|
107
|
+
| `test@example.com` | `testpassword123` | Standard user |
|
|
108
|
+
| `admin@example.com` | `testpassword123` | Admin user |
|
|
109
|
+
|
|
110
|
+
Seed behavior and flags: [Seed a database](seed-a-database.md). Better Auth setup: [Configure Better Auth](configure-better-auth.md).
|
|
111
|
+
|
|
112
|
+
## 5. Run the stack
|
|
113
|
+
|
|
114
|
+
Terminal 1 — API (default port `4000`):
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
(cd backend && bun run dev)
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Health check: `curl http://localhost:4000/health` → `"healthy":true`.
|
|
121
|
+
|
|
122
|
+
Terminal 2 — web UI (port `8082`):
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
(cd frontend && bun run sdk) # after backend is up; regenerates OpenAPI hooks
|
|
126
|
+
(cd frontend && bun run web)
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Open `http://localhost:8082` and sign in as `test@example.com` / `testpassword123`.
|
|
130
|
+
|
|
131
|
+
`frontend/.env` defaults `EXPO_PUBLIC_API_URL` to `http://localhost:4000`. For production web builds, set it **before** export — see [Build for web](build-for-web.md).
|
|
132
|
+
|
|
133
|
+
## Deploy
|
|
134
|
+
|
|
135
|
+
Read the [deployment baseline](../explanation/deployment-baseline.md) first.
|
|
136
|
+
|
|
137
|
+
**Backend:** the root `Dockerfile` builds only `backend/` on `oven/bun`, listens on `PORT` (default `8080` in the image), binds `0.0.0.0`, and exposes `GET /health`. It does not copy Terreno monorepo packages.
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
docker build -t my-app-backend .
|
|
141
|
+
docker run --rm -p 8080:8080 \
|
|
142
|
+
-e MONGO_URI='mongodb+srv://...' \
|
|
143
|
+
-e BETTER_AUTH_SECRET='...' \
|
|
144
|
+
-e BETTER_AUTH_URL='https://api.example.com' \
|
|
145
|
+
my-app-backend
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Cloud Run concepts and commands: [Deploy backend to Cloud Run](deploy-backend-to-cloud-run.md). That guide targets Terreno's monorepo example; for a generated app, keep the root `Dockerfile`, port `8080`, and Better Auth variables shown here. The generated backend throws if `BETTER_AUTH_SECRET` is unset. `GET /users` list and read require an admin.
|
|
149
|
+
|
|
150
|
+
**Frontend:** [Build for web](build-for-web.md) — set `EXPO_PUBLIC_API_URL` at export time.
|
|
151
|
+
|
|
152
|
+
## Monorepo examples (secondary)
|
|
153
|
+
|
|
154
|
+
To explore Terreno itself without scaffolding a new app, clone the [Terreno monorepo](https://github.com/FlourishHealth/terreno) and use `example-backend` / `example-frontend`. See [Getting started](../tutorials/getting-started.md#explore-the-terreno-monorepo-examples).
|
|
@@ -106,6 +106,8 @@ Expect `"healthy": true`.
|
|
|
106
106
|
| Live feature flags / realtime never update; log mentions replica set | MongoDB is standalone, not a replica set | Use Atlas or `replSet` — change streams required (`feature-flags/src/featureFlagsApp.ts`) |
|
|
107
107
|
| Bun-compiled container never opens its port while creating indexes | OpenTelemetry Mongoose instrumentation patched an already-loaded Mongoose module | Do not explicitly patch Mongoose in the compiled binary; retain HTTP/Express tracing |
|
|
108
108
|
| Container hangs before listening when cloud logging initializes | A network logging transport blocks startup | Log to stdout/stderr during boot; Cloud Run ingests both streams |
|
|
109
|
+
| `gcloud run deploy --tag` fails citing an old revision that never became Ready | That tag still points at the failed revision; `--remove-tags` keeps it in the traffic spec | Rebuild traffic with `--to-revisions=<live>=100` plus `--set-tags` of Ready tags only, deploy `--no-traffic` without `--tag`, then `--update-tags` the new revision |
|
|
110
|
+
| A zero-traffic preview tag returns `503` with `{"status":"starting"}` indefinitely | The early TCP listener satisfies Cloud Run's startup probe before Mongo and seed work finish; request-only CPU then starves idle boot work | Deploy preview revisions with `--no-cpu-throttling`, then poll the tagged `/health` URL for `"healthy":true` before reporting deployment success |
|
|
109
111
|
| First request after idle is slow; sockets reconnect constantly | Scaled to zero | Set `--min-instances=1` for user-facing services |
|
|
110
112
|
| Browser API calls blocked by CORS | `corsOrigin` / Better Auth `trustedOrigins` missing web origin | Add your CDN URL to backend CORS and auth config |
|
|
111
113
|
|
|
@@ -33,8 +33,9 @@ PR deploy preview.
|
|
|
33
33
|
| `fingerprint-gate` | Master iOS/Android hashes cached per `pull_request.base.sha` (skips a second `bun run compile`) |
|
|
34
34
|
| `maestro-e2e` | Demo export + static server only when `demo/`, `ui/`, or `.maestro/flows/demo/` change |
|
|
35
35
|
| `example-backend-docker` | Buildx runs only when the image recipe changes (`Dockerfile`, lockfile, `package.json`). Source-only PRs skip; CD preview deploy still builds the image. `load: true` stays off. |
|
|
36
|
-
| `cd` backend preview | Runs the built container against the configured Secret Manager values and requires a healthy `/health` response before pushing or deploying. |
|
|
36
|
+
| `cd` backend preview | Runs for every example-frontend PR preview, including frontend-only changes, so the Netlify build targets an isolated `pr-<number>` backend instead of production. The frontend deploy waits for that backend's healthy `/health` response before publishing to Netlify, and per-PR concurrency cancels duplicate deploys to the same alias. CD runs the built container against the configured Secret Manager values, including the Cloud Tasks `JOBS_*` env, and requires a healthy `/health` response before pushing or deploying. Preview Cloud Run uses `--memory=1Gi` and `--cpu-boost`, overwrites revision secrets, and binds `PORT` before MongoDB connect. Before deploy it rebuilds traffic with `--set-tags` / `--clear-tags` so a not-Ready tagged revision is omitted (`--remove-tags` leaves that revision in the spec and Cloud Run rejects the update). It then deploys `--no-traffic` without `--tag`, sets `--revision-suffix=pr<n>-<run_id>-<run_attempt>`, and tags the new Ready revision afterward. |
|
|
37
37
|
| Bun install | `.github/actions/setup-bun-workspace` pins Bun `1.4.0` and caches `~/.bun/install/cache` without `github.ref` in the key |
|
|
38
38
|
|
|
39
|
-
Playwright e2e
|
|
40
|
-
`
|
|
39
|
+
Playwright e2e on CircleCI groups specs into five shards (`e2e-auth`,
|
|
40
|
+
`e2e-app`, `e2e-admin-core`, `e2e-admin-table`, `e2e-syncdb`). The retained GHA
|
|
41
|
+
twin still lists one spec per matrix entry for rollback.
|
|
@@ -52,20 +52,24 @@ PR.
|
|
|
52
52
|
|
|
53
53
|
## Unattended pickup
|
|
54
54
|
|
|
55
|
-
1. After triage, apply `status:ready-for-dev`
|
|
56
|
-
the
|
|
57
|
-
|
|
58
|
-
skill aborts if an untrusted author changes the body after the label.
|
|
55
|
+
1. After triage, apply `status:ready-for-dev` and leave the issue unassigned.
|
|
56
|
+
Do not edit the issue body after you label it unless you are a maintainer; pickup
|
|
57
|
+
aborts if an untrusted author changes the body after the label.
|
|
59
58
|
2. A Cursor Automation (or `/implement-ready-for-dev`) claims the oldest matching
|
|
60
59
|
issue: assignee + `status:in-progress`, remove `status:ready-for-dev`. It skips
|
|
61
60
|
issues that already have an open linked or closing PR (GraphQL references, not
|
|
62
61
|
`linked:<number>`).
|
|
63
|
-
3. It
|
|
64
|
-
|
|
62
|
+
3. It runs Grow on that trusted snapshot, answers Grow questions from the repo and
|
|
63
|
+
issue (assumptions posted on the issue), and only stops on GitHub for a genuine
|
|
64
|
+
human gate (product, security, data ownership, public API, destructive change,
|
|
65
|
+
rollout, or scope the issue and docs do not settle). Then Pick ⇄ Roast, Brew, and
|
|
66
|
+
Taste until the PR is mergeable (ready for review). Do not merge.
|
|
65
67
|
4. Dashboard paste: [`implement-ready-for-dev` automation](../../.rulesync/skills/implement-ready-for-dev/references/cursor-automation.md).
|
|
66
68
|
|
|
67
|
-
Do not apply `status:ready-for-dev` to issues that still need a product
|
|
68
|
-
Those stay `status:needs-info` or go through `/work-github-issues`.
|
|
69
|
+
Do not apply `status:ready-for-dev` to issues that still need a product, security, or
|
|
70
|
+
data-ownership decision. Those stay `status:needs-info` or go through `/work-github-issues`.
|
|
71
|
+
The unattended skill will assume implementation defaults; it will not invent those
|
|
72
|
+
decisions.
|
|
69
73
|
|
|
70
74
|
Labels live in [`.github/labels.yml`](https://github.com/FlourishHealth/terreno/blob/master/.github/labels.yml).
|
|
71
75
|
Sync them with the existing roadmap labels workflow before expecting pickup.
|