# kacytran1122/sign_off architecture

> Architecture diagram of the GitHub repository kacytran1122/sign_off, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kacytran1122/sign_off
- Repository: https://github.com/kacytran1122/sign_off

## Overview

Signoff coordinates tenant repair reports through messaging, manager scheduling, maintenance, and tenant confirmation, while assembling property and neighborhood evidence into a hosted report and workspace. The graph combines sampled calls with README-documented capabilities; unsampled integration wiring is omitted or shown as unverified dashed links.

Main entry points: [`backend/workflow.ts`](https://github.com/kacytran1122/sign_off/blob/main/backend/workflow.ts) (Repair workflow), [`backend/area.ts`](https://github.com/kacytran1122/sign_off/blob/main/backend/area.ts) (Neighborhood context), [`backend/inspection.ts`](https://github.com/kacytran1122/sign_off/blob/main/backend/inspection.ts) (Building inspection evidence), [`backend/agents/index.ts`](https://github.com/kacytran1122/sign_off/blob/main/backend/agents/index.ts) (Agent orchestration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_messaging["Messaging and intake"]
  node_photon["Photon messaging"]
  node_service["Message service<br/>[photon.ts]"]
  node_server["Intake service<br/>[index.ts]"]
end

subgraph group_coordination["Repair coordination"]
  node_settings["Property configuration<br/>[config.ts]"]
  node_workflow["Repair workflow<br/>[workflow.ts]"]
  node_repair["Safety guidance<br/>[repair.ts]"]
  node_schedule["Inspection scheduling<br/>[schedule.ts]"]
  node_orderdata[("Work-order state<br/>[orders.ts]")]
end

subgraph group_evidence["Property and neighborhood evidence"]
  node_inspection["Building inspection evidence<br/>[inspection.ts]"]
  node_geometry["Roof geometry<br/>[roof-geometry.ts]"]
  node_projection["Roof projection<br/>[roof-projection.ts]"]
  node_damage["Damage location<br/>[damage-point.ts]"]
  node_area["Neighborhood context<br/>[area.ts]"]
  node_houston["Houston 311 records<br/>[houston-311.ts]"]
  node_blender["3D repair rendering<br/>[blender.ts]"]
end

subgraph group_delivery["Reports and workspace"]
  node_reportdata["Report assembly<br/>[reports.ts]"]
  node_publisher["Signed report publisher"]
  node_reportpage["Hosted repair reports<br/>[page.tsx]"]
  node_workspace["Repair workspace<br/>[main.tsx]"]
end

subgraph group_agents["Scoped agents"]
  node_agents["Agent orchestration<br/>[index.ts]"]
  node_agentruntime["Tool runtime<br/>[runtime.ts]"]
  node_managerqa["Manager questions"]
end

node_tenant(("Tenant"))
node_manager(("Manager"))
node_buildingdata["Building records and imagery"]
node_weather["Weather and map sources"]
node_timeseries[("TimescaleDB")]
node_r2[("Private R2 snapshots")]

node_tenant -->|"reports issue"| node_photon
node_manager -->|"sends commands"| node_photon
node_photon -->|"delivers messages"| node_service
node_service -->|"polls and receives"| node_server
node_server -->|"advances work order"| node_workflow
node_server -->|"runs agent tasks"| node_agents
node_workflow -.->|"checks property"| node_settings
node_workflow -->|"uses repair guidance"| node_repair
node_workflow -->|"parses visit"| node_schedule
node_manager -->|"confirms inspection"| node_workflow
node_workflow -.->|"records status"| node_orderdata
node_workflow -->|"records damage point"| node_damage
node_workflow -.->|"gathers evidence"| node_inspection
node_workflow -->|"publishes report"| node_publisher
node_workflow -->|"requests confirmation"| node_tenant
node_tenant -->|"confirms or reopens"| node_workflow
node_agents -->|"runs tool loop"| node_agentruntime
node_agents -->|"answers questions"| node_managerqa
node_agents -->|"prepares evidence brief"| node_inspection
node_managerqa -->|"reads order details"| node_orderdata
node_inspection -->|"uses roof geometry"| node_geometry
node_inspection -->|"uses roof projection"| node_projection
node_inspection -->|"matches property evidence"| node_buildingdata
node_area -->|"uses outdoor context"| node_weather
node_area -->|"stores heat observations"| node_timeseries
node_area -.->|"includes service counts"| node_houston
node_area -->|"uses satellite map"| node_weather
node_workflow -.->|"gathers neighborhood context"| node_area
node_workflow -->|"queues render"| node_blender
node_reportdata -->|"combines building evidence"| node_inspection
node_reportdata -->|"combines neighborhood evidence"| node_area
node_reportdata -->|"includes rendered model"| node_blender
node_publisher -->|"stores filtered snapshots"| node_r2
node_reportpage -.->|"serves hosted report"| node_publisher
node_workspace -.->|"shows repair state"| node_server
node_workspace -.->|"shows room evidence"| node_buildingdata

click node_service "https://github.com/kacytran1122/sign_off/blob/main/backend/photon.ts"
click node_server "https://github.com/kacytran1122/sign_off/blob/main/backend/index.ts"
click node_settings "https://github.com/kacytran1122/sign_off/blob/main/backend/config.ts"
click node_workflow "https://github.com/kacytran1122/sign_off/blob/main/backend/workflow.ts"
click node_repair "https://github.com/kacytran1122/sign_off/blob/main/backend/repair.ts"
click node_schedule "https://github.com/kacytran1122/sign_off/blob/main/backend/schedule.ts"
click node_orderdata "https://github.com/kacytran1122/sign_off/blob/main/backend/agents/orders.ts"
click node_agents "https://github.com/kacytran1122/sign_off/blob/main/backend/agents/index.ts"
click node_agentruntime "https://github.com/kacytran1122/sign_off/blob/main/backend/agents/runtime.ts"
click node_managerqa "https://github.com/kacytran1122/sign_off/blob/main/backend/agents/manager-questions.ts"
click node_inspection "https://github.com/kacytran1122/sign_off/blob/main/backend/inspection.ts"
click node_geometry "https://github.com/kacytran1122/sign_off/blob/main/backend/roof-geometry.ts"
click node_projection "https://github.com/kacytran1122/sign_off/blob/main/backend/roof-projection.ts"
click node_damage "https://github.com/kacytran1122/sign_off/blob/main/backend/damage-point.ts"
click node_area "https://github.com/kacytran1122/sign_off/blob/main/backend/area.ts"
click node_houston "https://github.com/kacytran1122/sign_off/blob/main/backend/houston-311.ts"
click node_blender "https://github.com/kacytran1122/sign_off/blob/main/backend/blender.ts"
click node_reportdata "https://github.com/kacytran1122/sign_off/blob/main/backend/reports.ts"
click node_publisher "https://github.com/kacytran1122/sign_off/blob/main/backend/report-publication.ts"
click node_reportpage "https://github.com/kacytran1122/sign_off/blob/main/frontend/app/(workspace)/reports/%5Bkey%5D/page.tsx"
click node_workspace "https://github.com/kacytran1122/sign_off/blob/main/frontend/main.tsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_photon,node_service,node_server toneBlue
class node_settings,node_workflow,node_repair,node_schedule,node_orderdata,node_timeseries,node_r2 toneAmber
class node_inspection,node_geometry,node_projection,node_damage,node_area,node_houston,node_blender toneMint
class node_reportdata,node_publisher,node_reportpage,node_workspace toneRose
class node_agents,node_agentruntime,node_managerqa,node_tenant,node_manager,node_buildingdata,node_weather toneIndigo
```

## Components

### Messaging and intake

- **Photon messaging**
- [Message service](https://github.com/kacytran1122/sign_off/blob/main/backend/photon.ts): `backend/photon.ts`
- [Intake service](https://github.com/kacytran1122/sign_off/blob/main/backend/index.ts): `backend/index.ts`

### Repair coordination

- [Property configuration](https://github.com/kacytran1122/sign_off/blob/main/backend/config.ts): `backend/config.ts`
- [Repair workflow](https://github.com/kacytran1122/sign_off/blob/main/backend/workflow.ts): `backend/workflow.ts`
- [Safety guidance](https://github.com/kacytran1122/sign_off/blob/main/backend/repair.ts): `backend/repair.ts`
- [Inspection scheduling](https://github.com/kacytran1122/sign_off/blob/main/backend/schedule.ts): `backend/schedule.ts`
- [Work-order state](https://github.com/kacytran1122/sign_off/blob/main/backend/agents/orders.ts): `backend/agents/orders.ts`

### Property and neighborhood evidence

- [Building inspection evidence](https://github.com/kacytran1122/sign_off/blob/main/backend/inspection.ts): `backend/inspection.ts`
- [Roof geometry](https://github.com/kacytran1122/sign_off/blob/main/backend/roof-geometry.ts): `backend/roof-geometry.ts`
- [Roof projection](https://github.com/kacytran1122/sign_off/blob/main/backend/roof-projection.ts): `backend/roof-projection.ts`
- [Damage location](https://github.com/kacytran1122/sign_off/blob/main/backend/damage-point.ts): `backend/damage-point.ts`
- [Neighborhood context](https://github.com/kacytran1122/sign_off/blob/main/backend/area.ts): `backend/area.ts`
- [Houston 311 records](https://github.com/kacytran1122/sign_off/blob/main/backend/houston-311.ts): `backend/houston-311.ts`
- [3D repair rendering](https://github.com/kacytran1122/sign_off/blob/main/backend/blender.ts): `backend/blender.ts`

### Reports and workspace

- [Report assembly](https://github.com/kacytran1122/sign_off/blob/main/backend/reports.ts): `backend/reports.ts`
- [Signed report publisher](https://github.com/kacytran1122/sign_off/blob/main/backend/report-publication.ts): `backend/report-publication.ts`
- [Hosted repair reports](https://github.com/kacytran1122/sign_off/blob/main/frontend/app/(workspace)/reports/%5Bkey%5D/page.tsx): `frontend/app/(workspace)/reports/[key]/page.tsx`
- [Repair workspace](https://github.com/kacytran1122/sign_off/blob/main/frontend/main.tsx): `frontend/main.tsx`

### Scoped agents

- [Agent orchestration](https://github.com/kacytran1122/sign_off/blob/main/backend/agents/index.ts): `backend/agents/index.ts`
- [Tool runtime](https://github.com/kacytran1122/sign_off/blob/main/backend/agents/runtime.ts): `backend/agents/runtime.ts`
- [Manager questions](https://github.com/kacytran1122/sign_off/blob/main/backend/agents/manager-questions.ts): `backend/agents/manager-questions.ts`

### Other components

- **Tenant**
- **Manager**
- **Building records and imagery**
- **Weather and map sources**
- **TimescaleDB**
- **Private R2 snapshots**

## Connections

- Tenant → Photon messaging: reports issue
- Manager → Photon messaging: sends commands
- Photon messaging → Message service: delivers messages
- Message service → Intake service: polls and receives (evidence: `backend/index.ts`)
- Intake service → Repair workflow: advances work order (evidence: `backend/index.ts`)
- Intake service → Agent orchestration: runs agent tasks (evidence: `backend/index.ts`)
- Repair workflow → Property configuration: checks property (evidence: `backend/workflow.ts`)
- Repair workflow → Safety guidance: uses repair guidance (evidence: `backend/workflow.ts`)
- Repair workflow → Inspection scheduling: parses visit (evidence: `backend/workflow.ts`)
- Manager → Repair workflow: confirms inspection
- Repair workflow → Work-order state: records status
- Repair workflow → Damage location: records damage point (evidence: `backend/index.ts`)
- Repair workflow → Building inspection evidence: gathers evidence (evidence: `backend/workflow.ts`)
- Repair workflow → Signed report publisher: publishes report
- Repair workflow → Tenant: requests confirmation
- Tenant → Repair workflow: confirms or reopens
- Agent orchestration → Tool runtime: runs tool loop (evidence: `backend/agents/index.ts`)
- Agent orchestration → Manager questions: answers questions (evidence: `backend/agents/index.ts`)
- Agent orchestration → Building inspection evidence: prepares evidence brief
- Manager questions → Work-order state: reads order details (evidence: `backend/agents/manager-questions.ts`)
- Building inspection evidence → Roof geometry: uses roof geometry (evidence: `backend/inspection.ts`)
- Building inspection evidence → Roof projection: uses roof projection (evidence: `backend/inspection.ts`)
- Building inspection evidence → Building records and imagery: matches property evidence
- Neighborhood context → Weather and map sources: uses outdoor context
- Neighborhood context → TimescaleDB: stores heat observations
- Neighborhood context → Houston 311 records: includes service counts
- Neighborhood context → Weather and map sources: uses satellite map
- Repair workflow → Neighborhood context: gathers neighborhood context
- Repair workflow → 3D repair rendering: queues render (evidence: `backend/workflow.ts`)
- Report assembly → Building inspection evidence: combines building evidence
- Report assembly → Neighborhood context: combines neighborhood evidence (evidence: `backend/area.ts`)
- Report assembly → 3D repair rendering: includes rendered model
- Signed report publisher → Private R2 snapshots: stores filtered snapshots
- Hosted repair reports → Signed report publisher: serves hosted report
- Repair workspace → Intake service: shows repair state
- Repair workspace → Building records and imagery: shows room evidence
