Documentation

Configuration

Configuration is environment-first. Secrets never live in the database, templates or git.

Core variables#

NameDefaultPurpose
DJANGO_SECRET_KEYdev keySigning and sessions; set a long random value in production.
DJANGO_DEBUG1Set to 0 in production.
DJANGO_ALLOWED_HOSTSlocalhostComma-separated hostnames.
SITE_URLhttp://localhost:8020Canonical URL used in email and sitemaps.
DOCS_SITE_URLhttps://zephai.dakidarts.comPublic documentation link shown in demo mode.
POSTGRES_DBemptyWhen set, PostgreSQL replaces SQLite.
API_BASE_URLhttps://api.zephai.dev/v1Public gateway base shown in docs and copies.
ZEPHAI_ENVdevelopmentdemo enables read-only middleware.
ZEPHAI_EDITIONdakidartsSet by distribution builds; do not edit casually.
LICENSE_ENFORCEMENT0 in debugDakid Arts production sets 1.
DEMO_ACCOUNT_PASSWORDzephai-demoPassword for seeded demo accounts.
STRIPE_SECRET_KEYemptyStripe hosted checkout fallback when Settings has no stored key.
PAYPAL_CLIENT_IDemptyPayPal REST client ID fallback.
PAYPAL_CLIENT_SECRETemptyPayPal REST secret fallback.
GOOGLE_OAUTH_CLIENT_IDemptyGoogle sign-in client ID fallback.
GITHUB_OAUTH_CLIENT_IDemptyGitHub sign-in client ID fallback.
LINKEDIN_OAUTH_CLIENT_IDemptyLinkedIn sign-in client ID fallback.
APPLE_OAUTH_CLIENT_IDemptyApple Services ID fallback; also needs team ID, key ID and .p8 key.
AWS_STORAGE_BUCKET_NAMEemptyS3 bucket for media; the Storage tab overrides it.
AWS_S3_CUSTOM_DOMAINemptyCloudFront or custom CDN domain for media URLs.
AWS_S3_REGION_NAMEus-east-1S3 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.