Skip to content

Environment variables ​

The server validates its environment with zod at startup (src/config/env.js) and exits with a list of problems if anything is invalid. Empty values are treated as unset.

Server ​

Core ​

VariableDefaultDescription
NODE_ENVdevelopmentdevelopment, test or production
PORT4000HTTP port
CLIENT_URLhttp://localhost:5173Comma-separated allowed origins for CORS and sockets. The first is used for email links.
PUBLIC_API_URLhttp://localhost:4000Base URL used for locally stored upload URLs
DATABASE_URL—Required. PostgreSQL connection string
LOG_LEVELinfo (error in test)debug, info, warn, error

Auth and crypto ​

VariableDefaultDescription
JWT_SECRET—Required. At least 32 characters
JWT_EXPIRES_IN7dSession lifetime
ENCRYPTION_KEY—Required. 64 hex characters (32 bytes). Encrypts wallet secrets and keys ID fingerprints.

Never rotate ENCRYPTION_KEY casually

Every stored wallet secret is encrypted with it. Changing the key without re-encrypting makes every custodial wallet unusable.

Stellar ​

VariableDefaultDescription
STELLAR_NETWORKtestnettestnet or public
HORIZON_URLhttps://horizon-testnet.stellar.orgHorizon endpoint matching the network
PLATFORM_SECRET_KEY—Required. Secret seed of the escrow co-signer. It doesn't need a funded account.

Trading rules ​

VariableDefaultDescription
TRADE_PAYMENT_WINDOW_MINUTES15Time buyers have to pay
ORDER_TTL_MINUTES30Order lifetime
MIN_TRADE_XLM10Minimum order size
MAX_TRADE_XLM100000Maximum order size
REQUIRE_KYCtrueRequire VERIFIED KYC to post orders and open trades

Email ​

VariableDefaultDescription
SMTP_HOST—When unset, emails are logged instead of sent
SMTP_PORT587465 enables TLS
SMTP_USER / SMTP_PASS—Credentials
MAIL_FROMNexlm <no-reply@nexlm.app>Sender

Integrations ​

VariableDefaultDescription
CLOUDINARY_URL—When unset, uploads are written to server/uploads
SMILE_PARTNER_ID / SMILE_API_KEY—When unset, KYC goes to manual review
SMILE_ENVsandboxsandbox or production

Seed script ​

VariableDescription
ADMIN_EMAIL, ADMIN_PASSWORDRequired by npm run db:seed
ADMIN_DISPLAY_NAMEOptional, defaults to nexlm_admin

Client ​

VariableDefaultDescription
VITE_API_URLemptyAPI origin in production. Leave empty in development to use the Vite proxy.
VITE_DEV_API_TARGEThttp://localhost:4000Proxy target for npm run dev

Nexlm is a peer-to-peer facilitator and never holds customer Naira.