Code Monkey home page Code Monkey logo

wecansavedemocracy's Introduction

We Can Save Democracy

Summary

Web application to be hosted at "WeCanSaveDemocracy.org" to help citizens take political action on progressive issues by selecting from a list of available actions and events, and then adding that list of actions and events to their personal calendar (Google, Outlook, Apple, Yahoo, .ics download, etc).

The API for the actions and events is served via (don't laugh) WordPress using the "WP REST API" plugin. This allows us to quickly create new entities and add a remove new fields. Removing the need to create an admin panel for data entry by non-technical users reduces the scope and timeline of the project by (what I estimate as) over 50%.

Primary User Story

  1. User clicks "Add Action" button on homepage
  2. User checks the checkboxes for the causes they are interested in
  3. The user sees a list of actions corresponding to the causes they selected
  4. The list of actions is sorted by time commitment, from least to most time
  5. There are 2 radio buttons that allow the user to re-sort the list from most to least time commitment
  6. The user clicks the "Add Action" button to select the action they want to add to their list
  7. If the action involves contacting a government official, they are taken to a page where they can add the representatives who represent their home address, and they can select as many of those representatives as they like. Once they select their representative(s), then their they add the action to the list from a button at the bottom of the page
  8. Once an action is added, the user is taken back to the home screen/master list, and repeats the process to add as many actions as they like.
  9. By default, any action that is not an event, defaults to being set to today's date. The user can click an "edit" button in the table row, which will allow them to change the start date, start time, and time commitment.
  10. Once the user has added all of their actions/events, then they can click on an "add to calendar" button at the top of the page to add the list to the calendar of their choice.

Wireframes here: https://docs.google.com/drawings/d/18aKq4ts9mo3d7j8q8ND-WAyaTnrhyrEH23iaM0WSb94/edit

###Getting Started###

First, create a fork of this repo.

Once you've cloned the repo from your fork, install dependencies, then start the npm process with the following:

	> git clone [email protected]:november9/wecansavedemocracy.git
	> cd wecansavedemocracy
	> npm install
	> npm start

or

	> git clone [email protected]:november9/wecansavedemocracy.git
	> cd wecansavedemocracy
	> yarn
	> yarn start

Please use yarn when adding new modules so that the lock file gets updated properly.

wecansavedemocracy's People

Contributors

jktravis avatar november9 avatar street-lit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

wecansavedemocracy's Issues

CSS and HTML Implementation of new mockups

This depends on the completion of issue #1.

In addition to implementing the new design and making sure that all of the fonts and spacing are correct, we should also make sure that the organization of the CSS is consistent and intuitive.

At the moment, although there is a CSS file in the /style directory, almost all of the CSS is being implemented inline as objects coming through the "style" attribute on the tags.

I suggest we use Radium to allow for pseudo classes.

Fix multiple activity deletion bug

To replicate:

  1. on homepage/activity list, check the "select all" box, at the top-left of the list, in the table header, above all of the other checkboxes
  2. click the "DELETE ACTIONS" button
  3. notice that the activities are not deleted
  4. also notice that deleting multiple events does work if you select the activities individually

POSSIBLE - Move application into a WordPress page?

At the moment, the plan is to place the application inside a page on a WordPress install currently located at WeCanSaveDemocracy.org.

This would allow us to expand the platform to include articles and other resources in the future.

Development would have to be run using a local instance of WordPress using something like MAMP (for Mac) or WAMP for Windows. Maybe there are better solutions than those, but MAMP has worked great for me.

We will also want to update the README with new instructions for installing the application locally.

Please contact me at [email protected] for login creds.

Determine best solution for web hosting/deployment

Since this is essentially a WordPress site, we need to find web hosting that will be robust enough to handle high amounts of traffic in the event that the application is mentioned in any major news outlets.

Due to the fact that action guides such as the "Indivisible Guide" - which is nothing more than a PDF, as well as shared Google Spreadsheet titled "He's Your Problem Now" have gotten national media attention, I think it would be good to find some sort of scalable solution that would be able to scale, while only charging us for the bandwidth being used. Currently, the WordPress install is being hosting on one of the upper-tier plans on Bluehost, but I am not certain that this would give us what we need in the event of a major news outlet linking to us, so that needs to be determined.

Secure the API

Right now, virtually anyone can access the API, as there is no authentication on it.

The API is actually coming from a WordPress installation using the "WP REST API" plugin. I chose to go this route since I wanted to
a) save time by not having to create an admin panel that would be easy for non-technical folks to use for data-entry
b) make it really easy for the developers to add new entities with specific fields such as "actions", "events", "donations", etc.

I was thinking that the application would live inside of a page on the WordPress install currently located at WeCanSaveDemocracy.org to allow for eventual expansion of the platform (see this issue) to also include articles and resources. So this is something to keep in mind.

There is documentation on how to do this using different types of authentication, it just needs to be implemented.

Will require some PHP knowledge.

Please contact me at [email protected] for login creds.

Repository needs license for code

The package.json has the ISC license mentioned but a license isn't mentioned anywhere else.

What is the license for this code?

Thanks

Formulate organization of content (categories of actions, events, etc)

Right now, I have some placeholder content for actions and causes.

