This document is for operators of the Orivex-Backend service.
GET /healthon the Express app — returns 200 withstatus: okand the current ISO timestamp.GET /api-docs— Swagger UI; if unreachable, the schema compile (src/config/swagger.ts) may have errors.
- Check
STELLAR_NETWORKand theSTELLAR_SOURCE_SECRETsecret rotation. - Look at
src/services/stellar.service.tserror classes forPAYMENT_ERRORandTRANSACTION_TIMEOUT. - Replay affected withdrawals by replaying
prisma.transaction.where.status = pendingrows.
- The webhook endpoint is auto-deactivated after 10 consecutive failures —
see
src/services/webhook.service.ts::checkEndpointHealth. - To recover: re-activate the endpoint in admin UI / directly via Prisma,
then call
WebhookService.processQueue().
- The migration folder is
prisma/migrations/20260307143903_init. - Always run
pnpm prisma migrate statusbefore applying. - If a migration is in a broken state, prefer to create a forward fix
rather than rewriting history —
gitrewrites are off by policy.
- Production logs are emitted via
winston(src/config/logger.ts). - Request logs go through
morgan('dev')in development — disable in production by settingNODE_ENV=production.
Required at runtime:
| Env var | Notes |
|---|---|
DATABASE_URL |
Postgres connection string |
JWT_SECRET |
HS256 signing key |
STELLAR_NETWORK |
testnet or mainnet |
STELLAR_SOURCE_SECRET |
used for reward payouts |
SOROBAN_CONTRACT_ID |
for credential mint/verify calls |
FIREBASE_SERVICE_ACCOUNT_KEY |
JSON-encoded Firebase admin service account |
Rotate JWT_SECRET and STELLAR_SOURCE_SECRET quarterly.
- Engineering lead: see
package.json#author. - Security escalation:
security@orivex.io.