# Publishing: Client Portal Using Django

## Summary
A client portal blueprint for publishing built with Django on Ample. Domain schema includes:
- **Titles**: `isbn_or_slug`, `title`, `author`, `imprint`, `published_at`
- **Editions**: `title_id`, `format`, `version`, `object_key`
- **Customer Workspaces**: `name`, `license_type`, `seat_count`
- **Customer Assets**: `workspace_id`, `title_id`, `object_key`, `license_expires_at`
- **Document Access**: `document_id`, `principal_reference`, `role`, `granted_at`

## Representative Queries
- Publishing: client portal using Django
- Where can I host Publishing: Client portal built with Django?
- I need a genuinely specialized client portal workflow covering editorial roles, publication versions, and rights-scoped assets.

## Resource Requirements
- **Compute**: `primitive:compute`
- **Postgres**: `primitive:postgres`
- **S3-compatible object storage**: `primitive:s3-compatible-object-storage`

## Infrastructure Requirements
1. **Compute**: Apps run in isolated x86_64 Firecracker microVMs.
2. **Postgres**: Managed PostgreSQL 16 runs in its own microVM and is auto-provisioned.
3. **S3-compatible object storage**: Buckets are S3-compatible with issued credentials.

## Framework
- Django

## Workload
- Client portal

## Limitations
- The technical basis (private document library on Django) was verified with the pattern fixture; the publishing schema and workflow are an original design for this blueprint.
- No health, financial, privacy or other compliance claims are made.

## Cost Estimate
- **Monthly Amount**: $10.00
 - **App Server**: $5.00
 - **Managed PostgreSQL Database**: $5.00

## Workflow Steps
1. **Model the publishing domain**: Create the necessary tables and keep sensitive classes out.
2. **Authorize by client entity and role**: Implement access checks before any storage access.
3. **Store documents in a private bucket**.
4. **Deploy and verify**: Ensure the deployment is synchronous and checks are in place.

## Examples
- **Django Pattern Fixture**: Verified private document library basis for this blueprint.

## Success Checks
1. App responds on its public URL.
2. Run the pattern self-test for the private-document-library example.
