This document defines the expected configuration for development, staging, and production deployments.
Use the dedicated example templates in frontend/ and backend/ to bootstrap environment-specific config.
| Environment | Network | Soroban RPC | Contract ID | Frontend API URL | Backend CORS origins |
|---|---|---|---|---|---|
dev |
testnet | https://soroban-testnet.stellar.org |
NEXT_PUBLIC_CONTRACT_ID / CONTRACT_ID from local/testnet deployment |
http://localhost:3001 |
http://localhost:3000 |
staging |
testnet | https://soroban-testnet.stellar.org |
NEXT_PUBLIC_CONTRACT_ID / CONTRACT_ID from staging testnet deployment |
https://api-staging.splitnaira.com |
https://staging.splitnaira.com |
production |
mainnet | https://soroban-mainnet.stellar.org |
NEXT_PUBLIC_CONTRACT_ID / CONTRACT_ID from production mainnet deployment |
https://api.splitnaira.com |
https://app.splitnaira.com |
- Frontend
NEXT_PUBLIC_SOROBAN_RPC_URLmust point to the target network RPC.NEXT_PUBLIC_CONTRACT_IDmust match the deployed contract for that environment.NEXT_PUBLIC_API_BASE_URLmust point to the matching backend service.
- Backend
SOROBAN_RPC_URLmust point to the target network RPC.CONTRACT_IDmust match the deployed contract for that environment.CORS_ORIGINmust allow only the frontend host for that environment.
Use these templates to seed environment-specific configuration.
frontend/.env.staging.examplefrontend/.env.production.examplebackend/.env.staging.examplebackend/.env.production.example
Copy the relevant example file to your environment's active config or secret manager when deploying.
When the Soroban contract is upgraded, the only safe production switching mechanism is to point the frontend and backend at the new contract ID and redeploy the services.
- Deploy the new contract to the target network and record the new contract ID.
- Update the backend configuration value for
CONTRACT_ID. - Update the frontend configuration value for
NEXT_PUBLIC_CONTRACT_ID. - Redeploy the backend first, then the frontend.
- Verify the new contract ID with smoke tests before allowing production traffic.
Keep the previous stable
CONTRACT_IDvalues available in your deployment history or secrets manager so you can roll back quickly if needed.