Skip to content

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.

  • 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”
Terminal window
shasum -a 256 ~/Downloads/fe-pack-b.zip
unzip -q -o ~/Downloads/fe-pack-b.zip -d ~/opleet-v2/packs
Terminal window
cd ~/opleet-v2/opleet
git switch main && git pull
git switch -c web/auth

3 · 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”
Terminal window
pnpm --filter web add -E @supabase/ssr@0.12.7 @supabase/supabase-js@2.117.2
pnpm --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”
Terminal window
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/.gitignore

5 · 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”
Terminal window
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.local
cat apps/web/.env.local
git check-ignore -v apps/web/.env.local
Terminal window
git add apps/web/package.json apps/web/.gitignore apps/web/.env.example pnpm-lock.yaml
git commit -m "build(web): add the Supabase client packages and env names"
  • 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.
Terminal window
git status --short
grep -E 'opleet/db-types|supabase' apps/web/package.json

Expect: 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".

  • 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.
Terminal window
git switch main
git branch -D web/auth
rm -f apps/web/.env.local
pnpm install

Nothing has been pushed.

Not run yet.