Project for UC Berkeley IEOR 185 Sp'16: Challenge Lab (Social Entrepreneurship); Sponsored by Twilio.org
Central is a platform that seeks to increase the efficiency of post-disaster responses by seamlessly connecting local unaffiliated volunteers in disaster-impacted areas with organizations providing emergency response services therefore facilitating a response and reconstruction process that engages and involves local communities, local skills and local knowledge and the overall creation of a more efficient and less wasteful response system.
Members
- Project Manager: Ryan Au
- Head of Engineering: Alec Spencer
- Designer: Youwei Du
- Developer: Akari Asai
- Marketing Manager: Spandi Singh
- Partnerhsip Manager: Ed Kim
Central is a single page web application built using Ruby on Rails as an API and React.js implemented with Flux pattern. It also incorporates Twilio SMS services as the main way form of communication with our users.
Target Audience: User (Rescue Organization) & Volunteer (Spontaneous volunteers during disasters)
Objective: Central enables one-way communication from Organizations to Volunteers through Twilio SMS API
Features
- Admin
- Admin can create, read events (disaster)
- Admin can archive events
- Admin can read, edit reports (digest)
- Admin can dispatch reports manually
- Admin can read messages (message in a digest)
- Admin can approve messages
- Admin can create, read events (disaster)
- User (organization)
- User can read events
- User can activate events
- User can read reports
- User can create, read, update, delete messages
- User can submit messages for approval
- User can read events
- Volunteer
- Volunteer can sign up through the website
- Volunteer can receive report through SMS
Objective: Central enables two-way communication between Organizations and Volunteers through a Questionnaire-type SMS conversation, so Organizations can gather Responses from the Volunteers
Features
- Admin
- Admin can read Questionnaire created by User
- User (organization)
- User can create, read Questionnaire
- User can create, read, update, delete Questions
- User can specify Question types: (expecting a certain kind of response)
- Boolean Yes/No
- Numeric
- Strings
- Cancel command
- Stop command
- User can read Responses from Volunteers for each Question
- User can create, read Questionnaire
- Volunteer
- Volunteer can reply with shortcode for follow up information of a Message in the Report
- Volunteer can reply with Responses for a Question in the Questionnaire
Clone this repo.
To start Rails API, run bundle install to install the gems needed, then rake db:create, then rake db:migrate then seed data with rake db:seed, then rails s
To start React.js frontend, run npm install, then npm run watch. Note the browser will auto-refresh when changes are made in the /client folder
To start Redis server for Sidekiq, run redis-server
To start Sidekiq for background processing (sms outbound messages), run bundle exec sidekiq
If you want to experience the SMS capability through Twilio, add .env file in the root with your Twilio credentials.
TWILIO_PHONE=
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
Open up http://localhost:8080 to access the app.
V0.0: Rails Skeleton Setup + React.js Skeleton with React Router + Flux with Alt.js + Webpack Configuration (3/5/2016)
- Set up Rails as an API
- Configure basic Ruby Gems needed
- Create
webpack.config+package.jsonfor React frontend - Set up Flux structure using Alt.js
- Configure settings for React Router
- Configure Devise Auth Token in Rails API
- Create
UserandAdminmodel - User/Admin sign up/sign in page
- Account confirmation email using Letter Opener Gem in development
- Create helper files for API Requests and API Constants (api endpoints)
- Configure AJAX Requests with token info in headers + set up errorhandlers for taostr notifications
- Create landing page
- Admin can view existing events
- Admin can create events
- Admin can archive events
- Configure serializers to render JSON response
- Set up events components
- Modify navbar in landing page
- Admin can view existing reports (digests)
- Admin can approve messages in a report
- User can compose one new message in report
- User can edit message, which requires re-approval from Admin
- Namespace components into Admin and User
- Set up Twilio gem and Sidekiq for background process
- Admin can dispatch digest with approved messages
- Report is sent to registered
Volunteerthrough SMS - Add auto generate first digest
- Add auto generate subsequent digest after the previous one is sent
- Add transition phase on frontend while digest is being sent through Twilio
- Anyone can sign up on the website through landing page
- Add unique validation for volunteer/phone number
- Configure multi buildpacks
- Configure webpack
- Add
client_app_controlleras catch all routes from backend API; delegates routing toreact-router - Add
public/index.htmlto mount frontend
- Admin can edit report
- User can add a
Taskconsisting of manyQuestions - Volunteer can receive a text digest and reply with a replycode for more info
- Volunteer can text back for and saved as responses in the database
-
ReportVolunteerLogkeeps track of volunteers who should have received a digest
- Just magic ;)
- Add
Task Typemodel to categorize tasks if there are to be more tasks in the future - User can create tasks
- User can view individual
Task