# Public Data Model (SQL-backed)

This document describes the public-safe fields and relationships exposed by Pitt Landscape's public site and read-only API. The public contract is served from SQL-backed tables and snapshot views, not Sanity documents.

## Visibility rules
- Only published content and public-safe records.
- Exclude rows or routes marked `noindex` from bot-facing responses.
- If a field is operational, private, or customer-specific, do not expose it.

## Public entities

### service type
Public fields:
- `name`
- `slug`
- `description`
- hero image metadata when available
- SEO title and description when available

Relationship:
- one service type can contain many services

### service
Public fields:
- `name`
- `slug`
- `summary`
- parent service type
- hero image metadata when available
- content sections
- SEO title and description when available

Relationship:
- a service belongs to a service type
- photos, FAQs, projects, and reviews can be associated to a service

### service area
Public fields:
- `name`
- `slug`
- `level` (`state`, `county`, `city`, `neighborhood`)
- parent area reference for hierarchy resolution
- hero image metadata when available
- content sections
- SEO title and description when available

Public-safe location guidance:
- answer at neighborhood, city, county, or state level only
- never expose exact coordinates, bounds, place IDs, or street addresses

### static page
Public fields:
- `title`
- `slug`
- hero image metadata when available
- content sections
- SEO title, description, and canonical URL

Storage note:
- static pages are served from `static_pages`

### faq
Public fields:
- `question`
- `answer`
- optional service slug
- optional service area slug
- display order

### photo
Public fields:
- image URL
- alt text
- caption
- `projectPhase`
- related services
- related service areas

### review
Public fields:
- `rating`
- public review body
- source platform
- published timestamp

Public-safe reviewer handling:
- use first name, initials, or anonymized attribution only

### project summary
Public fields:
- title only when it does not expose a private customer
- service area at neighborhood, city, county, or state level
- related services
- sold/public-safe summary metrics
- associated public photos

Never expose:
- contact details
- exact addresses
- internal IDs
- internal workflow status
- pricing, margin, or estimate internals

## Public-safe relationships
- service type -> services
- service -> photos, FAQs, project summaries, reviews
- service area -> child areas, photos, FAQs, project summaries, reviews
- project summaries -> services and photos

## Privacy-sensitive entities
Never expose:
- contacts
- web leads
- job applications
- email templates
- review requests
- project feedback
- internal docs

## Recommended response shape
- prefer summaries, counts, and limited public examples
- prefer city or county context over exact properties
- return only the fields needed to answer the user
