-
Notifications
You must be signed in to change notification settings - Fork 6
NVRIS
KSVotes no longer uses NVRIS. This page is here for legacy reference only. See FormFiller instead.
The National Voter Registration Imaging Service (NVRIS) is a Node-based AWS Lambda. The code and service is maintained by GPS Impact.
This description of version 1 from @jakelowen.
It accepts a POST request:
{
"00_citizen_yes": true,
"00_citizen_no": true,
"00_eighteenPlus_yes": true,
"00_eighteenPlus_no": true,
"01_prefix_mr": true,
"01_prefix_mrs": true,
"01_prefix_miss": true,
"01_prefix_ms": true,
"01_suffix_jr": true,
"01_suffix_sr": true,
"01_suffix_ii": true,
"01_suffix_iii": true,
"01_suffix_iv": true,
"01_firstName": "Some",
"01_lastName": "Body",
"01_middleName": "Woodrow",
"02_homeAddress": "123 Main St.",
"02_aptLot": "303",
"02_cityTown": "Lawrence",
"02_state": "KS",
"02_zipCode": "66044",
"03_mailAddress": "123 Main St.",
"03_cityTown": "Lawrence",
"03_state": "KS",
"03_zipCode": "66044",
"04_dob": "02/07/1900",
"05_telephone": "785.555.5555",
"06_idNumber": "kxx-xxxx-xx",
"07_party": "democratic",
"08_raceEthnic": "Caucasian",
"09_month": "09",
"09_day": "17",
"09_year": "2017",
"A_prefix_mr": true,
"A_prefix_mrs": true,
"A_prefix_miss": true,
"A_prefix_ms": true,
"A_suffix_jr": true,
"A_suffix_sr": true,
"A_suffix_ii": true,
"A_suffix_iii": true,
"A_suffix_iv": true,
"A_firstName": "Some",
"A_lastName": "Body",
"A_middleName": "Woodrow",
"B_homeAddress": "123 Main St.",
"B_aptLot": "303",
"B_cityTown": "Lawrence",
"B_state": "KS",
"B_zipCode": "66044",
"D_helper": "Somebody Else",
"signature": "data:image/png;base64,[base64-encoded-string-here]"
}
The keys of that payload roughly correspond to the numbered sections of the federal voter registration form.
In the case of chekboxes it expects boolean values. In the case of form fields it expects strings. The only exception is the signature key which requires a data:image/png;base64 dataUri.
All fields all optional. The service only renders what is provided allowing for incomplete previews.
The service performs the following basic processes in this order:
- render the booleans and text fields on the a png base image of the federal form. Saves as png to ephemeral tmp/ file system.
- If signature field is present, render the signature to a png to ephemeral tmp/ file system.
- If 2 occurred, then overlay signature png on top of filled form png. Create new final png.
- Generate UUID to serve as file name. Upload to s3 bucket.
- respond to POST request with:
{
"filledForm": "https://voter-registration-forms.s3.amazonaws.com/${UUID}.png"
}
Where uuid is from Step 4 above.
The requester can then access the file at the URL provided for a limited timeframe.
This s3 bucket is public. However listing permissions are disabled. So you need to know the uuid to access the file.
The s3 bucket has a lifecycle rule enabled that automatically purges all files older than 24 hours.
Version 2 will have a similar API. The chief difference is that the PNG file will be returned in the JSON payload HTTP response, rather than written to a S3 bucket.
Version 2 will also offer the Kansas Advanced Ballot application. See https://github.com/BlueprintKansas/ksvotes.org/issues/30.