Configuration
Configuration is environment-first. Secrets never live in the database, templates or git.
Core variables#
| Name | Default | Purpose |
|---|---|---|
DJANGO_SECRET_KEY | dev key | Signing and sessions; set a long random value in production. |
DJANGO_DEBUG | 1 | Set to 0 in production. |
DJANGO_ALLOWED_HOSTS | localhost | Comma-separated hostnames. |
SITE_URL | http://localhost:8020 | Canonical URL used in email and sitemaps. |
DOCS_SITE_URL | https://zephai.dakidarts.com | Public documentation link shown in demo mode. |
POSTGRES_DB | empty | When set, PostgreSQL replaces SQLite. |
API_BASE_URL | https://api.zephai.dev/v1 | Public gateway base shown in docs and copies. |
ZEPHAI_ENV | development | demo enables read-only middleware. |
ZEPHAI_EDITION | dakidarts | Set by distribution builds; do not edit casually. |
LICENSE_ENFORCEMENT | 0 in debug | Dakid Arts production sets 1. |
DEMO_ACCOUNT_PASSWORD | zephai-demo | Password for seeded demo accounts. |
STRIPE_SECRET_KEY | empty | Stripe hosted checkout fallback when Settings has no stored key. |
PAYPAL_CLIENT_ID | empty | PayPal REST client ID fallback. |
PAYPAL_CLIENT_SECRET | empty | PayPal REST secret fallback. |
GOOGLE_OAUTH_CLIENT_ID | empty | Google sign-in client ID fallback. |
GITHUB_OAUTH_CLIENT_ID | empty | GitHub sign-in client ID fallback. |
LINKEDIN_OAUTH_CLIENT_ID | empty | LinkedIn sign-in client ID fallback. |
APPLE_OAUTH_CLIENT_ID | empty | Apple Services ID fallback; also needs team ID, key ID and .p8 key. |
AWS_STORAGE_BUCKET_NAME | empty | S3 bucket for media; the Storage tab overrides it. |
AWS_S3_CUSTOM_DOMAIN | empty | CloudFront or custom CDN domain for media URLs. |
AWS_S3_REGION_NAME | us-east-1 | S3 region. |
See .env.example for the complete list, including LicenseHub and analytics.
Payments#
Staff configure Stripe, PayPal and Flutterwave v4 in Space → Settings → Payments. Secrets are write-only: the form shows whether a value is stored but never renders it. Stripe and PayPal top-ups create a hosted checkout session and settle the invoice on the provider return URL; the credit is written once with a CreditTransaction. Flutterwave v4 credentials are stored for API integrations; top-ups fall back to an invoice until a card orchestration adapter is enabled.
Media storage#
Staff configure S3 and CloudFront in Space → Settings → Storage. Uploads are written to the bucket when storage is enabled and complete; otherwise the media library falls back to local disk. A per-asset CDN override is available in the media drawer. Secrets are write-only. The Storage tab also supports path-style S3-compatible endpoints, object ACLs, cache headers and a key prefix.
Payouts and subscriptions#
Staff manage vendor payouts at Space → Payouts: policy, account verification, approvals, remittance CSV and status workflow. Payouts are intentionally separate from Orders & billing. Vendors request payouts from Org → Earnings after account verification, subject to the plan fee, minimum, available balance and one-pending-request rule.
Subscription tiers at Space → Settings → Plans define seats, API keys, RPM, context, support SLA, AI Studio generations, log retention, webhook limits, payout fee, Stripe price ID and the public benefits list. Seat, key, AI quota and retention limits are enforced by the application.
AI Studio#
AI Studio is configured in Space → Settings → AI Studio. Staff use /space/assistant/, vendors use /org/assistant/ within their plan quota, and support agents can draft a reply from a ticket. Generation is metered through the gateway and every draft requires human approval before use.
Locales#
Locale management lives at Space → Locales. Staff activate or pause languages, set the default and RTL flag, review translations, export/import JSON packs and open the paginated content workbench. The language switcher and default locale follow the active rows.
Model comparison and docs#
/compare/ compares up to three live catalog models using pricing, context, modalities, capabilities, benchmarks, uptime, provider coverage and 60-day request telemetry. /compare/platforms/ is the gateway-vs-alternatives page. Docs are database-driven: the home page includes a searchable library, and long-form guides such as /docs/mcp-server/ render a sidebar, on-page table of contents, copyable code blocks and feedback.
Email and campaigns#
The Email studio renders table-based HTML from editable sections. Templates carry an event key used by transactional sends (welcome, verification, password reset, invoice, API key, invitation, support reply and more). Notification templates are edited in the same studio. Campaigns add contacts, lists, segments and lifecycle automations; sends use the selected contact list, then subscribed contacts, then legacy newsletter subscribers.
Social sign-in#
Google, GitHub, LinkedIn and Apple sign-in activate only when the provider has complete credentials. Save them in Space → Settings → Sign-in; environment variables are the fallback for automated deployments. Only ready providers render a button on the public login and registration pages. Register these callback URLs with the provider, replacing the host with your deployment domain:
https://your-domain.example/auth/google/callback/
https://your-domain.example/auth/github/callback/
https://your-domain.example/auth/linkedin/callback/
https://your-domain.example/auth/apple/callback/
Apple uses the Services ID as the client ID plus the Team ID, Key ID and downloaded .p8 private key; its callback is a POST, state-checked like the other providers. The flow validates session state, exchanges the code server-side with a timeout and requires a provider-verified email. An existing verified email links to the local account; a new email creates an account with an unusable local password and a personal workspace. Every success and failure writes a LoginEvent, and successes are audit-logged.
Email#
Development uses the console backend. Production should set SMTP or a transactional provider and DEFAULT_FROM_EMAIL. The Email studio renders table-based HTML with inline styles.
Security defaults#
- Session and CSRF cookies are HTTP-only; secure flags activate outside debug.
- HSTS, SSL redirect and secure cookies are forced in
config/settings_production.py. - API keys are hashed with SHA-256.
- Provider credentials and LicenseHub tokens are write-only.