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:
demomode is the default and always works;livemode uses configured APIs and falls back when a provider is missing or errors. - Local JSON persistence: subscriptions and digest logs are stored under
data/runtimeinstead 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
30318and10001. - Live representative lookup uses Google Civic if configured; it is not a full national district engine.
- Live LegiScan calls require known
legiScanPersonIdmappings, 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
- Replace local JSON storage with Supabase tables for users, reps, subscriptions, and bill cache.
- Add a durable legislator mapping layer so live rep resolution can attach LegiScan person IDs reliably.
- Move the digest HTML into React Email once the template is stable.
- Add split-ZIP handling with address disambiguation.
- Add scheduled execution and delivery analytics after the live pipeline is stable.