# Journal local-dev environment.
# Copy to `.env` (gitignored) and edit. Most contributors don't need
# anything in this file — the journal app boots on plain HTTP at
# http://localhost:3000 with sensible defaults.

# ────────────────────────────────────────────────────────────────────
# DO NOT SET unless you know you need it
# ────────────────────────────────────────────────────────────────────
#
# `ORIGIN` is what the WebAuthn ceremony uses as `expectedOrigin`.
# When unset it defaults to `http://localhost:3000`, which is what
# Playwright sends and what the browser sees in plain-HTTP dev.
#
# The ONLY reason to set this is if you're running the dev server
# over HTTPS (see HTTPS=1 below) and want passkey registration to
# succeed against the HTTPS origin. If you set it to `https://...`
# without also running the server over HTTPS, you'll get
# "Unexpected registration response origin" errors in dev and the
# local e2e suite (which always hits HTTP) will fail registration.
#
# ORIGIN=https://localhost:3000

# Flagship marker. Renders the project marketing block on the
# anonymous home and gates a few "this is the canonical instance"
# behaviors. Self-hosted instances leave this unset; flagship CI
# sets it to `true`. Either is fine for local dev — set it if you
# want to see the full marketing layout, leave it unset if you
# want the self-host home view.
# IS_FLAGSHIP=true

# ────────────────────────────────────────────────────────────────────
# Wahoo OAuth (only needed when actively testing the Wahoo import)
# ────────────────────────────────────────────────────────────────────
#
# Wahoo's OAuth flow is the one feature that genuinely needs HTTPS
# locally: the provider rejects `http://` redirect URIs. To exercise
# the connect/disconnect/import flow end-to-end, you need:
#
#   1. Local HTTPS dev server: run `HTTPS=1 pnpm --filter
#      @trails-cool/journal dev` (the basic-ssl plugin in
#      vite.config.ts wires up the cert; see the comment there for
#      the ALPN workaround).
#   2. ORIGIN=https://localhost:3000 (uncomment above).
#   3. Wahoo client credentials below, and a redirect URI of
#      `https://localhost:3000/api/sync/callback/wahoo` registered
#      in your Wahoo developer dashboard.
#
# WAHOO_CLIENT_ID=
# WAHOO_CLIENT_SECRET=
# WAHOO_WEBHOOK_TOKEN=

# Integration test secret (only needed if running the integration
# test suite that drives the API directly). Generate with
# `openssl rand -hex 32`.
# INTEGRATION_SECRET=
