General
- We use
dotenvxto load environment variables. - Hyprnote team uses infisical to manage them.
AGENTS.md
| 1 | # REPO="SOMEWHERE" ($HOME/repos/hyprnote inside Devin) |
| 2 | infisical export \ |
| 3 | --env=dev \ |
| 4 | --secret-overriding=false \ |
| 5 | --format=dotenv \ |
| 6 | --output-file="$REPO/apps/web/.env" \ |
| 7 | --projectId=87dad7b5-72a6-4791-9228-b3b86b169db1 \ |
| 8 | --path="/web" |
Stripe
task stripe will generate .env.stripe at the root with the following environment variables:
STRIPE_WEBHOOK_SECRET="whsec_..."
See apps/web/package.json to see how .env.stripe is used.
Supabase
task supabase-start will generate .env.supabase at the root with the following environment variables:
SUPABASE_URL="http://127.0.0.1:54321"
VITE_SUPABASE_URL="http://127.0.0.1:54321"
SUPABASE_GRAPHQL_URL="http://127.0.0.1:54321/graphql/v1"
VITE_SUPABASE_GRAPHQL_URL="http://127.0.0.1:54321/graphql/v1"
SUPABASE_STORAGE_URL="http://127.0.0.1:54321/storage/v1/s3"
VITE_SUPABASE_STORAGE_URL="http://127.0.0.1:54321/storage/v1/s3"
DATABASE_URL="postgresql://postgres:postgres@127.0.0.1:54322/postgres"
SUPABASE_STUDIO_URL="http://127.0.0.1:54323"
SUPABASE_ANON_KEY="sb_publishable_ACJWlzQHlZjBrEguHvfOxg_3BJgxAaH"
VITE_SUPABASE_ANON_KEY="sb_publishable_ACJWlzQHlZjBrEguHvfOxg_3BJgxAaH"
SUPABASE_SERVICE_ROLE_KEY="sb_secret_N7UND0UgjKTVK-Uodkm0Hg_xSvEMPvz"
S3_ACCESS_KEY="625729a08b95bf1b7ff351a663f3a23c"
S3_SECRET_KEY="850181e4652dd023b7a98c58ae0d2d34bd487ee0cc3254aed6eda37307425907"
S3_REGION="local"
See apps/web/package.json and apps/restate/package.json to see how .env.supabase is used.
AI Server (apps/api)
The AI server uses the envy crate for structured environment configuration. Create a .env file in apps/api/ with:
PORT=3001 # default: 3001
SENTRY_DSN="" # optional
POSTHOG_API_KEY="" # optional
SUPABASE_URL="http://127.0.0.1:54321"
SUPABASE_ANON_KEY="sb_publishable_..." # required
NANGO_API_KEY="" # required for calendar integration
NANGO_API_BASE="" # optional (defaults to Nango cloud)
STRIPE_SECRET_KEY="sk_..." # required for subscription
STRIPE_MONTHLY_PRICE_ID="" # required for subscription
STRIPE_YEARLY_PRICE_ID="" # required for subscription
OPENROUTER_API_KEY="sk-or-..." # required for LLM proxy
DEEPGRAM_API_KEY="" # optional STT provider
ASSEMBLYAI_API_KEY="" # optional STT provider
SONIOX_API_KEY="" # optional STT provider
FIREWORKS_API_KEY="" # optional STT provider
OPENAI_API_KEY="" # optional STT provider
GLADIA_API_KEY="" # optional STT provider
ELEVENLABS_API_KEY="" # optional STT provider
At least one STT provider API key is required for transcription to work. The Nango and Stripe variables are required when running the calendar and subscription APIs that were consolidated into the AI server.
Stripe Webhook Service (apps/stripe)
The Stripe webhook service runs on Bun and requires:
PORT=8788 # default: 8788
NODE_ENV="development" # development | test | production
DATABASE_URL="postgresql://..."
SUPABASE_URL="http://127.0.0.1:54321"
SUPABASE_SERVICE_ROLE_KEY="sb_secret_..."
STRIPE_SECRET_KEY="sk_..."
STRIPE_WEBHOOK_SECRET="whsec_..."