john / drive.vote Goto Github PK
View Code? Open in Web Editor NEWDrive the Vote arranges free rides to the polls on election day.
Home Page: https://www.drive.vote/
Drive the Vote arranges free rides to the polls on election day.
Home Page: https://www.drive.vote/
A system-wide admin page for use by DevProgress staff so we can see if ride zones are overloaded, etc.
See /admin/ride_zones
There is now a ride-zone specific ride scheduler for voters. It creates a ride and a conversation and sends a confirming text. This is just a reminder to make sure the conversation ends up in information complete lifecycle so any text from voter goes to "needs help" and doesn't start the bot.
Be sure to use Ruby 2.3.1, and add these add-ons:
Just texted the app, which behaved perfectly--but it took me a few minutes to realize that, because when viewing the dashboard, as opposed to the modal, it's pretty subtle when a a new message has come in. This may especially be the case when the row is in 'alert' status--the red background makes it hard to read new text, which is especially an issue because that's exactly when you most need to read it.
A dispatcher will be looking at a large map UI, with pins showing locations of drivers and rides for voters. The map needs to respond to update events about each driver and ride (ride events and driver events), which will be sent via a websocket.
Implement a sample page with a map showing drivers and rides that can be manipulated via a simple Javascript API with new ride and driver information. Adjust the appearance of pins so a dispatcher can find interesting points, such as:
active_ride = null
), to send them somewhere or assign them something.status = "driver_assigned"
) with a driver assigned to that ride.status = "waiting_assignment"
) .Markers on the map should have a meaningful hover state, possibly with a tooltip.
Do this work inside public/map
next to the existing Map code. Then, @geraldhuff can connect to the new code as part of eventReceived()
in dispatch.js
.
When creating a ride zone, allow the DtV admin to optionally create a new user at the same time, and give that person admin privileges just for the rz being created.
Cell B12 from https://docs.google.com/spreadsheets/d/1ye8kV01ss17R7Imhmkh_7pw5-aLnWpcBizKvgaCr5FA/edit#gid=0
@john Can you expand on what this means?
A small box under the map, something like:
Riders: | Drivers: |
---|---|
() = Rider waiting assignment | () = Available Driver |
() = Rider waiting pickup | () = Assigned Driver |
() = Rider overdue assignment | () = Unassigned Driver |
() = Rider overdue pickup |
Should use the ride zone slug, and be more human-readable. Right now it's:
/users/sign_up?zone=7
Should be something like:
/volunteer_to_drive/toledo_oh
Issue with Devise prevented this from being done initially.
It's gonna get long.
Right now our admin pages are only for internal DevPro use. We need to add an admin page for each ride zone, so dispatchers/rz admins can see their stuff, but no one else's. Admin page should include:
There are more but that's off the top of my head.
Question: are all dispatchers also ride zone administrators, or should they be separate roles?
Need to figure out if Rails.configuration should hold logger to make it accessible
We're on 2.2.5. I think the latest table is 2.3.1?
While it won't test twilio interactions, we should be able to multithread the simulator and fake thousands of simultaneous operations
Thanks!
Per discussion with @decause and others on demo call from Wed Aug 29, it's clear we need documented stats and data regarding capacity, failure modes, and threat models. Completely valid diligence.
Starting this issue to try and create a burn-down list of what stats we are collecting so we don't accidentally spend time collecting/documenting/examining the wrong thing.
Let's keep this top-level bullet as a summary burndown list and use the comment thread for discussion.
Live burndown list (anyone should feel free to edit):
If the definition changes for an old simulation it should gracefully handle that.
Create assets.drive.vote domain, backed by Cloudfront/S3, then create CSP policy restricting to that domain.
Would add some security, and also simplify deployment of the driver app, which is a React app (ie all client-side) which lives in a separate repo from the dispatcher app. The dispatcher app serves an html wrapper from https://drive.vote/driving, which loads the React app
But we need to have it be nullable or take a value to indicate to bot it isn't set yet
There's a lot right now, makes it hard to read the map, and the whole dispatch page.
When driver location is updated, it checks the roles table to see if the user is a driver to determine if it should broadcast a “driver updated” event
we can save a joined SELECT by storing the driver’s ride zone in the user record
this would need to be maintained on any rolify change (add/remove of roles)
We can test using the simulation for the DB layer, but it'd be good to test it black-box via http.
Do it using the AWS ElasticBeanstalk setup. Also do it on Heroku to get stats on the platform difference.
The SimDefinition yml file can define ride zone characteristics and the Simulation can create the ride zone if it doesn't exist.
Link to /users/sign_in. Needed primarily for dispatchers.
Right now the select for drivers and dispatchers loads all Users in the db. Should scope to only offer Users within the vicinity of the ride zone, maybe 100 miles.
Tracking ticket for AWS move.
Current issues:
Facts:
Albert hypothesis:
You likely will need 2 budgets. One for the dev enviornment that should just be some sort of flat amount that's buying freedom for the devs. The second should be for a real prod environment that's based on real number gathered from load testing on a dev environment.
You likely only want 1 AWS account (maybe 2?) and then give each group their own VPC within that account. What you do NOT want to do is create and pay for 1 AWS account per app.
Create Test plan?
Execute it?
Not sure exactly what the desired behavior is here, but drivers and voters probably need a way to communicate directly.
One option would be to display the voter's phone # in the driver app and hand off to the phones native messaging client. Pro: probably the easiest. Con(?): privacy concern of sharing numbers? Also, that conservation wouldn't be available to the app (and dispatchers)
2nd option, route everything through Twlio. Con: presumably way more work. Though I guess we could still use the native messaging app on the drivers phone, with the special number
https://drive.vote/users/sign_up. Probably api key issue with google places API.
Same as users have. Use Phony for normalization.
Right now volunteer drivers enter the system with an :unassigned_driver role. There needs to be an admin page where ride zone admins can see all volunteers, vet them in any way they want, and then promote them to the :driver role.
When blacklisted no conversation or message is created, isn't displayed in dispatcher UI. Though we may want to log SMSs from blacklisted numbers.
If an ride zone has low ride demand, high dispatch capability, and/or is seeing high abandonment rates with the bot, they might want to disable it.
Pointers:
rails g migration AddBotDisabledToRideZone
add_column :ride_zones, :bot_disabled, boolean
In twilio_service.rb ~ line 23 add a check for @ride_zone.bot_disabled
On the dispatch/show view page add a button to enable/disable the bot boolean
In api/v1/ride_zones_controller.rb add endpoint to enable(true/false) the bot which updates the DB
Closely related to #150. Need to:
Use github protected branches to disable merge commit for master
and production
. Also force CI to be green.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.