> ## Documentation Index
> Fetch the complete documentation index at: https://wlumsa.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Environment variables

> All environment variables used by wlumsa.org, grouped by service

Copy `.env.example` to `.env` and fill in values for your environment. Never commit credentials to source control.

<Note>
  Stripe and analytics variables are only needed if you are working on those features. The app runs without them.
</Note>

## App core

| Variable                 | Description                                                     | Required |
| ------------------------ | --------------------------------------------------------------- | -------- |
| `DATABASE_URI`           | PostgreSQL connection string for the Supabase database          | Required |
| `PAYLOAD_SECRET`         | Secret key used by Payload CMS to sign tokens and encrypt data  | Required |
| `NEXT_PUBLIC_SERVER_URL` | Public-facing URL of the app (used for API calls and redirects) | Optional |

## Supabase

| Variable                        | Description                                                            | Required |
| ------------------------------- | ---------------------------------------------------------------------- | -------- |
| `NEXT_PUBLIC_SUPABASE_URL`      | Your Supabase project URL                                              | Required |
| `NEXT_PUBLIC_SUPABASE_ANON_KEY` | Supabase anonymous (public) key                                        | Required |
| `S3_BUCKET`                     | Name of the S3-compatible storage bucket (Supabase Storage)            | Required |
| `S3_ACCESS_KEY_ID`              | Access key ID for Supabase S3 storage                                  | Required |
| `S3_SECRET_ACCESS_KEY`          | Secret access key for Supabase S3 storage                              | Required |
| `S3_REGION`                     | Region for the S3 storage bucket                                       | Required |
| `S3_ENDPOINT`                   | Endpoint URL for the S3-compatible storage service                     | Required |
| `NEXT_PUBLIC_S3_BUCKET`         | Public bucket name used on the client side for constructing media URLs | Required |

## Resend

| Variable         | Description                                           | Required |
| ---------------- | ----------------------------------------------------- | -------- |
| `RESEND_API_KEY` | API key for Resend, used to send transactional emails | Required |

## Stripe

<Note>
  Only needed if you are working on payment or event registration features. Stripe is optional and the app functions without it.
</Note>

| Variable                          | Description                                                          | Required |
| --------------------------------- | -------------------------------------------------------------------- | -------- |
| `STRIPE_SECRET_KEY`               | Stripe secret key. Prefix `sk_test_` indicates test mode             | Optional |
| `STRIPE_WEBHOOKS_ENDPOINT_SECRET` | Stripe webhook signing secret for validating incoming webhook events | Optional |

## Analytics

<Note>
  PostHog and Google Analytics are both optional. Neither is required for local development or core functionality.
</Note>

| Variable                     | Description                                       | Required |
| ---------------------------- | ------------------------------------------------- | -------- |
| `NEXT_PUBLIC_POSTHOG_KEY`    | PostHog project API key                           | Optional |
| `NEXT_PUBLIC_POSTHOG_HOST`   | PostHog host URL (defaults to `us.i.posthog.com`) | Optional |
| `NEXT_PUBLIC_MEASUREMENT_ID` | Google Analytics measurement ID                   | Optional |

## Legacy (unused)

These variables are still present in the env schema but are no longer used. The project migrated from Clerk to Supabase Auth.

| Variable                              | Description                 |
| ------------------------------------- | --------------------------- |
| `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY`   | Old Clerk publishable key   |
| `NEXT_PUBLIC_CLERK_SIGN_IN_URL`       | Clerk sign-in redirect URL  |
| `NEXT_PUBLIC_CLERK_SIGN_UP_URL`       | Clerk sign-up redirect URL  |
| `NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL` | Clerk post-sign-in redirect |
| `NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL` | Clerk post-sign-up redirect |
