GithubHelp home page GithubHelp logo

colab-coop / hellovoter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ourvoiceusa/hellovoter

9.0 9.0 17.0 20.48 MB

HelloVoter App Suite. Contact your Reps. Canvass for any cause at zero cost.

Home Page: https://ourvoiceusa.org/hellovoter/

License: GNU Affero General Public License v3.0

JavaScript 97.03% Java 0.46% Objective-C 0.75% Ruby 0.48% Dockerfile 0.27% Shell 0.91% Starlark 0.09%

hellovoter's Introduction

colab-coop

Central repository for the colab.coop website.

Note: If you are a colab developer, this is but one piece of the larger colab-coop site puzzle. In addition to this, the main site repo, you will want to install several other programs on your local setup: colab-coop-form-api, which handles contact-form submissions, colab-coop-editor, which is a web-based editor for the site, and colab-coop-api, which is what the editor connects to to edit files on the site. Do take a look at the various branches. We will probably be working in the develop branch until release time.

clone the repo

$ git clone https://github.com/colab-coop/colab-coop.git

sass requires (on Debian based Linux):

$ sudo apt-get install ruby-dev
$ sudo gem install compass --pre

install deps (requires npm):

$ npm install

build site:

$ gulp

watch source and auto re-build:

$ npm run watch

run browsersync (serves, watches changes, autoreloads, syncs connected browsers):

$ npm run serve

auto-pull from github once every minute

$ npm run poll

hellovoter's People

Contributors

arik-so avatar azrap avatar bjacokes avatar brodavi avatar cooperka avatar jessanhq avatar joshmaker avatar jschider avatar jureursic avatar ken1286 avatar la avatar litenull avatar lperson avatar matthewjhough avatar sapraaman avatar shauminn-colab avatar whatsocks avatar zestyping avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

hellovoter's Issues

Block signups of BlockPower ambassadors on https://app.blockpower.vote/ambassadors

  • Add new backend env var: BLOCKPOWER_DUPLICATE_SIGNUP_CHECK with options true or empty
  • When env var is true, on signup check for a match on their phone number against "BlockPowerPhone" or their email address against "BlockPowerEmail"
  • If there is a match, throw an error which says It looks like you already have an account at https://app.blockpower.vote/blockpower. Please return to that site to login to your account.
  • If there is no match, allow them to sign up as usual

API to display all claimed Triplers data on admin dashboard

As an admin, I want to view a list of all Triplers on the admin dashboard as a complete list of Triplers as well as the set of Triplers per ambassador.

