## Accounting firms: Client Portal using Laravel

### Summary
A client portal blueprint for accounting firms built with Laravel on Ample. Domain schema:  
- **client_entities** (legal_name, entity_type, fiscal_year_end, jurisdiction): the businesses and individuals served;  
- **engagements** (client_entity_id, service_line, period_start, period_end, status): bookkeeping, tax and audit engagements by period;  
- **document_requests** (engagement_id, title, due_at, status, uploaded_object_key): requests for source documents;  
- **deliverables** (engagement_id, title, object_key, released_at): returns and statements released to the client;  
- **document_access** (document_id, principal_reference, role, granted_at): who may read which document.

Public information: service lines and typical engagement periods, filing calendars and deadlines, office locations. Kept out of scope until handling is reviewed: tax identifiers and financial statements, bank and payroll records, identity documents. Financial records and tax identifiers are regulated in most jurisdictions; the portal flows here model authorization only and claim no compliance. Technical basis verified on Laravel: 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
- Accounting firms: client portal using Laravel  
- Where can I host Accounting firms: Client portal built with Laravel?  
- I need a genuinely specialized client portal workflow covering engagement periods, client entities and document authorization.

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

### Workflow Steps
1. Model the accounting firms domain: Create the tables client_entities, engagements, document_requests, deliverables, document_access. The businesses and individuals served lives in client_entities; keep the 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 and verify the negative authorization tests and an authorized download.
6. Run the synchronous deploy once and read the result. Re-running with no change is a no-op.

### Success Checks
- App responds on its public URL  
- Private-document-library self-test from the example

### Limitations
- The technical basis was verified with the pattern fixture; the accounting firms schema and workflow are an original design for this blueprint.  
- No compliance claim is made. Public content and synthetic examples only until actual data-handling requirements have been reviewed.  
- Verified on the php-8.5 template; region, request-duration limits and other sizes are unknown or unverified.

### Cost Estimate
- Monthly Amount: $10.00 (USD)

### Evidence Summary
- Laravel pattern fixture deployed on Ample; the private document library checks passed: a role-to-document access model with negative tests and a private-bucket round-trip for the allowed role.

### Next Actions
- **Browse the catalog index**  
- **Search published recipes by intent, stack and constraints**  
- **Prepare a side-effect-free deployment plan for an authorized project**  
- **Read the existing agent authentication setup**  
- **Browse Accounting firms**  
- **Browse Client portal**  
- **Browse Laravel**  
- **Browse Deploy web app**

### Tested Configuration
- Template: php-8.5  
- Runtime: php  
- Size: s-1vcpu-1gb  
- Install: `composer install --no-dev --prefer-dist --no-interaction --no-progress --optimize-autoloader`  
- Start: `frankenphp php-server --listen :$PORT --root public`

### Examples
- Laravel pattern fixture: Verified private document library basis for this blueprint.
