## Property Management: Reporting Dashboard Using Next.js

### Summary
A reporting dashboard blueprint for property management built with Next.js on Ample. Domain schema consists of:
- **listings** (reference, address, unit, rent, publishing_status, agency_id): rental listings with publishing status
- **agencies** (name, license_number, portfolio_size): management offices
- **maintenance_vendors** (name, trade, agency_id, status): vendors per office
- **reports** (agency_id, period, object_key, generated_at): portfolio reports per office
- **exports** (id, definition, object_key, row_count, generated_at, authorized_role): generated artifacts and who may download them.

#### Public Information
- Available rentals
- Office contacts
- Application process

Kept out of scope until handling is reviewed:
- Tenant identity and payment history
- Inspection reports with personal data. Tenant data is personal and often regulated; only published listings and office-scoped reporting are modeled.

### Technical Basis
Verified on Next.js: an export query rendered to a CSV artifact stored with metadata in a private bucket and returned only to an authorized caller (401 without token, export=ok rows=3).

### Representative Queries
- Property management: reporting dashboard using Next.js
- Where can I host Property management: Reporting dashboard built with Next.js?
- I need a genuinely specialized reporting dashboard workflow covering building/vendor access, maintenance status, and property reporting.

### Framework and Workload
**Framework:** Next.js  
**Workload:** Reporting dashboard  
**Industry:** Property management

### Release Status
- Published  
- Support Status: Verified  
- Execution Status: Ready  
- Docs Only: False

### Prerequisites
1. A Next.js project (next build then next start -H 0.0.0.0 -p $PORT on the node-22 template)
2. A PostgreSQL driver reading DATABASE_URL (auto-provisioned when omitted)
3. Bucket credentials from `ample bucket create` passed as encrypted S3_* environment variables
4. A review of which property management data classes may be handled at all; this blueprint models public information only

### Workflow Steps
1. **Model the property management domain**: Create the tables listings, agencies, maintenance_vendors, reports, exports.
2. **Workflow step 1**: Model report definitions scoped to the agency.
3. **Workflow step 2**: Generate report artifacts from queries and store them with metadata.
4. **Workflow step 3**: Authorize downloads (401 without identity).
5. **Workflow step 4**: Deploy and verify an authorized export and the rejected anonymous request.
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 --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/generated-downloads) and your own acceptance checks for the property management workflow.
   - Command: `ample logs --kind build`

### Examples
- **Next.js pattern fixture**: Verified generated downloads basis for this blueprint.
   - Source Ref: `tests/deploy-canaries/next-js-patterns`

### Success Checks
1. App responds on its public URL.
   - Kind: `http_get`
   - Path: `/`
   - Expect: `ample canary next js patterns`
2. Generated-downloads self-test from the example.
   - Kind: `http_get`
   - Path: `/p/generated-downloads`
   - Expect: `see the pattern fixture checks`

### Limitations
- The technical basis (generated downloads on Next.js) was verified with the pattern fixture; the property management 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. Tenant data is personal and often regulated; only published listings and office-scoped reporting are modeled.
- Public content and synthetic examples only until actual data-handling requirements have been reviewed.
- Verified on the node-22 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)
- **Basis**: Size prices from pricing.toml (loaded by the API) at build revision 1ac5595375130d45290090e82ed0f554ccd45405-dirty
  - Components:
    - App server: s-1vcpu-1gb, Quantity: 1.0, Monthly Amount: 5.0
    - Managed PostgreSQL database: 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.

### Last Verified
Last verified at: 2026-09-21T02:34:39Z
