mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 09:42:53 +00:00
177 lines
5.4 KiB
Plaintext
177 lines
5.4 KiB
Plaintext
# App
|
|
NODE_ENV=development
|
|
PORT=4000
|
|
|
|
# Database (Prisma) — owns the `passenger` schema in edr_database
|
|
DATABASE_URL=postgresql://edr:edr_secret@localhost:5432/edr_database?schema=passenger
|
|
|
|
# Database (TypeORM / @tria-plc IAM) — shared `iam` schema in the SAME edr_database.
|
|
# These mirror the connection vars read by @tria-plc/api-common's TypeORM DataSource.
|
|
DATABASE_HOST=localhost
|
|
DATABASE_PORT=5432
|
|
DATABASE_NAME=edr_database
|
|
DATABASE_USER=edr
|
|
DATABASE_PASSWORD=edr_secret
|
|
DATABASE_SCHEMA=iam
|
|
|
|
# RabbitMQ — the @tria-plc IAM/notification modules register RMQ clients (SMS/notifications).
|
|
# Connects lazily; a broker is only needed when those features actually send. Placeholder for dev.
|
|
RABBITMQ_URL=amqp://localhost:5672
|
|
|
|
# MinIO — the @tria-plc file/notification modules construct a MinIO client at boot (validates these).
|
|
# Placeholders for dev; only contacted when file upload/download features are actually used.
|
|
MINIO_ENDPOINT=localhost
|
|
MINIO_PORT=9000
|
|
MINIO_USE_SSL=false
|
|
MINIO_ACCESS_KEY=minioadmin
|
|
MINIO_SECRET_KEY=minioadmin
|
|
MINIO_BUCKET=edr-dev
|
|
|
|
# CORS
|
|
FRONTEND_URL=http://localhost:5174
|
|
BACK_OFFICE_URL=http://localhost:5184
|
|
|
|
# JWT (legacy passenger auth — being replaced by IAM)
|
|
JWT_SECRET=edr-platform-secret-change-in-production
|
|
JWT_EXPIRES_IN=7d
|
|
|
|
# @tria-plc IAM token contract — the package's JwtGuard/verifyToken + AuthService sign/verify with
|
|
# these. MUST match the IAM issuer's secret in shared deployments. (Expiry strings use jsonwebtoken/ms.)
|
|
JWT_ACCESS_TOKEN_SECRET=dev-iam-access-secret-change-me
|
|
JWT_ACCESS_TOKEN_EXPIRES=1h
|
|
JWT_REFRESH_TOKEN_SECRET=dev-iam-refresh-secret-change-me
|
|
JWT_REFRESH_TOKEN_EXPIRES=7d
|
|
|
|
# SendGrid
|
|
SENDGRID_API_KEY=
|
|
SENDGRID_FROM_EMAIL=noreply@edr-platform.com
|
|
|
|
# SMS Configuration
|
|
SMS_PROVIDER=twilio
|
|
SMS_API_KEY=
|
|
|
|
# Twilio (if SMS_PROVIDER=twilio)
|
|
TWILIO_ACCOUNT_SID=
|
|
TWILIO_AUTH_TOKEN=
|
|
TWILIO_FROM_NUMBER=
|
|
|
|
# Africa's Talking (if SMS_PROVIDER=africastalking)
|
|
AFRICASTALKING_USERNAME=
|
|
AFRICASTALKING_FROM=
|
|
|
|
# Telebirr
|
|
TELEBIRR_BASE_URL=
|
|
TELEBIRR_WEB_BASE_URL=
|
|
TELEBIRR_FABRIC_APP_ID=
|
|
TELEBIRR_APP_SECRET=
|
|
TELEBIRR_MERCHANT_APP_ID=
|
|
TELEBIRR_MERCHANT_CODE=
|
|
TELEBIRR_NOTIFY_URL=
|
|
TELEBIRR_RETURN_URL=
|
|
TELEBIRR_TIMEOUT_EXPRESS=15m
|
|
TELEBIRR_PRIVATE_KEY=
|
|
TELEBIRR_PUBLIC_KEY=
|
|
TELEBIRR_INSECURE_TLS=false
|
|
|
|
# CBE Birr
|
|
CBE_BASE_URL=
|
|
CBE_MERCHANT_ID=
|
|
CBE_SECRET_KEY=
|
|
CBE_NOTIFY_URL=
|
|
CBE_RETURN_URL=
|
|
|
|
# eBirr
|
|
EBIRR_BASE_URL=
|
|
EBIRR_MERCHANT_CODE=
|
|
EBIRR_SECRET_KEY=
|
|
EBIRR_NOTIFY_URL=
|
|
EBIRR_RETURN_URL=
|
|
|
|
# Card Gateway (Stripe-like)
|
|
CARD_BASE_URL=
|
|
CARD_API_KEY=
|
|
CARD_WEBHOOK_SECRET=
|
|
CARD_WEBHOOK_URL=
|
|
CARD_RETURN_URL=
|
|
|
|
# Waafi (Djibouti Mobile Money — Hosted Payment Page)
|
|
# Sandbox: https://sandbox.waafipay.net | Production: https://api.waafipay.net
|
|
WAAFI_BASE_URL=https://sandbox.waafipay.net
|
|
WAAFI_MERCHANT_UID=
|
|
WAAFI_STORE_ID=
|
|
WAAFI_HPP_KEY=
|
|
# HMAC secret returned once by WEBHOOK_REGISTER — verifies inbound webhooks
|
|
WAAFI_WEBHOOK_SECRET=
|
|
WAAFI_PAYMENT_METHOD=MWALLET_ACCOUNT
|
|
# Waafi has no ETB; overrides booking currency (USD/DJF/SLSH)
|
|
WAAFI_CURRENCY=DJF
|
|
WAAFI_HPP_SUCCESS_URL=
|
|
WAAFI_HPP_FAILURE_URL=
|
|
# 1 = POST, 2 = GET, 4 = Result Token
|
|
WAAFI_HPP_RESP_FORMAT=1
|
|
# Registered webhook URL (registration done out-of-band)
|
|
WAAFI_NOTIFY_URL=
|
|
# DEV ONLY — disable TLS cert verification (sandbox serves a *.waafi.com cert). Never true in prod.
|
|
WAAFI_INSECURE_TLS=false
|
|
|
|
# Payment Configuration
|
|
PAYMENT_PROVIDERS_ENABLED=TELEBIRR,CBE_BIRR,EBIRR,CARD,WALLET,WAAFI
|
|
|
|
# Browser return targets after a hosted payment page (UX only — payment is confirmed by the
|
|
# webhook/queryStatus, never this redirect). Global fallback used when a method-specific URL
|
|
# below is unset. Most providers use a single redirect; Waafi takes separate success/failure.
|
|
PAYMENT_RETURN_URL=
|
|
PAYMENT_FAILURE_URL=
|
|
TELEBIRR_RETURN_URL=
|
|
WAAFI_SUCCESS_REDIRECT=
|
|
WAAFI_FAIL_REDIRECT=
|
|
DMONEY_RETURN_URL=
|
|
CBE_RETURN_URL=
|
|
EBIRR_RETURN_URL=
|
|
CARD_RETURN_URL=
|
|
|
|
# Session Configuration
|
|
SESSION_INACTIVITY_MINUTES=30
|
|
|
|
# i18n Configuration
|
|
DEFAULT_LOCALE=en
|
|
SUPPORTED_LOCALES=en,am,fr,om
|
|
|
|
# Corporate IAM Configuration (for back-office authentication)
|
|
IAM_ENABLED=false
|
|
IAM_API_URL=https://iam.tria-plc.com/api
|
|
IAM_API_KEY=
|
|
|
|
# --- VeriFayda 2.0 (eSignet) OIDC integration ---
|
|
FAYDA_ENABLED=true
|
|
FAYDA_CLIENT_ID=
|
|
FAYDA_AUTHORIZATION_ENDPOINT=
|
|
FAYDA_TOKEN_ENDPOINT=
|
|
FAYDA_USERINFO_ENDPOINT=
|
|
# Base64 of the RSA private JWK (JSON). Secret — never commit a real value.
|
|
FAYDA_PRIVATE_KEY_BASE64=
|
|
FAYDA_REDIRECT_URI=
|
|
# Optional (defaults shown)
|
|
FAYDA_SCOPE=openid profile email
|
|
FAYDA_ACR_VALUES=mosip:idp:acr:generated-code
|
|
FAYDA_CLAIMS_LOCALES=en am
|
|
FAYDA_SESSION_TTL_MINUTES=10
|
|
|
|
GITHUB_PACKAGE_TOKEN=
|
|
|
|
# --- Notification broker (RabbitMQ) -----------------------------------------------------------------
|
|
# Set RABBITMQ_ENABLED=false to skip connection entirely (dev without a local broker).
|
|
RABBITMQ_ENABLED=false
|
|
RABBITMQ_URL=amqp://localhost:5672
|
|
EMAIL_QUEUE=email_queue
|
|
SMS_QUEUE=sms_queue
|
|
|
|
# --- Payment event consumer (RabbitMQ) -------------------------------------------------------
|
|
# Consumes payment.succeeded / payment.failed events from the payment microservice. Separate
|
|
# from any RABBITMQ_URL used by the IAM/notification modules so the two connections are
|
|
# independent. Points at the dedicated `payment` vhost on the (shared) broker.
|
|
# Local dev broker (docker): amqp://edr:edr_secret@localhost:5672/payment
|
|
PAYMENT_RABBITMQ_URL=amqp://edr:edr_secret@localhost:5672/payment
|
|
# Max unacknowledged payment events this consumer holds at once.
|
|
PAYMENT_EVENTS_PREFETCH=10
|