GithubHelp home page GithubHelp logo

aamaadmiparty / cleansweep Goto Github PK

View Code? Open in Web Editor NEW
40.0 40.0 21.0 1.32 MB

Volunteer & Campaign Management System

License: Other

Python 17.16% HTML 9.96% CSS 3.33% JavaScript 69.50% Mako 0.03% Shell 0.01% Dockerfile 0.02%

cleansweep's People

Contributors

anandjanki avatar anandology avatar bmwasaru avatar devilankur18 avatar er-anup avatar raghavio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cleansweep's Issues

Ability to tag voters

Implement the Mark as volunteer / donor / supporter / NOT a supporter / NOT interested.

In the case of volunteer / donor, the information should be sent as a request to the admin at the appropriate level for processing. In the rest of the cases, it is sufficient to just keep track of the statistics.

OTP authentication for phone numbers

We need to ensure sanctity of phone numbers that get into the system. One way to ensure that is by generating an OTP (one time password) with every registration, sending the OTP by SMS, and requiring that the OTP be entered within a fixed amount of time for considering the registration request as valid. Else the registration request can be junked.

Door to door campaign dashboard

We need ability to track the progress of door to door campaign. This requires building the following:

  • Ability to enter #houses visited per day at each polling booth
  • Display summarized numbers and graphs in the dashboard.

Load polling booths as well

The loader only loads the state, LC and ACs, it doesn't load the polling booths. Same data for pbs is already available in the data/KA.

SMS dashboard

We need a simple interface for sending SMS messages to group of people. It'll be helpful if we can hide all other complexity available in the CMS and only expose the SMS functionality some how.

Implement PlaceCounts widget

We need a widget to display info like:

This Parliamentary Constituency has
8 Assembly Constituencies
63 Wards
1,059 Polling Centers
2,364 Polling Booths

templates/widgets has some sample widgets.

Ability to add volunteer directly to a booth

Right now place must be selected from an autocomplete to add a volunteer. It becomes very difficult to pick the right polling booth. It would be better to drop that and add a dropdown of all booths.

Add New Volunteer Issues

  1. Add new volunteer is failing with internal error
  2. email field should be optional
  3. email notification should be sent to the added volunteer
  4. audit log add new volunteer

dashboard for coverage

Will be good to see a dashboard of how many people have been covered at a booth, how many supporters, etc.

Unicode error on loaddata into sqllite

adding Country COUNTRY 10
adding State STATE 20
adding Region REGION 30
adding Loksabha Constituency LC 40
adding Assembly Constituency AC 50
adding Ward WARD 60
adding Polling Center PC 70
adding Polling Booth PB 80
Traceback (most recent call last):
  File "run.py", line 22, in <module>
    main(root_dir)
  File "/private/var/www/cleansweep/cleansweep/loaddata.py", line 93, in main
    load_state(root_dir)
  File "/private/var/www/cleansweep/cleansweep/loaddata.py", line 88, in load_state
    db.session.commit()
  File "/private/var/www/cleansweep/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 149, in do
    return getattr(self.registry(), name)(*args, **kwargs)
  File "/private/var/www/cleansweep/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 765, in commit
    self.transaction.commit()
  File "/private/var/www/cleansweep/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 370, in commit
    self._prepare_impl()
  File "/private/var/www/cleansweep/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 350, in _prepare_impl
    self.session.flush()
  File "/private/var/www/cleansweep/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1903, in flush
    self._flush(objects)
  File "/private/var/www/cleansweep/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2021, in _flush
    transaction.rollback(_capture_exception=True)
  File "/private/var/www/cleansweep/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 57, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/private/var/www/cleansweep/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1985, in _flush
    flush_context.execute()
  File "/private/var/www/cleansweep/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 365, in execute
    n.execute_aggregate(self, set_)
  File "/private/var/www/cleansweep/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 616, in execute_aggregate
    uow)
  File "/private/var/www/cleansweep/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 64, in save_obj
    mapper, table, insert)
  File "/private/var/www/cleansweep/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 594, in _emit_insert_statements
    execute(statement, params)
  File "/private/var/www/cleansweep/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 720, in execute
    return meth(self, multiparams, params)
  File "/private/var/www/cleansweep/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 317, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/private/var/www/cleansweep/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 817, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/private/var/www/cleansweep/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 947, in _execute_context
    context)
  File "/private/var/www/cleansweep/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1108, in _handle_dbapi_exception
    exc_info
  File "/private/var/www/cleansweep/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 185, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb)
  File "/private/var/www/cleansweep/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 940, in _execute_context
    context)
  File "/private/var/www/cleansweep/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 435, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (ProgrammingError) You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings. u'INSERT INTO place ("key", name, type_id, iparent_id) VALUES (?, ?, ?, ?)' ('KA/AC164/PB0131', 'PB0131 - Bapuji Vidyarthi nilaya \xc2\xb8 Magadi Road,', 8, 226)

Ability to access voter details from voterid

We need to build a small webapp that provides A JSON response given state and voterid.

We need to a small library that provides voter info given state and voterid.

There is a website by election commission of India that provides this, but the response needs some massaging.

http://electoralsearch.in/

We need to get the assembly constituency and polling both. It given the polling booth number, but given only the assembly constituency name.

We need a small webapp that talks to that website, formats the data as need and cache the response in the db so that we don't hit the electoralsearch website very often.

It will be useful to cache the response in the database to avoid hitting the election commission website again and again.

