Skip to content

Simple application to engage communities around local events.

License

Notifications You must be signed in to change notification settings

rogthedodge/redux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Single page app talking to API talking to postgres DB, in one container each so we can work on local machines and deploy on AWS/GCP.

Don't worry about sign in yet, eventually use Google

Database of members, groups (eg CLPs or wards), events (eg calling about an election) and contacts, where a contact records a call to a person about an event. An event has a target group of people to call (eg everyone in Cotham ward).

Going to site/event (eg momentum.com/election provides first uncalled person. Submitting the outcome (spoken to or didn't answer) gets the next person until there's no-one left in the group to call.

Minimal data about people, groups, events and contacts to start with.

Some random dev notes:

Create the dockerized postgres DB: docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d postgres

Run the postgress CLI against the containerized DB: docker run -it --rm --link some-postgres:postgres postgres psql -h postgres -U postgres

Currently it seems you have to go into psql and "create database redux;" whereas I'm pretty sure I read somewhere that connecting would create the DB if it doesn't already exist.

Run the create_DB script. Then run the import people and import events python scripts if you need test data.

Then start the web server and api: gunicorn redux_API:api

If using the static index page, also need to start ngnix: sudo nginx, add the html file to the nginx html folder and update ngnix.conf to add:

location /call { proxy_pass http://127.0.0.1:8000/call; }

location /event { proxy_pass http://127.0.0.1:8000/event; }

in oder to avoid cross domain JS-call issues.

Have now updated code to Python 3 so all scripts need to be run using python3 command. Also all dependencies (falcon, gunicorn, json, psycopg2...) should be installed with pip3.

About

Simple application to engage communities around local events.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published