Environments
SpaceOS provides separate environments for development, testing, and production.
Environment Comparison
| Aspect | Sandbox | Production |
|---|---|---|
| Base URL | https://sandbox-api.zenspace.io | https://api-spaceos.zenspace.io |
| Data | Test data, can be reset | Real customer data |
| Payments | Stripe test mode | Stripe live mode |
| Devices | Simulated adapters | Real IoT devices |
| Webhooks | Full functionality | Full functionality |
| Rate limits | Relaxed | Production limits |
Configuration
ZenCore supports environment switching:
npm run env:local # Local development
npm run env:dev # Development/sandbox
npm run env:production # Production
Key Environment Variables
| Variable | Purpose |
|---|---|
API_BASE_URL | Base URL for the API (default: https://api-spaceos.zenspace.io) |
DB_HOST, DB_PORT, DB_DATABASE | PostgreSQL connection |
JWT_SECRET | Token signing key |
STRIPE_SECRET_KEY | Stripe API key (test vs. live) |
STRIPE_WEBHOOK_SECRET | Stripe webhook verification |
MRD_API_KEY | ZenEdge integration key |
Next Steps
- Quickstart — Try the sandbox
- API Conventions — API patterns and response format