Configuration is component-specific. Use the repository’s current .env.example files as the authoritative variable inventory, and do not commit secrets.

Each component has its own .env.example. Copy the relevant file to .env for local development; use the checked-in examples as the authoritative list of currently supported settings. Do not commit actual credentials.

Do not copy production credentials into a frontend VITE_ variable: Vite exposes those values to the browser.

Frontend (frontend/course-browser/.env)#

VariablePurpose
VITE_GCS_BUCKETBase URL for hosted course datasets; the example points to the test bucket.
VITE_BACKEND_URLBackend API base URL (example: http://localhost:3000).
VITE_FRONTEND_URLFrontend origin (example: https://localhost:5173).
VITE_FILTERS_APIFilters API base URL (example: http://127.0.0.1:8000).
VITE_WRAPPER_APISISU wrapper base URL (example: http://127.0.0.1:8001).
VITE_ENVIRONMENTEnvironment label used by the frontend.
VITE_DEBUG_PANELS, VITE_DEBUG_AUTH, VITE_DEBUG_COURSE_INDEX, VITE_DEBUG_STUDY_GROUP_STORE, VITE_DEBUG_PLAN_STORE, VITE_DEBUG_BLOCK_STORE, VITE_DEBUG_PERIOD_TIMELINE_STOREDevelopment/debug controls.

VITE_* values are exposed to browser code: never put secrets in them. The old VITE_API_URL setting is not the setting used by the current frontend service clients.

Backend (backend/.env)#

The backend uses PostgreSQL (pg and Drizzle) and Better Auth. It does not require Supabase project credentials for the main application runtime.

VariablePurpose
PORTBackend listening port (example: 3000).
FRONTEND_URLFrontend origin for callbacks/links.
BACKEND_URLBackend origin.
BETTER_AUTH_URLAuth base URL, as configured for the deployment.
BETTER_AUTH_SECRETSecret used by Better Auth; replace the example before real deployment.
DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASSWORDPostgreSQL connection details.
DATABASE_URLPostgreSQL connection URI, also used by the Drizzle tooling.
CORS_ORIGINSAllowed cross-origin request origins.
SISU_WRAPPER_BASE_URLWrapper service base URL.
RESEND_API_KEYOptional for local development: missing/invalid key causes magic-link output in backend logs.
ADMIN_USERNAME, ADMIN_PASSWORDCredentials for the separate admin-token login mechanism.

Use the database credentials supplied by the local Compose configuration. npm run db:push is the current development schema command; migrations are separately supported via npm run db:migrate.

Filters API (filters-api/.env)#

VariablePurpose
GCS_BUCKET_NAMEBucket for saved filter configurations.
CORS_ORIGINSOrigins accepted by the API.

SISU wrapper (sisu-wrapper/.env)#

VariablePurpose
AALTO_COURSE_API_KEYAPI credential for upstream course-data requests when needed.
CORS_ORIGINSAllowed frontend origins.

Pipeline and test-only credentials#

The course-update workflow uses the GitHub Actions secret AALTO_USER_KEY. Do not confuse this workflow secret with the wrapper’s local AALTO_COURSE_API_KEY. See Data Pipeline.

Legacy RLS tests: backend/tests/rls.setup.ts still uses Supabase clients and reads SUPABASE_URL, SUPABASE_PUBLISHABLE_KEY, and SERVICE_ROLE_KEY. These are test-harness credentials, not backend runtime requirements; see Row-Level Security. The tests’ ability to run against the current PostgreSQL/Better Auth development environment has not been established by this documentation audit.

Local setup#

make setup
# Then inspect and customize the relevant service .env files.

make setup copies .env.example to .env for each service. Do not assume sample passwords, secrets, or URLs are production-safe. Keep .env files out of version control and rotate exposed secrets promptly.

See Running Sisukas Locally and Makefile Reference.

Last updated: