Repository navigation
SS4: supabase-starter becomes an Orun baseline - #5
Merged
Merged
Conversation
The repository is an Orun baseline on the Cloudflare + Supabase (Lumen) conventions, built the way cirrus-baseline v22 builds a product: ONE landing. 01-product places every module, brands it, links the repository, reconciles four brokered keys (workers-deploy, account-id, management-access, org-id) and lands it as one pull request, then awaits the convergence, WIRING_SUPABASE and Lumen's three database credentials on stage and prod, and / + /api/health; 02-docs restores the promotion gate and dev's lanes and renders the deployment record. No Hyperdrive and no db-migrate: the chain is supabase -> web, enforced on main, advisory on pull requests. The baseline: - blueprint.yaml (card: requires github, cloudflare, supabase; the two Supabase projects the free plan allows stated as a prerequisite) and repo-blueprint.yaml (two phases, one landing) - .baseline/ (identity, task contracts, the product's README), the rename engine with the SITE_NAME seam, the bootstrap helpers, the deployment-record hook, ai/context/, BOOTSTRAP.md, docs/phases/ - testing/: manifest, phases, coverage, rebrand, retouch, bootstrap-defer, leak, placement (offline bootstrap of both phases, the product's own push-to-main plan, --resume) and e2e (the 01-product landing under its checks, the stage web lane's steps in the job tree orun stages, wrangler dev against a local Supabase stand-in: Auth, the Data API's select and the SQL editor's query endpoint over a Postgres with Supabase's roles) - baseline.yml, tag.yml; checks.yml on pull requests only; ci.yml's linked gate and lanes on v2.78.4; stack-tectonic 0.19.0 The product: - the supabase root keeps Lumen's three outputs and publishes WIRING_SUPABASE (URL + publishable key); the service-role key is no longer read out; it sets the project's Auth Site URL and redirect allow-list to the Worker and turns email confirmation off until the project has SMTP (authEmailConfirmation), after waiting for ACTIVE_HEALTHY; provider lock file committed - web depends on supabase (enforced on main), reads its wiring as optional refs, re-renders the committed wrangler.jsonc in stage/prod, and next build inlines the URL and key from that config (next.config.ts) - /api/health (Supabase Auth reachable with the inlined key, sign-up and confirmation state), exempt from the session proxy; the smoke reads it - sign-up goes to /protected when it gets a session; the auth forms explain email_address_not_authorized, the email rate limit and an unreachable service - the tutorial's notes table: RLS on in the same statement, policies keyed on auth.uid() - packages/.gitkeep (orun refused the intent without the discovery root) Not verified: a Terraform apply (the brokered OAuth token's reach to the API-keys and Auth-config endpoints), a live deploy and bootstrap, real email delivery. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AuyckrXahuAVgdmxamUUtk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SS4 (task SS-5): the repository is an Orun baseline on the Cloudflare + Supabase (Lumen) conventions, built the way cirrus-baseline v22 builds a product, in one landing. The machinery is the saas-starter port's (sourceplane/saas-starter#6), with no Hyperdrive and no db-migrate.
What was added
The baseline
blueprint.yamlis the console card.requires: [github, cloudflare, supabase].CLOUDFLARE_API_TOKEN(workers-deploy),CLOUDFLARE_ACCOUNT_ID(account-id),SUPABASE_ACCESS_TOKEN(management-access) andSUPABASE_ORG_ID(org-id).01-product,02-docs.repo-blueprint.yaml:01-productplaces every module, then runs: retouch → git-init/stage → rebrand → orun-workspace → work-tree strip → promotion and dev-lanes deferred → restage → rebrand-verify → pnpm lockfile →orun.repo/ensure→ link → fourorun.integrations/reconcile→orun.pr/land.orun.run/watchon the merge sha.orun.secrets/existsforWIRING_SUPABASE,SUPABASE_PROJECT_REF,SUPABASE_DB_PASSWORDandSUPABASE_DB_URLon stage and prod.orun.http/probeon/and/api/healthfor both environments.02-docsruns hooks only: it restores promotion and dev's lanes, renders the deployment record, lands, and probes..baseline/holds the identity, the task contracts and the product's README.SITE_NAMEseam, and the upstream example's links are protected.tooling/bootstrap/*,hooks/render-deployment-docs.sh,ai/context/,BOOTSTRAP.mdanddocs/phases/.testing/holds the full suite,.github/workflows/baseline.ymlruns it, andtag.ymlcuts tags.checks.ymlnow runs on pull requests only.ci.ymlhas thelinkedgate, and its lanes run on v2.78.4.The product
WIRING_SUPABASE(the project URL and publishable key).SUPABASE_URL,SUPABASE_ANON_KEYor the service-role key.supabase_settings.authEmailConfirmation). This is because a fresh project emails only its organization's members.ACTIVE_HEALTHYbefore reading the keys and writing the settings.supabase: enforced on main, advisory on PRs.WIRING_SUPABASE_<ENV>as optional refs. While stage and prod deploy side by side, prod's document may not exist yet when stage's deploy starts.live.mjsstill refuses a deploy whose own environment's document is missing.wrangler.jsoncin stage and prod.next.config.tsmakesnext buildinline the URL and key from that same config./api/healthchecks that Supabase Auth answers the inlined key, and reports whether sign-up is open and whether it asks for confirmation. The proxy matcher exempts it. The smoke check, the probes and the deployment record all read it./protectedwhen it gets a session. The auth forms now explainemail_address_not_authorized, the email rate limit and an unreachable service, instead of failing with a 500.notestable gets row-level security in the same statement that creates it, with policies keyed onauth.uid().packages/.gitkeep: SS3's tree failedorun validatewithout that discovery root.How it was verified
pnpm install --frozen-lockfile,wire:fixture(no diff), typecheck, lint, test (25 tests in 7 files) and build all pass.testing/{manifest,phases,coverage,rebrand,retouch,bootstrap-defer,leak}.test.shall pass.placement.test.shpasses at orun v2.58.11 and at 2.79.0.supabase → webenforced. A pull request shows the edge advisory (checked at 2.79.0; at 2.58.11 it is reported as not checkable).WIRING_SUPABASE.TF_VARs are the product's.--resumeis a no-op.e2e.test.shpasses at the lane pin, v2.78.4:init -backend=falseand validate pass on the product's root.verify-app-structure,build-appwith the stage wiring inlined into the browser bundle,verify-build-outputanddeploy-dry-run.wrangler dev: the component's own smoke check, every route,/api/health, and/auth/confirmrefusing a bad link./auth/confirm. An address the project cannot email is refused withemail_address_not_authorized.anonreads none, and no one can write as someone else.orun new --statuspasses at v2.58.11, v2.78.4 and 2.79.0.orun validateandorun work checkare clean.Verified only offline:
testing/lib/fake-supabase-api.py): the Auth endpoints, the Data API'sselect *and the Management API query, over a local Postgres with Supabase's roles.@supabase/ssr, using the same cookies.Not verified:
🤖 Generated with Claude Code
https://claude.ai/code/session_01AuyckrXahuAVgdmxamUUtk
Generated by Claude Code