## Bookkeeping practices: form collection using Django

### Summary  
A form collection blueprint for bookkeeping practices built with Django on Ample. Domain schema:  
- **client_entities** (legal_name, entity_type, accounting_software, period_cadence): clients and their bookkeeping cadence;  
- **engagements** (client_entity_id, period_start, period_end, close_status): monthly or quarterly close engagements;  
- **document_requests** (engagement_id, category, due_at, status, uploaded_object_key): receipts, statements and payroll summaries requested;  
- **close_checklists** (engagement_id, item, done_at): close tasks per period;  
- **uploads** (id, owner_reference, object_key, content_type, size, uploaded_at): validated uploads linked to their owner.

Public information includes: service packages and cadence, onboarding checklist, contact details. Kept out of scope until handling is reviewed: bank statements and receipts, payroll data, login credentials for accounting software. Never store client accounting-software credentials in these flows; financial records are sensitive and no compliance is claimed.

### Technical Basis  
Verifiable 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).

### Framework  
- **Framework**: Django  
- **Workload**: Form collection  
- **Industry**: Bookkeeping practices

### Infrastructure Requirements  
1. **Compute**  
   - Summary: 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**  
   - Summary: 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**  
   - Summary: Buckets are S3-compatible with issued credentials; PutObject and GetObject are verified by canary. Other S3 operations are not verified.

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

### Workflow Steps  
1. **Model the bookkeeping practices domain**: Create the tables client_entities, engagements, document_requests, close_checklists, uploads.  
2. **Workflow step 1**: Model document requests per engagement with due dates and status.  
3. **Workflow step 2**: Validate uploaded files (type, size) before storing them in the private bucket and linking them to the request.  
4. **Workflow step 3**: Authorize uploads by client entity.  
5. **Workflow step 4**: Deploy and verify rejection of disallowed files and a linked upload.  
6. **Deploy**: Run the synchronous deploy once and read the result.  
7. **Verify**: Run the pattern self-test(s) from the example and your own acceptance checks for the bookkeeping practices workflow.

### Limitations  
- The technical basis was verified with the pattern fixture; the bookkeeping practices schema and workflow were not executed as a separate application.  
- No compliance claim is made.  
- Public content and synthetic examples only until actual data-handling requirements have been reviewed.

### Cost Estimate  
- **Currency**: USD  
- **Monthly Amount**: 10.0  
- **Basis**: size prices from pricing.toml at build revision 1ac5595375130d45290090e82ed0f554ccd45405-dirty.

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

### Next Actions  
1. **Browse the catalog index**: GET /v1/catalog  
2. **Search published recipes**: POST /v1/catalog/search  
3. **Prepare a deployment plan**: POST /v1/catalog/plan  
4. **Read existing authentication setup**: GET /mcp/setup  
5. **Browse Bookkeeping practices**: GET /v1/catalog/nodes/industry%3Abookkeeping-practices  
6. **Browse Form collection**: GET /v1/catalog/nodes/workload%3Aform-collection  
7. **Browse Django**: GET /v1/catalog/nodes/stack%3Aframework-django  
8. **Browse Deploy web app**: GET /v1/catalog/nodes/intent%3Adeploy-web-app

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