This repository contains the source code for NYSenate.gov, the official web application of the New York State Senate. NYSenate.gov is built on Drupal and serves as the chamber’s central digital presence.
New York State senators are tasked with representing 20 million citizens. This platform makes it easier for each and every citizen to participate in the legislative process, providing feedback to lawmakers on issues that matter to them. It also makes it easier for senators and staff to authentically consider and respond to the enormous volume of feedback they receive on a daily basis. Read more about NYSenate.gov’s unique functionality.
Why we publish this source code
For most products, NY Senate Technology Services publishes non-proprietary code on Github and welcomes issue reports and pull requests from external developers. The New York State Senate is an avid consumer of open source technology. Because public funds are used to for our projects, we return the source code to the public domain.
This repository is published primarily for academic purposes. Specifically, our goal is to share details of our approach with the broader Drupal community and with other local, state, and national legislatures that may be interested in implementing a similar system. To that end, we’d like to draw your attention to some of the custom aspects of our implementation. Here are a few highlights:
Open Legislation Integration
NYSenate.gov is a customer of the Open Legislation API (also created and maintained by NY Senate Technology Services). This service manages the full revision history of all official legislative documents in the NY State Legislature (more than 150,000 bills, laws, calendars, agendas, sponsor memos, etc.), and NYSenate.gov syncs with it every few minutes. You can explore key integration points in the following modules:
Bluebird CRM Integration
NYSenate.gov has a suite of CRM features built in to help senators and staff manage correspondence with their constituents. Additionally, NYSenate.gov supports a one-way sync to our full-featured internal constituent relationship management solution, Bluebird (also published by NY Senate on Github). We refer to the integration point as “the accumulator,” and it serves a transaction log of all relevant constituent activity on the web site to authorized clients.
Senate Address Geocoding Engine (SAGE) Integration
An important function of NYSenate.gov is classifying inbound constituents according to the New York State senator who represents them. Since representation is based on geography, this could not be done without SAGE, an open source geocoding service built and maintained by the New York State Senate. Every time a user signs up on NYSenate.gov, SAGE is called to match their address to a senate district. You can take a look at the integration point in the NYS SAGE module.
Mission-critical system notifications are published directly into our internal Slack channel. The function can be found here.
We welcome suggestions for future development in the issue queue. We would also appreciate meta-feedback on how we can make this repository more useful for developers. Here are a few things we hope to prioritize, but please let us know what else you would like to see.
Conspicuously missing from this repository is a link to a demo database. We suspect that it would be near impossible to get NYSenate.gov up and running on your local environment without a redacted database. Out of an abundance of caution to protect the political sentiments of the 110,000+ New Yorkers who have used this system to contact their senator, we have decided to phase in a redacted demo database at a later date.
This implementation is customized to serve the esoteric requirements of NY’s lawmaking process. We would love to generalize some of our custom modules so that they could serve as turnkey solutions for other legislatures looking to implement similar functionality. If you work with a legislature that would be interested in partnering with us, please get in touch.
This platform would not exist without conceptualization and ongoing stewardship from the web development team at the New York State Senate, ongoing Drupal consulting from Mediacurrent, product design and initial implementation from Code and Theory, and a challenging D6 -> D7 data migration executed by NuCivic (now Granicus). This project is hosted on Pantheon.
Of course, we’d be remiss not to recognize the members of the New York State Senate and the chamber leadership for their unwavering support and commitment to innovation in this space.
You can also reach our team on Twitter at https://www.twitter.com/nysenatetech.