FE-M0-06 · Supabase packages and the env variables
ID FE-M0-06 · Level L0 · Run order row 25
apps/web depends on the Supabase client packages and @opleet/db-types, commits the names of its env variables in .env.example, and has a git-ignored .env.local for the local stack.
Before
Section titled “Before”- Timeline rows 18 and 22 are Done: BE pack A (the local signing key) and BE pack E (the generated types and the E2E logins). Pack A of this tab is merged.
- The local stack is running: pnpm supabase status prints the local URLs.
- fe-pack-b.zip, sent in the FE chat on 2026-10-05, is in ~/Downloads.
1 · Check the zip, then unzip it next to the repository
Section titled “1 · Check the zip, then unzip it next to the repository”shasum -a 256 ~/Downloads/fe-pack-b.zipunzip -q -o ~/Downloads/fe-pack-b.zip -d ~/opleet-v2/packs2 · A branch for pack B
Section titled “2 · A branch for pack B”cd ~/opleet-v2/opleetgit switch main && git pullgit switch -c web/auth3 · The Supabase client packages, pinned, and the generated types from the workspace
Section titled “3 · The Supabase client packages, pinned, and the generated types from the workspace”pnpm --filter web add -E @supabase/ssr@0.12.7 @supabase/supabase-js@2.117.2pnpm --filter web add "@opleet/db-types@workspace:*"4 · The variable names apps/web needs, committed as .env.example. apps/web/.gitignore ignores every .env file, so it gets one exception
Section titled “4 · The variable names apps/web needs, committed as .env.example. apps/web/.gitignore ignores every .env file, so it gets one exception”cp -R ~/opleet-v2/packs/fe-pack-b/FE-M0-06/. .printf '\n# The names apps/web needs are committed; the values stay in .env.local\n!.env.example\n' >> apps/web/.gitignore5 · The local values, read from the running stack. The local keys are the same on every machine and aren't secrets
Section titled “5 · The local values, read from the running stack. The local keys are the same on every machine and aren't secrets”eval "$(pnpm supabase status -o env)"printf 'NEXT_PUBLIC_SUPABASE_URL=%s\nNEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=%s\n' "$API_URL" "$PUBLISHABLE_KEY" > apps/web/.env.localcat apps/web/.env.localgit check-ignore -v apps/web/.env.local6 · Commit
Section titled “6 · Commit”git add apps/web/package.json apps/web/.gitignore apps/web/.env.example pnpm-lock.yamlgit commit -m "build(web): add the Supabase client packages and env names"Expect
Section titled “Expect”- Block 1: 322bc5739498f9ea114c2e771852999fc775bfe6a44b4b799c1464a43ed046a7.
- Block 3: “Packages: +10”, then “Done”; the second command prints “Already up to date”, because @opleet/db-types is already in the workspace.
- Block 5: NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321 and a key that starts with sb_publishable_; check-ignore names apps/web/.gitignore and the .env* line.
- Block 6: the commit line with 4 files changed.
git status --shortgrep -E 'opleet/db-types|supabase' apps/web/package.jsonExpect: Nothing from git status, so .env.local stays out of git; then "@opleet/db-types": "workspace:*", "@supabase/ssr": "0.12.7" and "@supabase/supabase-js": "2.117.2".
If it fails
Section titled “If it fails”- The key in block 5 starts with sb_secret_ or is empty: stop, don't commit, and paste the output of pnpm supabase status -o env | cut -d= -f1, which shows only the names.
- check-ignore prints nothing: stop. .env.local would be committed; paste the output of tail -5 apps/web/.gitignore.
git switch maingit branch -D web/authrm -f apps/web/.env.localpnpm installNothing has been pushed.
Not run yet.