This issue calls for someone with knowledge of, or desire to have knowledge of, political activism so that they can determine some actions and causes we should include in the initial launch.

My thought is to organize actions by an Action Type:

  • Action
  • Event
  • Donation

For each action, we could filter by cause.

And once the user has selected a cause and searched for actions relating to that cause, then they can sort the list of actions by time commitment.

I am also thinking we could create tabbed interface for the available actions list on the http://localhost:8080/actions/new page, with tab3 for "Actions", "Events", "Donations".

Open to new ideas though.

Need to add user entry field for actions that involve contacting a decision-maker not included by default in any of the actions

There should be an action called something along the lines of "Contact Decision-Maker Relevant to Cause (aside from my local government official)". For these cases, we need to redirect the user to a page where they can enter

  • the specific issue they're contacting a decision-maker about
  • contact info for that decision-maker

Once they fill those 2 fields, then we take them to the activities list (/) page.

Create API service to store user actions and calendar data

Right now, I have an API set up from a WordPress back end using a REST API plugin (don't laugh, trying to save time by eliminating the need to create an admin panel). So that's meant to be the source of available activities.

What still needs to be done is to find some way to store a user's action list, as well as the UUID for their calendar, not a ton of data.

Since I'm not a backend developer, my first thought would be to use Firebase with some sort of out-of-the-box authorization solution that uses on Facebook and Google, as I'm not a huge fan of making people remember yet another set of creds, but definitely open to suggestions.

Move Google Fonts into local directory

Right now we're getting these from Google via <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> in the index.html, and it's a significant performance bottleneck, so we should add these to the repo.

Create Mockups to Improve Look and Feel of the Application

Right now I am using the default "Dark Theme" of Material-UI (http://www.material-ui.com/#/). It is not very attractive.

Simple mockups of the three views would be great:

I suggest we leave the basic elements and layout alone for now for the sake of expediency, and rather focus on choosing nicer colors, adding a header, and a logo or at least choosing a nice font for the name of the app, "We Can Save Democracy" (WeCanSaveDemocracy.org).

I've attached screencaps of what I have so far
wecansavedemocracy-app-work-in-progress.pdf

Implementation of Calendar Export

This work has already been started, and is using the Add To Calendar plugin's API.

The desired outcome here is that when the user is ready to add the events to their personal calendars:

  • They click the "Add these actions to your calendar!" button and are given a choice of which calendar to import to
  • They select that calendar and are taken to the import screen for that particular calendar

So we need to complete the implementation of that button's drop down menu as well as the import feature.

Fix remaining Linting warnings

At the time of this comment, here are the issues I'm seeing, which could require breaking some files up (which I should have done in the first place, admittedly).

/Users/DoronHomeFolder/Sites/wecansavedemocracy-test/src/components/CalendarPickerButtons/calendarPickerButtons.js (0/5)
  !  32:11  JSX props should not use arrow functions  react/jsx-no-bind
  !  39:11  JSX props should not use arrow functions  react/jsx-no-bind
  !  46:11  JSX props should not use arrow functions  react/jsx-no-bind
  !  53:11  JSX props should not use arrow functions  react/jsx-no-bind
  !  60:11  JSX props should not use arrow functions  react/jsx-no-bind

/Users/DoronHomeFolder/Sites/wecansavedemocracy-test/src/containers/ActivitiesList/individual_activity.js (0/1)
  !  128:13  JSX props should not use arrow functions  react/jsx-no-bind

/Users/DoronHomeFolder/Sites/wecansavedemocracy-test/src/containers/FindRep/findRepresentative.js (0/5)
  !  170:15  JSX props should not use arrow functions  react/jsx-no-bind
  !  176:15  JSX props should not use arrow functions  react/jsx-no-bind
  !  244:9   Empty components are self-closing         react/self-closing-comp
  !  246:40  JSX props should not use .bind()          react/jsx-no-bind
  !  265:17  JSX props should not use arrow functions  react/jsx-no-bind

/Users/DoronHomeFolder/Sites/wecansavedemocracy-test/src/containers/FindRep/renderRepData.js (0/5)
  !   90:8   Declare only one React component per file     react/no-multi-comp
  !  120:8   Declare only one React component per file     react/no-multi-comp
  !  160:8   Declare only one React component per file     react/no-multi-comp
  !  170:8   Declare only one React component per file     react/no-multi-comp
  !  179:98  'officialKey' is missing in props validation  react/prop-types

! 16 warnings (10:04:50 PM)```

Set up Yarn for faster npm installs

The npm installs are going really slow, would love to speed those up, and Yarn is a great way to do that, just haven't set it up myself yet.

Write Unit Tests

Open to suggestions on the best way to do this. Thinking that whatever is the easiest solution would be ideal.

Add explanation text to the calendar import popup

When the user clicks on the "Add these actions to your calendar" button and the calendar import popup appears, we need a way to communicate the following:

If they've already imported this calendar, there is no need to take any further action as they are already subscribed, and that the calendar will update on its own on the following timelines:

  • Apple updates on app/program startup and every 1-3 hours
  • Google updates every 12 hours
  • Outlook updates on app/program startup and every 1-3 hours
  • Outlook.com updates every 3 hours
  • Yahoo updates every 8-12 hours

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.