Send emails on various events

We need to send emails to people on the following events.

  • When a volunteer applies for membership
  • When a volunteer is confirmed

What more?

Ability to apply for membership

People should be able to apply for membership.

It should first authenticate the person using Facebook and then ask for phone number, location and voterid.

The admin will be able to approve the membership, but there'll be a separate issue for that.

Implement PlaceList widget

Implement PlaceList widget to display all places just one-level below the current place and add it to the place page.

Add PlaceNavigation to place page

Implement a widget to help navigating between places in the same level and up. This widget should be added to the place page in the sidebar.

Get rid of location autocomplete

The location autocomplete is creating more issues than it is solving. The add volunteer page should be redesigned to with the following requirements:

  • Ability to add a volunteer to a booth by going to the booth page
  • add-volunteer page at ward or AC should give an option to select the booth from a dropdown
  • add-volunteer page above AC level should give option to select the AC first. It shouldn't be possible to add-volunteer without going to the AC page.

A volunteer shouldn't be able to see volunteers at higher levels

Right now the system allows people to see volunteers at all the parents of his place. This literally allows everyone to go to INDIA page and see all the volunteers.

This should be fixed by limiting the volunteers view only to the place where he belongs.

Show members on place page

This requires:

  • loading members via a script
  • showing members on place page via Members widget
  • /members page to see all members

Ability to add new members is not in the scope of this issue.

Ability to add admins from command line

We need ability to add admin users from command line. We need to in the short-term so that we can continue using the system without having to worry about providing UI for adding admin users.

Design user dashboard

Comeup with a mock up for user dashboard. The dashboard should provide quick access to all the things that a user can do with the system. It should probably change based on his role and permissions.

Audit trail

We need to record every change that happens in the system so that people with right permissions can watch who is doing what and reverse any action if required.

Search for places

We need ability to search for a place. It would be nice if we have search engine like solr/elasticsearch, but for now just use LIKE queries in SQL.

Tasks:

  • Add a search box on the top nav
  • Implement /search
  • show search result

Ability to split volunteers into multiple categories

Delhi team consist of 1 main wing and 14 frontal wings(youth,women,student etc.) with the same heirarchy. and a number of positions at each level.

For this we need to have ability to add a category to a volunteer.

We may have to handle some permission issues, but that'll be taken care as a separate issue.

Look for voter in electoralsearch.in

As of now we only look for voter info voterdb. It would be nice if we can search electoralsearch.in in addition to that so that new voter ids (and new states) will automatically start working.

Permissions of a booth level volunteer

What permission does a booth level volunteer have?

Logged in as [email protected] / Bill123 in test.missionvistaar.in

At the booth, the "Admin" menu doesnt show up. When he navigates up to the polling center, the "Admin" menu shows up.

When he clicks on the Voters link, the voter IDs and the names show up (http://test.missionvistaar.in/KL/AC021/PX003/admin/voters). But clicking on a voter ID gives "Permission Denined" (http://test.missionvistaar.in/KL/AC021/PB0005/admin/voters/CCZ1708684).

Also, please note typo in "Denined"

Implement OAuth Server

Provide a method for an externally developed application to validate whether a giver user is an active volunteer and his geographic locations + roles.
! Usecase

  • During election time we had build a separate application for fund management.
  • Currently the MV training team is deploying a separate application for the training registration etc.

Such applications depend on getting active information on active volunteers, their location etc Having cleansweep provide the authoritative information on whether someone is a active member or not and his membership details will help in building other applications on top of cleansweep

Design a data format for specifying all places in a state

We need a way to specify places in a state so that they can be loaded into the app. Right now we only have a way to specify state, LC, AC and PB. The format that we are using is available at:
https://github.com/anandology/cleansweep/tree/master/data/KA

It contains 4 files.

  • state.json - JSON file containing name, and key of the state
  • lc.txt - TSV file containing columns code and name.
  • ac.txt - TSV file containing columns lc_code, ac_code and ac_name.
  • pb.txt - TSV file containing columns ac_code, pb_code and pb_name.

We need to extend this to support regions, wards and polling centers. Do you have any suggestions?

Implement basic permission system

We need a permission system to decide who can do what. Eventually we want the ability to configure this from admin panel, but for now we can fix some simple rules.

A member will be able to:

  • see all members at his own place
  • see all the places above in the hierarchy, but not the members

An admin will be able to:

  • add a member at any place in his subtree

Add pagination to volunteers page

We need to limit the number of volunteers displayed per page. I suggest limiting that number to 50 and add pagination.

Suggested URL format with pagination is:
<place>/volunteers?page=2
or
<place>/members/2

Tips:

See how pagination is handled for voters.

Implement unsubscribe page

We need to manage a list of unsubscribed people and never send any emails to those people.

A link to unsubscribe page is added at the end of every email that is sent out.

How to add new people?

Finally, while going door-to-door, there may be newer people who need to be added into the system. What is the best place to do it?

Ability to add new members

Admins should be able to add new members to any polling booth in his subtree
We need the ability to add new members. Lets not worry about permissions for now.

The form will have location and voterid fields in addition to nam, email and phone. The polling booth of the person is identified either using the voterid or using the location.

It should look something like this:
http://ka.aapvol.in/

Access to volunteer details

An individual who is part of a committee at a particular level, and has write permissions, should have access to the list of all volunteers at his/her unit and at all units under his/her unit.

This individual should not have access to any volunteers from other units.

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.