Platform Operations
ZaiDrama is operated as a unified platform. Regular users do not install server components, configure databases, request media-provider keys, or maintain servers. This page is for platform operations, on-call, and development teams; host paths, secrets, domains, backup locations, and release pipelines belong in restricted runbooks.
1. Hosted boundary
| Boundary | Responsibility |
|---|---|
| Zai control plane | Unified identity, email verification, account security, subscription/credits, rewards, conversation history, and creative intent |
| ZaiDrama service | Projects and assets, scripts and timelines, capability execution, generation queues, versions, presentations, and project packages |
Trusted Zai context carries user identity into ZaiDrama. Projects, tasks, and quick-media workspaces are user-scoped; only administrators maintain provider credentials, routing, concurrency, and operational switches.
2. Production components and data
The production environment includes the web frontend and FastAPI service, Zai identity/dialogue services, a managed database, project and media storage, asynchronous workers, HTTPS ingress, logs, monitoring, and alerts. Users access projects and export packages through the product rather than database files or host volumes.
3. Configuration and secrets
Inject production configuration through a protected deployment system. Never store plaintext secrets in the repository, frontend bundle, logs, or tickets. Configuration categories include Zai service authentication, user context and event signatures, database and storage, provider credentials and capabilities, CORS/HTTPS/callbacks, and worker channels.
Use the runtime registry and admin declarations as the capability source of truth. When limits, defaults, model capabilities, or credit mappings change, review the corresponding backend, request construction, admin UI, tests, and docs together.
4. Release and upgrades
Before each release, run backend, frontend, and docs checks; verify schema/project migrations; test sign-in, dialogue, project creation, queues, pause/resume, version activation, and export; check registry/backend alignment, workers, SSE, polling, logs, and alerts; and record a rollback point. Keep old tasks queryable and recoverable during a rolling upgrade. Migrations must be re-entrant and preceded by a consistent snapshot.
5. Tasks, credits, and recovery
Image, video, and audio work enters the GenerationQueue with independent workers. Terminal states arrive through project-event SSE; polling fills intermediate states and reconnect gaps.
The production control plane supports pause, resume, cancel, retry, and checkpoint rollback. Recovery rebuilds only cancelled or missing child tasks and reuses completed work. Selected reruns create a new version that is activated only after quality and delivery review. Credit reservation, deduction, release, and failure rollback must be idempotent.
6. Backups, disaster recovery, and privacy
The platform team owns encrypted, access-controlled backups and recovery drills for database, project metadata, media, task audits, and required configuration. A project ZIP is a single-project export, not platform disaster recovery. Logs and diagnostics must not contain keys, JWTs, passwords, verification codes, or unauthorized source text.
7. Security and network boundaries
Expose only HTTPS and required product routes. Protect internal bridge calls with service tokens, user/tenant context, and event signatures. Keep admin and user routes separate; never send provider credentials to browsers. Restrict workers, downloads, imports, filesystem, and subprocesses to their task scope and operational security policy.
8. Monitoring and on-call
Monitor web/API availability, bridge and SSE latency, queue depth and task recovery, database/storage/backup health, credit reconciliation, provider auth/rate-limit/timeouts, admin actions, and cross-user access alerts. Alerts should use internal request/task/project/user IDs without sensitive content.
9. Go-live checklist
- Unified sign-in, registration, password reset, and sessions work
- Regular users can complete the core experience without provider keys
- Zai dialogue, source handling, proposal confirmation, and review gates work
- Image/video/audio queues and pause/resume/cancel/retry work
- Selected reruns and version activation preserve the current version
- Player, subtitles, native/TTS audio switching, and project packages work
- Subscription, credits, rewards, and task audits reconcile
- Database, media, and log backups have been verified
- HTTPS, CORS, internal authentication, and admin permissions are verified
- Monitoring, alerts, on-call contacts, and security response are configured