Build api to display Vote Tripler information on admin dashboard:

  • Voter ID (not id, don't know exact field name but many of them start with "LAL")
  • first_name
  • last_name
  • display_name
  • status (e.g. "confirmed")
  • phone
  • email
  • display_address
  • display_phone
  • city
  • state
  • zip
  • triplees
  • is_ambassador
  • is_ambassador_and_has_confirmed
  • id of ambassador who has claimed them

For reference, list of all Triplers:
Screen Shot 2020-09-24 at 5 18 00 PM

For reference, list of Triplers divided by status per ambassador:
Screen Shot 2020-09-24 at 5 18 09 PM

For reference, individual Tripler profile (editing capability in separate ticket)
Screen Shot 2020-09-24 at 5 18 20 PM

Env var updates: BLOC SMS copy, add KY to allowed states for BlockPower, turn emails on for NGP and CoC, and add new blocked carrier to all orgs

  1. BLOC:
    Update TRIPLER_CONFIRMED_AMBASSADOR_NOTIFICATION to "Way to go, {ambassador_first_name} — {tripler_first_name} confirmed that they’ll be a Vote Tripler and remind {triplee_1}, {triplee_2}, and {triplee_3} to vote in November. Go to https://blocbybloc.link/report to enter the time you worked. Then go to https://blocbybloc.link/platform to find more Vote Triplers!"

  2. BlockPower: Add "KY" to ALLOWED_STATES

  3. NGP and CoC: Turn on the emails to [email protected]

  4. Add BLOCKED_CARRIER to all orgs TextPlus - 360 Networks - SVR

Update Triplers CSV to include Triplee "Relationship"

As an organizer, I want to see the triplees' relationship to their tripler in the triplers.csv that I download from the admin dashboard.

Dependent upon frontend task: colab-coop/hello-voter#114

  • triplers.csv is generated on admin dashboard at /admin/#/csvs/
  • In CSV, for each tripler row, there is one column per triplee. Add the relationship status to each triplee as an additional hyphenated value following the true/false value on each tripler (which references the Housemate status)

Defect: Search/filter is always constrained by first 3 digits of zip code

  1. Enter a first AND last name and select no other filters then click Search (for example on stage2 Iva Becker)
  2. Results are only shown for triplers in my area (WI other), not including Iva who is in FL other
  3. Change the toggle to "Doesn't matter" and click Search. The search results still only yield triplers in my area
  4. Select FL other MSA from the filter then click Search. 0 results are found.

Expected: Only searching by first OR last name constrains the results to the first 3 digits of zip code

Defect: Fuzzy search on triplers has regressed, only exact matches yield results

  1. Enter a last name that you know exists in the database, e.g. on stage2 "Auer" or on BP stage "Turner" and hit enter to search
  2. See search results matching that search term as expected.
  3. Now change one letter in the last name and search again, e.g. on stage2 "Aier" or on BP stage "Terner" and hit enter to search
  4. No results are found.

Expected: The search used to be fuzzy where one character could be different in a given name and still pull results, as explained in step 3 above

On /blockpower send any new signups to "No New Signups" page

  • Add new env var REACT_APP_SIGNUP_REDIRECT with true or empty state
  • On /blockpower instance env var should be true. On all other instances, env var should be empty
  • When env var is set to true, redirect users who have no account to new "No New Signups" page after login. Existing users will be sent to /triplers as always
  • "No New Signups" page should have same layout as this page: https://github.com/colab-coop/hello-voter/pull/160/files and the following copy:
    Header
    We have closed new Voting Ambassador sign-ups on this site
    Body
    To sign up for a new Voting Ambassador account, please go to https://app.blockpower.vote/ambassadors

**Requires Neo4j experience: Design Database and API updates for city and age filtering on Tripler search

As an ambassador, I want to be able to filter the suggested triplers list I am shown or my tripler search results by city and age.

Background: We aren't currently importing city or age when we import Tripler CSVs, so the import script and data model will need to be update to accommodate these additional fields and other additional fields that are unrelated to adding city and age filtering on triplers search

  • Current user experience on /triplers/add lists 100 Triplers that are geographically closest to the Ambassador (based on lat/long) - requested from suggest-triplers API
  • Ambassador can search for either first or last name
    Reference screenshot

Screen Shot 2020-09-25 at 5 22 51 PM

**Desired user experience (for reference - not actually part of this ticket :) **:

  • Ambassador can filter their default Tripler list from suggest-triplers API or their search results according to certain parameters
  • Ambassadors should be able to select multiple filters at once in either case
  • Filters to add:
    City: In UI this would be a dropdown list of the top 100 cities that are in the Triplers data
    Age: In UI this would be a dropdown list of age ranges, e.g. 18-30, 31-40, 41-50, etc.

The goal of this ticket is to design the API updates to suggest-triplers and the triplers search based on the above desired UX and the amounts of data expected in each filter.

Prevent payouts for denied ambassadors

When an ambassador is denied, we should not allow future payouts to them from that point onward. None of their payouts should be moved to disbursed status once they're denied.

Email alert when ambassador enters a blocked carrier phone number

As an admin, I want to be notified each time an ambassador enters a blocked carrier phone number.

  • When an ambassador enters a phone number that is in the blocked carriers list (specified in backend env vars) either at signup or when contacting a tripler, send an email to the admins ([email protected] on prod)

The email should include:

  • Subject line: New Phone Number Error
  • All of the same fields as the "New Sign-up for BlockPower" or "New Tripler for BlockPower" email depending on when it is triggered, but with one additional field: Blocked Carrier which displays the blocked carrier the ambassadors tried to use that threw the error

Default to zip code lat/long on ambassador signup when no address match is found by census.gov API

As an ambassador, I want to sign up and have my location set based on zip code if I enter an address that isn't in the Census database.

  • When an ambassador signs up, their address is currently checked against census.gov API. The update here is if no match is found in census database, then we should default to using ambassador's zip code to set their latitude and longitude
  • Convert this zip/latlong dataset into a JSON object (Zip Code/LatLong Reference Dataset: https://public.opendatasoft.com/explore/dataset/us-zip-code-latitude-and-longitude/table/)
  • Reference the JSON object when fallback to zip code is needed for lat/long lookup

Additional fields to pass to triplers JSON and CSV

Add the following fields to Triplers JSON and CSV export:

  • Did tripler upgrade to ambassador - true/false
  • Did tripler upgrade to ambassador + confirmed ≥1 tripler - true/false
  • Ambassador phone number
  • Ambassador email address
  • Ambassador stripe id

Add detail to Error emails

  • Phone number is already in use - add all ambassador / tripler information we have at that point, including Ekata/twilio information
  • Sorry, but state employment laws don't allow us to pay Voting Ambassadors in your state. - add all ambassador data we have at that point including all Ekata and Twilio reverse lookup data
  • Invalid triper id - change to "tripler" in error message and add all tripler information we have at that point
  • Unable to update ambassador form data - add all ambassador information we have at that point, including Ekata/twilio information
  • Invalid status, cannot proceed - add all ambassador information we have at that point, including Ekata/twilio information

On emails that include blocked carriers field (New Signup & New Tripler Confirmed), include a list of all carriers that were attempted.

Tripler search should be slightly more strict when checking for name matches

As an ambassador, I want my search results to more closely match the name I entered while still allowing a bit of flexibility if I misspell the name or make a typo.

  • On tripler search, the results are currently not strict enough when allowing for 2 non-consecutive characters to differ within each name
  • We should update the search to allow only 1 character to differ per name

Defect: Tripler search should not be case-sensitive

  1. Find a name that appears in the suggest-triplers list that is in all caps, e.g. SHAUNA MINNING
  2. Search for the name in all lower case e.g. shauna minning
  3. SHAUNA MINNING will not be in the search results

Expected: Search results are not case-sensitive. Searching either SHAUNA MINNING, Shauna Minning, or shauna minning will all yield SHAUNA MINNING as a result

Check Tripler voter registration status against Alloy.us Verify API

As an ambassador I want to know if a Tripler I have claimed is registered or unregistered to vote.

Frontend ticket depends upon this ticket: colab-coop/hello-voter#115

  • Request API key & Secret from [email protected]
  • Using the Alloy.us Verify API, check the registration status for all claimed Triplers submitted
  • Required fields to pass to Verify for verification are first_name, last_name, address, city, state, and zip fields
  • Registration status will be displayed for each claimed tripler so their ambassador can be aware of their status
  • An indicator of registration status will need to be added to UI, for example in the row for Georgiana Batz in the example screenshot:

Screen Shot 2020-09-25 at 5 40 01 PM

Auto-deny ambassador when Ekata/Twilio verification comparison fails

  • When an ambassador submits a tripler contact form to initiate the start-confirm process, we check the phone number they entered against Ekata and Twilio caller ID APIs for verification
  • We want to add the ability to automatically check if the Tripler's first OR last name matches with any of the names in the Ekata and Twilio data and track that a match was not found
  • If no Ekata/Twilio matches are found for 6 confirmed triplers for that ambassador, auto-deny the ambassador (set flags Locked: true / Approved: false)

New ambassador signup: check for matching tripler record and if match is found, show their social matches in tripler selection list

As a new ambassador signup, I want to be matched with an existing tripler record in the database when my name and address are the same.

  • When a new ambassador signs up, check for matches of any triplers with identical First name AND last name AND address in the database upon signup
  • If a tripler record matches name and address, convert the tripler to an ambassador (similar to the tripler upgrade process)
  • When the ambassador then loads their list of suggested triplers on /triplers/add, they should see their social matches (edges) at the top of their suggested triplers list, followed by triplers sorted by distance (the ambassador will not be able to discern the difference between the social matches and the distance matches - there will be no visual distinction, just sorting of social matches to the top)

Update NGP payment env vars

  • NGP payment env vars should now be $25 instead of $15
  • PAYOUT_PER_TRIPLER and FIRST_REWARD_PAYOUT should both be updated to 2500

Auto-deny ambassador when they use blocked carrier on signup or start tripler confirm

As an admin, I want ambassadors who try to use blocked phone carriers on signup or tripler confirmation to get auto-denied so i don't have to manually review each potential fraud case and deny.

  • When an ambassador attempts to enter a blocked carrier either on signup or when contacting triplers for confirmation, their account should automatically be denied
  • The denial won't cause the ambassador to be logged out so if they are denied at the tripler confirmation step they would be able to continue confirming triplers during that session

Add 2 fields regarding tripler upgrades to ambassadors export apis

For the 2 ambassador export APIs (csv and json):

  • Add a field "Upgraded" with true for any triplers who have upgraded and false or null for any that haven't upgraded
  • Add a field "Upgraded and Confirmed ≥1 Tripler" with true for any triplers who have upgraded AND confirmed at least 1 tripler and false or null for any that haven't met the criteria

Exclude unreg triplers from suggest-triplers and tripler search results

As an ambassador, I don't want to see unregistered triplers in my default triplers list or my tripler search results.

  • Some triplers are unregistered to vote and we don't want ambassadors to spend time contacting them since the registration deadlines for most states is Monday October 5th.
  • We want to exclude all unregistered triplers from the default triplers list on/triplers/add, except for triplers in North Carolina and Alabama
  • We also want to exclude all unregistered triplers from the triplers search results on /triplers/add, except for triplers in North Carolina and Alabama
  • Unregistered triplers can be identified by the string Unreg in the 'voter_id' field in the database (tripler.get('voter_id'))

Update ambassadors.csv to include a few new columns

As an admin, I want to view more information about bank account id, ekata and twilio data and admin status in the ambassadors.csv.

  • Update ambassadors.csv to include the following new columns:
  1. Bank account id = display Bank account id from Plaid/Stripe
  2. Ekata data = display all Ekata data
  3. Twilio data = display all Twilio data
  4. Admin status = display Y if admin, N if not

Add city and state fields to "New Sign-Up for {Org Name} email

As an organizer, I want to see city and state fields in the New Sign-Up for {Org Name} emails.

  • In existing system-generated email with subject line New Sign-Up for {Org Name}, below Street Address field, add City field and State field beneath that.

node-cron jobs cannot be killed

Need to update cron jobs to stop on parent process termination. Most likely approach is to add a listener for SIGTERM process event and run the destroy method on the cron job when it is triggered.

Neo4j thread pool exhausted by async iterated loop in disbursement

The payouts callback iterates over all ambassadors and initiates an async call to get each one's triplers. Instead, should ideally be a single DB query followed by a loop to add all the jobs to the fifo buffer.

Also should set a count limit on # of payouts per run of the payouts function, so we can limit to 100 or so per run.

Finally should change the cron scheduling code so that the config param is the full cron schedule string (eg "0 0 2-6 * * *") instead of an int that is divided by seconds.

Defect: Invalid zip codes pass signup validation

  1. On /ambassador/signup enter an invalid zip code, e.g. 00000 when entering address and click Submit
  2. Signup form validation passes and /home loads

Expected: Invalid zip code should be caught in server validation of signup form. Show user an error "Sorry, we don't recognize that zip code. Please try again"

Transform Ambassador "State" Field to Uppercase Before Committing to DB

Summary

As a HelloVoter admin, I want clean/uniform State date for all Ambassadors so that I don't have to account for any inconsistencies in application design and data analyses.

Requirements

  • All Ambassador "State" data (state as in Florida, not state in the software development sense) is committed to the database as uppercase even if the Ambassador entered their "State" information as lowercase or some combination of uppercase & lowercase
  • This change is necessary because of colab-coop/hello-voter#121

Update BLOC SMS copy

TRIPLER_CONFIRMATION_MESSAGE: "{tripler_first_name}, thanks for agreeing to be a Vote Tripler with {ambassador_first_name}! By reminding {triplee_1}, {triplee_2}, and {triplee_3} to vote before Election Day on Tuesday, November 3, you're helping build political power in our community. Reply YES if you're in!"

TRIPLER_REMINDER_MESSAGE: "Hey {tripler_first_name}, {ambassador_first_name} from BLOC said you pledged to remind {triplee_1}, {triplee_2}, and {triplee_3} to vote in the election in November. It's an important one, and we need everyone's help. If you're in, reply YES"

AMBASSADOR_APPROVED_MESSAGE: "Congratulations, {ambassador_first_name}, you're ready to start recruiting triplers and earning money! GO to https://blocbybloc.link/join to start looking for people from BLOC's list."

AMBASSADOR_SIGNUP_MESSAGE: "Welcome {ambassador_first_name}! You're ready to start earning money and serving your community as a Vote Leader. Go to https://blocbybloc.link/join to start recruiting Vote Triplers!"

TRIPLER_RECONFIRMATION_MESSAGE: "Hi {tripler_first_name}, are you willing to remind {triplee_1}, {triplee_2}, and {triplee_3} to vote in the next election in November? Please reply just YES or NO"

NEW_AMBASSADOR_SIGNUP_ADMIN_EMAIL_SUBJECT: "New Sign-Up for BLOC"

NEW_AMBASSADOR_SIGNUP_ADMIN_EMAIL_BODY: "New Vote Leader {ambassador_name} has signed up for BLOC."

TRIPLER_CONFIRM_ADMIN_EMAIL_SUBJECT: "New Tripler for BLOC"

TRIPLER_CONFIRM_ADMIN_EMAIL_BODY: "New tripler {tripler_name} has confirmed for BLOC thanks to {ambassador_name}. {tripler_name}'s phone number is {tripler_phone} and they are talking to these 3 Voters: {triplee_1}, {triplee_2}, and {triplee_3}."

TRIPLER_UPGRADE_MESSAGE: "Thanks for confirming. Did you know you can also be a Vote Leader like {ambassador_first_name} and earn money recruiting Vote Triplers of your own? If you're interested, go to https://blocbybloc.link/join to get started! Also, if you have any questions about voting or want to vote from home, go to https://myvote.wi.gov."

UPGRADE_SMS_WAITING_PERIOD=1

TRIPLER_CONFIRMED_AMBASSADOR_NOTIFICATION: "Way to go, {ambassador_first_name} — {tripler_first_name} confirmed that they’ll be a Vote Tripler and remind {triplee_1}, {triplee_2}, and {triplee_3} to vote in November. Go to https://blockbybloc.link/report to enter the time you worked. Then go to https://blocbybloc.link/platform to find more Vote Triplers!"

REJECTION_SMS_FOR_TRIPLER
"Sorry for bothering you! We’ll remove you from receiving any further communications from us. If you have any questions about voting or want to vote from home, go to https://myvote.wi.gov."

REJECTION_SMS_FOR_AMBASSADOR
"Sorry, {ambassador_first_name}, but we could not confirm {tripler_first_name} as a Vote Tripler. To find and recruit other Vote Triplers, go to https://blocbybloc.link/platform."

Add Ekata and Twilio column to the triplers.csv

As an admin, I want to view the Ekata and Twilio data for the phone number entered for a Tripler in the triplers.csv

  • In triplers.csv, add a Verification column with all Ekata and Twilio reverse phone lookup data for the phone number that was entered for that Tripler by the ambassador.

Update env vars to include full state names

As an ambassador, I want to be able to type a full state name in the signup form State field.

  • BlockPower: Add the following state names to the ALLOWED_STATES env var: Arizona,Florida,North Carolina,South Carolina,Georgia
    Ensure that the State field on signup forces capitalization on anything typed into it / gets converted on backend (#48)
  • BLOC: Add the following state name to the ALLOWED_STATES env var: Wisconsin
  • NGP: Add the following state name to the ALLOWED_STATES env var: Georgia
  • CoC: Add the following state name to the ALLOWED_STATES env var: Florida

Send admin email when a tripler upgrades to ambassador

As an admin, I want to know when a tripler upgrades to become an ambassador.

  • Send email to admins each time a tripler upgrades to become an ambassador
  • Email should include full data on ambassador (can model from New Sign-up for {Org Name} email)
  • Add field Referring Ambassador and the name of the upgraded ambassador's former ambassador. Add field at top of email above new ambassador data

Email alert indicating admin upgrade

As an admin, I want to be alerted when an ambassador is upgraded to admin status.

  • Send an automated email (on Production servers these go to [email protected]) when an ambassador is made an admin
  • The email should include the following content:
    Subject line: New Admin for {ORGANIZATION_NAME}
    Body: Display identical fields to the existing New Sign-Up for {ORGANIZATION_NAME} email

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.