← Back to Daily Builds

Daily build note · April 25, 2026

DistrictPulse: AI Legislative Digest by Zip Code

A national, email-first product that takes a user's ZIP code, resolves it to their actual representatives across state and federal chambers, and delivers a plain-English weekly digest of...

Civic Tracking Runnable local MVP built Live public demo

What shipped

This build delivers a runnable DistrictPulse sandbox MVP directly in the build directory. It includes:

  • A local HTTP app with a landing page, ZIP preview, and subscription form
  • An end-to-end digest pipeline that resolves representatives, loads recent bills, summarizes them, and generates an email
  • A preview outbox for HTML digest emails when Resend is not configured
  • Batch and one-off CLI scripts for digest generation
  • Seeded demo data so the app works without any external services
  • Smoke and test coverage for the core path

Architecture

  • Zero-dependency Node app: chosen to keep setup friction close to zero and make the build easy to inspect.
  • Provider adapters with graceful fallback: demo mode is the default and always works; live mode uses configured APIs and falls back when a provider is missing or errors.
  • Local JSON persistence: subscriptions and digest logs are stored under data/runtime instead of adding a database during the sandbox pass.
  • HTML email rendering without framework dependencies: keeps the digest easy to preview locally and easy to swap for React Email later if the product hardens.

Trimmed scope

The brief covered a larger product than was practical for a single focused sandbox build. I intentionally trimmed to:

  • ZIP preview plus digest generation, without auth or account management
  • Local persistence instead of Supabase
  • Manual batch replay via script instead of scheduled infrastructure
  • Email preview plus optional Resend delivery, without domain or unsubscribe plumbing
  • Seeded district and bill coverage for a narrow demo set instead of national production completeness

Limitations

  • Demo mode only supports seeded ZIPs 30318 and 10001.
  • Live representative lookup uses Google Civic if configured; it is not a full national district engine.
  • Live LegiScan calls require known legiScanPersonId mappings, which this MVP does not discover automatically.
  • Anthropic summaries and Resend sends are optional integrations and were not exercised in this sandbox environment.
  • There is no billing, auth, or user-facing dashboard beyond the local landing page.

Suggested next steps

  1. Replace local JSON storage with Supabase tables for users, reps, subscriptions, and bill cache.
  2. Add a durable legislator mapping layer so live rep resolution can attach LegiScan person IDs reliably.
  3. Move the digest HTML into React Email once the template is stable.
  4. Add split-ZIP handling with address disambiguation.
  5. Add scheduled execution and delivery analytics after the live pipeline is stable.