# htownz/hogan-legacy architecture

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

- Interactive diagram: https://gitdiagram.com/htownz/hogan-legacy
- Repository: https://github.com/htownz/hogan-legacy

## Overview

This repository is a civic and legislative intelligence platform: people explore bills and legislators, receive policy alerts and analysis, then participate through annotations, sharing, and organized civic action. The tree also shows a distinct policy-intelligence application for monitoring matters, source documents, watchlists, alerts, and briefs. Sampled source confirms browser requests use fetch and policy-intelligence routes invoke brief generation and feed jobs; other feature links are based on the tree, not inspected implementations. The README is empty, so documented capability coverage comes from the source tree.

Main entry points: [`client/src/App.tsx`](https://github.com/htownz/hogan-legacy/blob/master/client/src/App.tsx) (App routes), [`server/policy-intel/routes.ts`](https://github.com/htownz/hogan-legacy/blob/master/server/policy-intel/routes.ts) (Policy intel routes), [`server/storage.ts`](https://github.com/htownz/hogan-legacy/blob/master/server/storage.ts) (Core data access), [`server/services/advanced-bill-analysis-engine.ts`](https://github.com/htownz/hogan-legacy/blob/master/server/services/advanced-bill-analysis-engine.ts) (Bill analysis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Civic web app"]
  node_app["App routes<br/>[App.tsx]"]
  node_api["API requests<br/>[queryClient.ts]"]
end

subgraph group_intelligence["Legislative intelligence"]
  node_legis_pages["Legislation views<br/>[legislation.tsx]"]
  node_bill_analysis["Bill analysis"]
  node_legislator_views["Legislator profiles<br/>[legislators.tsx]"]
  node_alerts["Bill alerts<br/>[bill-alerts.tsx]"]
  node_recommendations["Bill recommendations"]
  node_analytics["Impact analytics"]
end

subgraph group_engagement["Civic participation"]
  node_annotations["Bill annotations"]
  node_circles["Action circles<br/>[action-circles.tsx]"]
  node_warroom["Campaign workspace<br/>[war-room-routes.ts]"]
  node_social["Social connections"]
end

subgraph group_policy["Policy monitoring"]
  node_policy_ui["Policy intel client<br/>[App.tsx]"]
  node_policy_api["Policy intel routes<br/>[routes.ts]"]
  node_policy_engine["Alert and brief services<br/>[alert-service.ts]"]
  node_policy_db[("Policy intel database<br/>[db.ts]")]
  node_feed_jobs["Source feed jobs<br/>[run-tlo-rss.ts]"]
end

subgraph group_persistence["Data services"]
  node_server["Application API<br/>[index.ts]"]
  node_storage["Core data access<br/>[storage.ts]"]
  node_database[("Application database<br/>[db.ts]")]
end

node_resident(("Civic user"))
node_anthropic{{"Anthropic Claude"}}
node_pinecone[("Pinecone")]

node_resident -->|"uses"| node_app
node_app -->|"routes to"| node_legis_pages
node_app -->|"routes to"| node_legislator_views
node_app -->|"routes to"| node_alerts
node_app -->|"routes to"| node_recommendations
node_app -->|"routes to"| node_analytics
node_app -->|"routes to"| node_annotations
node_app -->|"routes to"| node_circles
node_app -->|"configures queries"| node_api
node_api -->|"fetches requests"| node_server
node_server -->|"uses storage"| node_storage
node_storage -->|"queries"| node_database
node_legis_pages -->|"presents analysis"| node_bill_analysis
node_bill_analysis -.->|"analyzes with"| node_anthropic
node_bill_analysis -.->|"queries similar bills"| node_pinecone
node_policy_ui -->|"requests policy data"| node_policy_api
node_policy_api -->|"generates briefs"| node_policy_engine
node_policy_api -->|"reads and writes"| node_policy_db
node_policy_api -->|"runs feed job"| node_feed_jobs
node_policy_engine -->|"processes alerts"| node_policy_db
node_warroom -->|"uses storage"| node_storage
node_social -->|"uses storage"| node_storage

click node_app "https://github.com/htownz/hogan-legacy/blob/master/client/src/App.tsx"
click node_api "https://github.com/htownz/hogan-legacy/blob/master/client/src/lib/queryClient.ts"
click node_legis_pages "https://github.com/htownz/hogan-legacy/blob/master/client/src/pages/legislation.tsx"
click node_bill_analysis "https://github.com/htownz/hogan-legacy/blob/master/server/services/advanced-bill-analysis-engine.ts"
click node_legislator_views "https://github.com/htownz/hogan-legacy/blob/master/client/src/pages/legislators.tsx"
click node_alerts "https://github.com/htownz/hogan-legacy/blob/master/client/src/pages/bill-alerts.tsx"
click node_recommendations "https://github.com/htownz/hogan-legacy/blob/master/client/src/pages/recommendations.tsx"
click node_analytics "https://github.com/htownz/hogan-legacy/blob/master/client/src/pages/legislative-impact.tsx"
click node_server "https://github.com/htownz/hogan-legacy/blob/master/server/index.ts"
click node_storage "https://github.com/htownz/hogan-legacy/blob/master/server/storage.ts"
click node_database "https://github.com/htownz/hogan-legacy/blob/master/server/db.ts"
click node_annotations "https://github.com/htownz/hogan-legacy/blob/master/client/src/pages/collaborative-annotations.tsx"
click node_circles "https://github.com/htownz/hogan-legacy/blob/master/client/src/pages/action-circles.tsx"
click node_warroom "https://github.com/htownz/hogan-legacy/blob/master/server/routes/war-room-routes.ts"
click node_social "https://github.com/htownz/hogan-legacy/blob/master/server/routes/social-network-routes.ts"
click node_policy_ui "https://github.com/htownz/hogan-legacy/blob/master/client-policy-intel/src/App.tsx"
click node_policy_api "https://github.com/htownz/hogan-legacy/blob/master/server/policy-intel/routes.ts"
click node_policy_engine "https://github.com/htownz/hogan-legacy/blob/master/server/policy-intel/services/alert-service.ts"
click node_policy_db "https://github.com/htownz/hogan-legacy/blob/master/server/policy-intel/db.ts"
click node_feed_jobs "https://github.com/htownz/hogan-legacy/blob/master/server/policy-intel/jobs/run-tlo-rss.ts"

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_app,node_api,node_resident toneBlue
class node_legis_pages,node_bill_analysis,node_legislator_views,node_alerts,node_recommendations,node_analytics,node_pinecone toneAmber
class node_annotations,node_circles,node_warroom,node_social toneMint
class node_policy_ui,node_policy_api,node_policy_engine,node_policy_db,node_feed_jobs toneRose
class node_server,node_storage,node_database,node_anthropic toneIndigo
```

## Components

### Civic web app

- [App routes](https://github.com/htownz/hogan-legacy/blob/master/client/src/App.tsx): `client/src/App.tsx`
- [API requests](https://github.com/htownz/hogan-legacy/blob/master/client/src/lib/queryClient.ts): `client/src/lib/queryClient.ts`

### Legislative intelligence

- [Legislation views](https://github.com/htownz/hogan-legacy/blob/master/client/src/pages/legislation.tsx): `client/src/pages/legislation.tsx`
- [Bill analysis](https://github.com/htownz/hogan-legacy/blob/master/server/services/advanced-bill-analysis-engine.ts): `server/services/advanced-bill-analysis-engine.ts`
- [Legislator profiles](https://github.com/htownz/hogan-legacy/blob/master/client/src/pages/legislators.tsx): `client/src/pages/legislators.tsx`
- [Bill alerts](https://github.com/htownz/hogan-legacy/blob/master/client/src/pages/bill-alerts.tsx): `client/src/pages/bill-alerts.tsx`
- [Bill recommendations](https://github.com/htownz/hogan-legacy/blob/master/client/src/pages/recommendations.tsx): `client/src/pages/recommendations.tsx`
- [Impact analytics](https://github.com/htownz/hogan-legacy/blob/master/client/src/pages/legislative-impact.tsx): `client/src/pages/legislative-impact.tsx`

### Civic participation

- [Bill annotations](https://github.com/htownz/hogan-legacy/blob/master/client/src/pages/collaborative-annotations.tsx): `client/src/pages/collaborative-annotations.tsx`
- [Action circles](https://github.com/htownz/hogan-legacy/blob/master/client/src/pages/action-circles.tsx): `client/src/pages/action-circles.tsx`
- [Campaign workspace](https://github.com/htownz/hogan-legacy/blob/master/server/routes/war-room-routes.ts): `server/routes/war-room-routes.ts`
- [Social connections](https://github.com/htownz/hogan-legacy/blob/master/server/routes/social-network-routes.ts): `server/routes/social-network-routes.ts`

### Policy monitoring

- [Policy intel client](https://github.com/htownz/hogan-legacy/blob/master/client-policy-intel/src/App.tsx): `client-policy-intel/src/App.tsx`
- [Policy intel routes](https://github.com/htownz/hogan-legacy/blob/master/server/policy-intel/routes.ts): `server/policy-intel/routes.ts`
- [Alert and brief services](https://github.com/htownz/hogan-legacy/blob/master/server/policy-intel/services/alert-service.ts): `server/policy-intel/services/alert-service.ts`
- [Policy intel database](https://github.com/htownz/hogan-legacy/blob/master/server/policy-intel/db.ts): `server/policy-intel/db.ts`
- [Source feed jobs](https://github.com/htownz/hogan-legacy/blob/master/server/policy-intel/jobs/run-tlo-rss.ts): `server/policy-intel/jobs/run-tlo-rss.ts`

### Data services

- [Application API](https://github.com/htownz/hogan-legacy/blob/master/server/index.ts): `server/index.ts`
- [Core data access](https://github.com/htownz/hogan-legacy/blob/master/server/storage.ts): `server/storage.ts`
- [Application database](https://github.com/htownz/hogan-legacy/blob/master/server/db.ts): `server/db.ts`

### Other components

- **Civic user**
- **Anthropic Claude**
- **Pinecone**

## Connections

- Civic user → App routes: uses
- App routes → Legislation views: routes to
- App routes → Legislator profiles: routes to
- App routes → Bill alerts: routes to
- App routes → Bill recommendations: routes to
- App routes → Impact analytics: routes to
- App routes → Bill annotations: routes to
- App routes → Action circles: routes to
- App routes → API requests: configures queries
- API requests → Application API: fetches requests
- Application API → Core data access: uses storage
- Core data access → Application database: queries
- Legislation views → Bill analysis: presents analysis
- Bill analysis → Anthropic Claude: analyzes with
- Bill analysis → Pinecone: queries similar bills
- Policy intel client → Policy intel routes: requests policy data
- Policy intel routes → Alert and brief services: generates briefs
- Policy intel routes → Policy intel database: reads and writes
- Policy intel routes → Source feed jobs: runs feed job
- Alert and brief services → Policy intel database: processes alerts
- Campaign workspace → Core data access: uses storage
- Social connections → Core data access: uses storage
