### Law firms: form collection using Django

A form collection blueprint for law firms built with Django on Ample.

**Domain schema:** 
- **client_entities** (name, entity_type, conflict_check_reference): clients with conflict-check status;
- **matters** (client_entity_id, practice_area, opened_at, closed_at, status): engagement periods as matters;
- **document_requests** (matter_id, title, due_at, status, uploaded_object_key): documents requested from the client;
- **shared_documents** (matter_id, title, object_key, authorized_role): documents released to authorized client contacts;
- **uploads** (id, owner_reference, object_key, content_type, size, uploaded_at): validated uploads linked to their owner.

**Public information:** practice areas and attorney profiles, intake process and fee structure overview, office locations. Kept out of scope until handling is reviewed: privileged communications and case files, identity and financial documents, opposing-party information.

**Technical basis verified on Django:** content-type and size validation that rejects disallowed files, an object written to a private bucket and a row linking the record to the object key (reject=ok upload=ok linked=ok).

### Representative Queries
- Law firms: form collection using Django
- Where can I host Law firms: Form collection built with Django?
- I need a genuinely specialized form collection workflow covering matter-based access separation and confidential document handling.

### Resource Requirements
- primitive:compute
- primitive:postgres
- primitive:s3-compatible-object-storage

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

### 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 law firms data classes may be handled at all; this blueprint models public information only.

### Workflow Steps
1. **Model the law firms domain** : Create the tables client_entities, matters, document_requests, shared_documents, uploads.
2. **Model document requests per engagement** with due dates and status.
3. **Validate uploaded files** (type, size) before storing them in the private bucket and linking them to the request.
4. **Authorize uploads by client entity.**
5. **Deploy and verify rejection of disallowed files and a linked upload.**
6. **Run a synchronous deploy once and read the result.**

### Examples
- **Django pattern fixture**: Verified browser file uploads basis for this blueprint.

### Success Checks
- App responds on its public URL.
- Browser-file-uploads self-test from the example.

### Limitations
- The law firms schema and workflow are an original design for this blueprint and were not executed as a separate application.
- No compliance claims made; matter documents are privileged.

### Cost Estimate
- Currency: USD
- Monthly Amount: 10.0
- Components:
  - App server: size `s-1vcpu-1gb`, monthly amount 5.0
  - Managed PostgreSQL database: size `s-1vcpu-1gb`, monthly amount 5.0

### Evidence Summary
- Django pattern fixture deployed on Ample; the browser file uploads checks passed.

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