# A single .env at the ROOT of the monorepo — shared by all backend processes (client-api, admin-api, publisher).
# Loaded from @app/domain/db/dataSource by absolute path (the processes have different cwd).

# Environment. NODE_ENV=dev enables TypeORM schema auto-sync (synchronize) so tables are created on
# first run. Leave it OUT (or set to production) in production and use migrations instead.
NODE_ENV=dev

# client-api — the public process (the web app talks to it).
API_PORT=3300
# Allowed web frontend origins (comma-separated) — for CORS with credentials (cookie sessions).
WEB_ORIGINS=http://localhost:5173

# admin-api — the admin process (the admin frontend talks to it).
ADMIN_API_PORT=3301
# Allowed admin frontend origins (comma-separated) — for CORS with credentials (cookie sessions).
ADMIN_ORIGINS=http://localhost:5174

# Set the session cookie with the Secure flag (true only behind HTTPS; false for http-localhost).
COOKIE_SECURE=false

# Publisher — interval for checking scheduled publications, in ms.
PUBLISHER_PERIOD_MS=15000

# Postgres connection (DB_MAIN_ prefix)
DB_MAIN_HOST=127.0.0.1
DB_MAIN_PORT=5432
DB_MAIN_USERNAME=postgres
DB_MAIN_PASSWORD=postgres
DB_MAIN_DATABASE=app
