# Photography studios: client portal using Next.js

## Summary
A client portal blueprint for photography studios built with Next.js on Ample. 
Domain schema: 
- **listings** (reference, session_type, price_from, publishing_status, agency_id): session packages with publishing status;
- **agencies** (name, location, studio_count): studios or locations;
- **galleries** (listing_id, object_key, cdn_key, consent_reference): published portfolio media;
- **reports** (agency_id, period, object_key, generated_at): studio booking reports;
- **document_access** (document_id, principal_reference, role, granted_at): who may read which document.

Public information: session packages and pricing from, consented portfolio galleries, studio locations.
Kept out of scope until handling is reviewed: client galleries before release, minors in photographs, payment details. Client galleries are private until released with consent; only consented portfolio media is public.

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
- Photography studios: client portal using Next.js
- Where can I host Photography studios: Client portal built with Next.js?
- I need a genuinely specialized client portal workflow covering client galleries, usage permissions and original/derivative assets.

## Workflow Steps
1. **Model the photography studios domain**: Create the tables listings, agencies, galleries, reports, document_access. Session packages with publishing status lives in listings; keep the sensitive classes (client galleries before release, minors in photographs, payment details) 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.

## Limitations
- The technical basis (private document library on Next.js) was verified with the pattern fixture; the photography studios 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. Client galleries are private until released with consent; only consented portfolio media is public.
- 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.
- **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.

## 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 Photography studios**  
- **Browse Client portal**  
- **Browse Next.js**  
- **Browse Deploy web app**
