### Bookkeeping practices: client portal using Next.js

A client portal blueprint for bookkeeping practices built with Next.js 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;
- **document_access** (document_id, principal_reference, role, granted_at): who may read which document.

Public information: 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 verified on Next.js: 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
- Bookkeeping practices: client portal using Next.js
- Where can I host Bookkeeping practices: Client portal built with Next.js?
- I need a genuinely specialized client portal workflow covering monthly close checklists, client workspaces, and source-document retention.

### Workflow Steps
1. **Model the bookkeeping practices domain**: Create the tables client_entities, engagements, document_requests, close_checklists, document_access. Clients and their bookkeeping cadence live in client_entities; keep sensitive classes out of this schema.
2. **Workflow step 1**: Model client entities and engagement periods; every document belongs to one engagement.
3. **Workflow step 2**: Authorize by client entity and role before any storage access (401 without identity, 403 for the wrong client).
4. **Workflow step 3**: Store documents in the private bucket and stream them through the app.
5. **Workflow step 4**: Deploy and verify the negative authorization tests and an authorized download.
6. **Deploy**: Run the synchronous deploy once and read the result.
7. **Verify**: Run the pattern self-test(s) from the example (/p/private-document-library) and your own acceptance checks for the bookkeeping practices workflow.

### Cost Estimate
- **Currency**: USD
- **Monthly Amount**: 10.0
- **Basis**: Size prices from pricing.toml
  - **App server** (s-1vcpu-1gb): $5.0 
  - **Managed PostgreSQL database** (s-1vcpu-1gb): $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.

### Limitations
- The technical basis (private document library on Next.js) was verified with the pattern fixture; the bookkeeping practices 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. Never store client accounting-software credentials in these flows; financial records are sensitive and no compliance is claimed.
- Public content and synthetic examples only until actual data-handling requirements have been reviewed.

### Next Actions
- **Browse the catalog index**: GET /v1/catalog
- **Search published recipes**: POST /v1/catalog/search
- **Prepare deployment plan**: POST /v1/catalog/plan 
- **Read existing agent authentication setup**: GET /mcp/setup 
- **Browse Bookkeeping practices**: GET /v1/catalog/nodes/industry%3Abookkeeping-practices 
- **Browse Client portal**: GET /v1/catalog/nodes/workload%3Aclient-portal 
- **Browse Next.js**: GET /v1/catalog/nodes/stack%3Aframework-next-js 
- **Browse Deploy web app**: GET /v1/catalog/nodes/intent%3Adeploy-web-app
