# Video production: client portal using Django

A client portal blueprint for video production built with Django on Ample. Domain schema:
- **customer_workspaces** (client_name, project_count): client organizations
- **projects** (workspace_id, title, stage, delivery_due_at): productions in flight
- **cuts** (project_id, version, object_key, review_status, reviewed_at): versioned cuts for review
- **customer_assets** (workspace_id, project_id, object_key, visibility): final deliverables and raw footage access
- **document_access** (document_id, principal_reference, role, granted_at): who may read which document.

Public information: showreel and services, production process, contact.
Kept out of scope until handling is reviewed: unreleased footage, talent releases and contracts, client brand material.
Footage is large and confidential; the storage checks here use small objects, so verify large-file behavior separately.

Technical basis verified on Django: a role-to-document access model with negative tests (401 without identity, 403 for the wrong role) and a private-bucket round-trip for the allowed role (private=ok).

## Representative Queries
- Video production: client portal using Django
- Where can I host Video production: Client portal built with Django?
- I need a genuinely specialized client portal workflow covering project reviewers, delivery specifications and video asset versions.

## Resource Requirements
- **Compute**
- **Postgres**
- **S3-compatible object storage**

## Infrastructure Requirements
1. **Compute**: Verified; Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes.
2. **Postgres**: Verified; Managed PostgreSQL 16 runs in its own microVM and is auto-provisioned when an app needs a database and no DATABASE_URL is supplied.
3. **S3-compatible object storage**: Verified; Buckets are S3-compatible with issued credentials; PutObject and GetObject are verified by canary. Other S3 operations are not verified.

## Prerequisites
- A Django project (pip install into .ample/python from requirements.txt, then waitress serving project.wsgi from run.py reading PORT on the python-3.12 template)
- A PostgreSQL driver reading DATABASE_URL (auto-provisioned when omitted)
- Bucket credentials from `ample bucket create` passed as encrypted S3_* environment variables
- A review of which video production data classes may be handled at all; this blueprint models public information only

## Workflow Steps
1. **Model the video production domain**: Create the tables customer_workspaces, projects, cuts, customer_assets, document_access. Keep sensitive classes out of this schema.
2. **Model client entities and engagement periods**: every document belongs to one engagement.
3. **Authorize by client entity and role** before any storage access (401 without identity, 403 for the wrong client).
4. **Store documents** in the private bucket and stream them through the app.
5. **Deploy**: Run the synchronous deploy once and read the result. Re-running with no change is a no-op.
6. **Verify**: Run the pattern self-test(s) and your own acceptance checks for the video production workflow.

## Examples
- **Django pattern fixture**: Verified private document library basis for this blueprint. Source Ref: `tests/deploy-canaries/django-patterns`

## Success Checks
1. App responds on its public URL: Expect: ample canary django patterns
2. Private-document-library self-test: Expect: see the pattern fixture checks.

## Limitations
- The technical basis was verified; the video production schema and workflow are original designs and were not executed separately.
- No health, financial, privacy claims are made. Verify large-file behavior separately.

## Cost Estimate
- **Monthly Amount**: $10.00 (USD)
    - App server (s-1vcpu-1gb): $5.00
    - Managed PostgreSQL database (s-1vcpu-1gb): $5.00
- Note: Apps and databases auto-pause when idle. Buckets are allocation-priced per quota.

## Evidence Summary
- **Django pattern fixture** deployed on Ample; checks passed for role-to-document access model.

## Last Verified At
- 2026-09-20T03:31:44Z

## Next Actions
1. Browse the catalog index
2. Search published recipes by intent, stack, and constraints
3. Prepare a deployment plan for an authorized project
4. Read the existing agent authentication setup
5. Browse Video production
6. Browse Client portal
7. Browse Django
8. Browse Deploy web app
