my role
Backend architect and developer

the project

Digital Democracy Project is a civic-data platform that polls registered voters about specific legislation, maps the results by legislative district, and compares that sentiment with representatives’ recorded votes.

I originally built the application in PHP and MariaDB. Most of the data model and business logic lived in SQL, while a fairly rough PHP application handled data retrieval and ETL. As the scope grew, that architecture became harder to extend and reason about.

the system

I moved the backend to Python, Django, and PostgreSQL. The current application has a 16-model domain architecture and more than 10,000 lines of Python covering ingestion, normalization, business rules, and data delivery.

Polling data arrives from Voatz through S3 and is processed by scheduled Celery tasks. A separate pipeline retrieves bills, representatives, and votes from OpenStates. Both flows are normalized in PostgreSQL and exposed through Django for Mapbox district views and scorecards.

supporting work

The supporting work includes a Voatz API emulator for development away from its IP-whitelisted production service, automation for retrieving legislative boundaries from U.S. Census TIGER/Line, ranked-choice voting support, and test utilities for the data pipelines.

decisions and current state

The main design challenge is that polling, legislative records, and district geography come from different sources and do not share one clean vocabulary. Keeping normalization in explicit application models made those relationships easier to inspect and change than the stored-procedure-heavy legacy design.

The resulting backend supports district-level polling maps and representative and bill scorecards. Work continues on a more complete queryable API for legislative data and integrations.