Files
loki/scripts/site-template/.env.example
CatoandClaude c83c8f473e feat(starter): kickoff and new-site.sh both produce the fleet starter (#1138)
scripts/site-template is now bitbaum/fleet templates/app — Next.js 16,
better-auth accounts (password, link, passkey, 2FA, OrangeCat/bitbaum sign-in
as env-gated OIDC), en/de/fr, nonce CSP, ai-kit/mail-kit/limitkit/bip-kit,
tests and CI — copied at a pinned fleet commit by
scripts/templates/sync-starter.sh. CI proves the copy is exact
(sync-starter.sh --check), and starter-sync.yml opens the PR when fleet's
starter moves. Never edited here.

The kickoff's "nextjs-tailwind" starter seeds the same app from
src/lib/starter-app.generated.ts (generated from the directory, pinned by
scripts/test/starter-app.ts), minus the workflows register-site.sh adds with
the site's CD. The repo is seeded in one Trees API call with inline contents
instead of a blob POST per file (~85 for this starter). The widget token rides
in .env.production; the starter's .gitleaks.toml allows NEXT_PUBLIC_* values.
The new-from-scratch picker reads the light template list, so the starter's
file bodies never reach a client bundle.

Both paths give the site its database and auth/seal secrets ON THE BOX
(scripts/hetzner/provision-db-on-box.sh: role + database, ~/.db-credentials,
/opt/<slug>/shared/.env; existing secrets never replaced; nothing printed), and
record the db in the register row so every deploy applies drizzle/.
register-site.sh seeds the starter's full workflow set to starter repos and
the golden CI floor to anything else, never overwriting another repo's ci.yml.

test-site-template.sh follows the starter (verify SSOT, design tokens instead
of a local palette) and its comment stripper is fixed: the sed range deleted
the page from the doc comment to EOF, so every day-zero check had been passing
against an empty string. check-template-contrast.mjs and the starter-lock
generator are retired with the files they checked.


Claude-Session: https://claude.ai/code/session_01W7K2Gm5wcbfCi7THtmV1Hy

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-11 13:39:14 -07:00

52 lines
2.7 KiB
Bash

# Every variable this app reads, with what it is for. Real values live in the
# box env (/opt/__SLUG__/shared/.env) — never in git. Leaving an optional one
# empty switches its feature OFF and hides it; it never breaks a page.
# ── Required in production ─────────────────────────────────────────────────
# Postgres for accounts and everything else. /api/health is red without it.
DATABASE_URL=
# Signs sessions and encrypts 2FA secrets. 32+ random characters:
# openssl rand -base64 48
BETTER_AUTH_SECRET=
# The public origin. Defaults to https://__HOST__.
NEXT_PUBLIC_APP_URL=
# ── Secrets at rest ────────────────────────────────────────────────────────
# Seals people's own model keys (ai-kit seal, AES-256-GCM). 32+ characters.
# Without it, "Your own model" says it is not switched on.
SECRET_SEAL_KEY=
# ── Mail (@bitbaum/mail-kit) ───────────────────────────────────────────────
# With both set: email verification is required and sign-in links work.
# Without: password sign-up signs in directly and the link option is hidden.
RESEND_API_KEY=
RESEND_FROM=
# ── Sign in with the shared bitbaum sign-in (Google, Apple, GitHub, X, Meta) ─
# All three, or the button stays hidden. OIDC, client_secret_post + PKCE.
SIGNIN_ISSUER=
SIGNIN_CLIENT_ID=
SIGNIN_CLIENT_SECRET=
# ── Sign in with OrangeCat ─────────────────────────────────────────────────
# Both, or the button stays hidden. Register the client in orangecat's
# scripts/oauth/register-client.ts. Issuer defaults to https://orangecat.ch.
ORANGECAT_OAUTH_CLIENT_ID=
ORANGECAT_OAUTH_CLIENT_SECRET=
ORANGECAT_OAUTH_ISSUER=
# ── The shared free model chain (@bitbaum/ai-kit) ──────────────────────────
# Any one switches the example model route on. APP_MODEL optionally picks
# where in the chain to start; it is never a pin.
GROQ_API_KEY=
GEMINI_API_KEY=
OPENROUTER_API_KEY=
APP_MODEL=
# ── Loki ───────────────────────────────────────────────────────────────────
# Written by Loki when the site is scaffolded. The widget lets the owner point
# at the page and ask for a change.
NEXT_PUBLIC_FC_WIDGET_TOKEN=
NEXT_PUBLIC_FC_PROJECT_ID=
NEXT_PUBLIC_OC_PROJECT_ID=