## Law firms: project tracker using Django

### Summary  
A project tracker 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  
- **state_transitions** (record_type, from_state, to_state): the allowed state machine.  
**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. Matter documents are privileged; the portal models per-matter authorization only. Professional-conduct and confidentiality obligations are not established here.  
**Technical basis** verified on Django: a workspace-scoped table, an explicit state machine (draft to review to published) that rejects invalid transitions, and a cross-workspace read that returns nothing (transitions=true isolation=true).

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

### Resource Requirements  
- **Compute**  
- **Postgres**  
- **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 and no DATABASE_URL is supplied.  
- **S3-compatible object storage**: Buckets are S3-compatible with issued credentials; PutObject and GetObject are verified by canary. Other S3 operations are not verified.

### Framework  
Django

### Workload  
Project tracker

### Industry  
Law firms

### Release Status  
Published

### Support Status  
Verified

### Execution Status  
Ready

### Docs Only  
False

### 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

### Tested Configuration  
- **Template**: python-3.12  
- **Runtime**: python  
- **Size**: s-1vcpu-1gb  
- **Install**: python3 -m pip install --target .ample/python -r requirements.txt  
- **Start**: PYTHONPATH=.ample/python:${PYTHONPATH:-} python3 run.py

### Workflow Steps  
1. **Model the law firms domain**: Create the tables client_entities, matters, document_requests, shared_documents, state_transitions. Clients with conflict-check status live in client_entities; keep the sensitive classes (privileged communications and case files, identity and financial documents, opposing-party information) out of this schema.  
2. **Workflow step 1**: Model engagements and workstreams with explicit status transitions  
3. **Workflow step 2**: Scope every query by client entity  
4. **Workflow step 3**: Attach deliverables as private objects linked to workstreams  
5. **Workflow step 4**: Deploy and verify transitions and cross-client isolation  
6. **Deploy**: Run the synchronous deploy once and read the result. Re-running with no change is a no-op.  
   - **Command**: ample deploy . --name  --public --start "python3 run.py" --env S3_ENDPOINT=... --env S3_REGION=... --env S3_BUCKET=... --env S3_ACCESS_KEY_ID=... --env S3_SECRET_ACCESS_KEY=...  
7. **Verify**: Run the pattern self-test(s) from the example (/p/relational-records) and your own acceptance checks for the law firms workflow.  
   - **Command**: ample logs  --kind build

### Examples  
- **Django pattern fixture**: Verified relational records basis for this blueprint.  
   - **Source Ref**: tests/deploy-canaries/django-patterns

### Success Checks  
- App responds on its public URL  
   - **Kind**: http_get  
   - **Path**: /  
   - **Expect**: ample canary django patterns  
- Relational-records self-test from the example  
   - **Kind**: http_get  
   - **Path**: /p/relational-records  
   - **Expect**: see the pattern fixture checks

### Limitations  
- The technical basis (relational records on Django) was verified with the pattern fixture; the law firms schema and workflow are an original design for this blueprint and were not executed as a separate application.  
- No health, financial, privacy or other compliance claim is made. Matter documents are privileged; the portal models per-matter authorization only. Professional-conduct and confidentiality obligations are not established here.  
- Public content and synthetic examples only until actual data-handling requirements have been reviewed.  
- Verified on the python-3.12 template at s-1vcpu-1gb; region, request-duration limits and other sizes are unknown or unverified.  
- Managed PostgreSQL 16 only; extensions, connection limits and backup or restore procedures are not verified.  
- PutObject and GetObject with path-style addressing are verified; other S3 operations and CDN cache rules are not.

### Cost Estimate  
- **Currency**: USD  
- **Monthly Amount**: 10.0  
- **Authoritative**: true  
- **Basis**: size prices from pricing.toml (loaded by the API) at build revision 1ac5595375130d45290090e82ed0f554ccd45405-dirty  
- **Components**:  
   - **App server**: size s-1vcpu-1gb, quantity 1.0, monthly amount 5.0  
   - **Managed PostgreSQL database**: size s-1vcpu-1gb, quantity 1.0, monthly amount 5.0  
- **Note**: Always-on monthly price of the tested sizes; apps and databases auto-pause when idle. Buckets are allocation-priced per quota and not included.

### Evidence Summary  
- **Kind**: canary_run  
- **Summary**: Django pattern fixture deployed on Ample (pip install into .ample/python from requirements.txt, then waitress serving project.wsgi from run.py reading PORT on the python-3.12 template); the relational records checks passed: a workspace-scoped table, an explicit state machine (draft to review to published) that rejects invalid transitions, and a cross-workspace read that returns nothing (transitions=true isolation=true). The blueprint's Law firms schema and workflow below build on that verified basis and were not separately executed.  
- **Observed At**: 2026-09-20T03:31:44Z  
- **Implementation Revision**: 03b6402b1b3e19178985f08ea4033804521d85d4-dirty (CLI b75e104)  
- **Expires At**: 2027-03-19T03:31:44Z  
- **Scope**:  
   - **Checks**: /p/relational-records  
   - **Pattern**: pattern:relational-records  
   - **Template**: python-3.12

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

### Next Actions  
- **Browse the catalog index**  
   - **Action ID**: browse-catalog  
   - **Operation ID**: catalog_index  
   - **Method**: GET  
   - **Relative Path**: /v1/catalog  
- **Prepare a side-effect-free deployment plan for an authorized project**  
   - **Action ID**: plan:page:blueprints:law-firms:project-tracker:django  
   - **Operation ID**: plan_deployment  
   - **Method**: POST  
   - **Relative Path**: /v1/catalog/plan
