You do not have permission to edit this page, for the following reason:
Image: Upload a jpg or png image representing some aspect of your project. The image should be 600x200 pixels, other images will be accepted but not look as good.
Upload file
Image caption: Describe the image
Social Media Image: Optionally you can upload a large svg, jpg or png image that will represent this project on social media. The image should ideally be 1.91:1 ratio (1200 x 627 pixels).
Team Organisations: List of organisations working on the project separated by commas
CIVIC Software FoundationCity of Portland
Point of Contact: Person to contact - add this person (Add a Person) if they are not already in the knowledge base.
Susan Mottet
Location: List of locations where this project is deployed or planed to be deployed (e.g Portland OR, Paris France). A comma seperates places so a comma between city and state will indicate two places.
Status:
LaunchedImplementedDevelopmentReady for Public AnnouncementIn DeliberationsNegotiationsConcept only StageMaster Planning
Sectors: select one or more sectors to which this project is relevant
Buildings Cybersecurity and Privacy Data Education Public Safety Rural Smart Region Transportation Utility Wellbeing Wireless Agriculture Broadband Resilience Introduction Informational Cybersecurity Privacy Energy Waste Water Smart Buildings
Initiative: If this project is part of a larger initiative select the initiative.
Chapters: Add the chapters where this project should be linked
Open Source
Description: Description of the project
The Small Donor Elections program seeks to reduce the influence of money in politics and encourage election of people to City office who are reflective of and accountable to all Portlanders.
Free text:
__NOTOC__ [[File:3-caption-map.jpg|800px|link=https://www.portland.gov/smalldonorelections]] =Resources= [[File:Brennan Center for Justice logo.svg|400px|link=https://www.brennancenter.org/our-work/research-reports/small-donor-tax-credits-new-model]] [[File:Report_Small Donor Tax Credit.pdf|200px|SMALL DONOR TAX CREDITS : A NEW MODEL]] [[File:Report_Small-Donor-Matching-Funds-NYC-Experience.pdf|200px|SMALL DONOR TAX CREDITS : A NEW MODEL]] [[File:Report_DonorDiversity-public-matching-funds.PDF|200px|SMALL DONOR TAX CREDITS : A NEW MODEL]] [[File:Report+CaseforPublicFinancingNY.pdf|200px|SMALL DONOR TAX CREDITS : A NEW MODEL]] =Open Elections Project= [https://github.com/hackoregon/openelections This is the main repo for the Open Elections project]. Check out our [https://github.com/hackoregon/openelections/wiki WIKI] for information. ==Getting Started== To get this repo running locally you need to have a few dependencies installed. *Node.js: make sure you have node installed on your machine. You can install it here: https://nodejs.org/en/download/ *NVM: use the node version manager to make sure we're all using the same node version. Download it here: https://github.com/nvm-sh/nvm *Docker: You'll need Docker to run the frontend, backend, database. etc. Setup Docker by visiting: https://docs.docker.com/install/ ==Local Development== The frontend depends on the backend & database to be up and running in order to be worked on locally. If you want to have hot module reloading, during development you could use Docker with volumes, but starting the Docker services you need and running the node server separately, is likely simpler. Also checkout the [app](/api/Readme.md) and [api](/api/README.md) Readmes for more info. In general the following command will get all dependencies running with volumes in the foreground: :<code>docker-compose up # add '-d' if you don't want run Docker in detached mode in the background</code> If you don't want to see local console logs from all running containers, you can add the `-d` flag to run in detached mode. See the [https://docs.docker.com/engine/reference/run/#detached-vs-foreground Docker documentation] for more info. You can use the following commands to get up and running for frontend development locally: :<code># start the api and db</code> :<code>docker-compose -f docker-compose-test.yml up api</code> :<code># then start the frontend serve</code> :<code>cd app</code> :<code>yarn start</code> ===Commands=== If you're starting from scratch, you'll need to create a .env file :<code>touch .env</code> You'll need a `GOOGLE_GIS_KEY` in order for addresses to be properly geocoded for the public data visualizations. Pull all the Docker images by running: :<code>docker-compose pull</code> Build the Docker images by running: :<code>docker-compose build</code> Start application by running: :<code>docker-compose up</code> ===Seeding the Database=== We have a set of seed files located in models/seeds, to run them: :<code>docker-compose -f docker-compose-test.yml up</code> :<code>docker-compose run --rm api npm run seed</code></code> ===Testing=== Use the following steps to run through the jest/mocha tests. You can see the what Travis, the CI/CD tool we are using, runs when a PR is opened against the `develop` branch in `./scripts/test.sh`. > Heads up: Make sure after each test you clear the Docker containers (`docker-compose [-f docker-file-name.yaml] down`) or you will probably get `Error: Request failed with status code 403`. ;1. Install the app: In the root directory run the following. Note: `-f docker-compose-test.yml` specifies the test Docker. :<code>docker-compose -f docker-compose-test.yml build</code> In the app directory, you'll have to install the app dependencies (outside of Docker) :<code>cd app</code> :<code>yarn install</code> ;2. Then you can run the api in Docker: :<code>docker-compose -f docker-compose-test.yml up api</code> ;3. Run the Test Suites Run the api test suite: :<code>docker-compose -f docker-compose-test.yml run --rm api npm test</code> Run the app test suite: :<code>docker-compose -f docker-compose-test.yml run --rm app yarn test</code> Run the datascience api test suite: :<code>docker-compose -f docker-compose-test.yml run --rm data make test</code> ===Debugging=== If you encounter a particularly common or interesting issue, when trying to get the local environment working, feel free to add the problem / solution here. ====Debugging Docker==== If you're not sure how to solve a Docker issue, removing all created Docker containers usually is a good place to start: :<code>#The following command will return a list of container ids</code> :<code>docker ps -a # yes docker, not docker-compose</code> :<code>#Use each container id in the following command</code> :<code>docker rm <container-id> -f # remove the container id</code> If you are seeing pm2 errors when trying to spin up a production container, make the the pm2 version in the Dockerfile matches the node version in the Dockerfile. ==Deployment== This project uses Travis to Continuously deploy to qa.openelectionsportland.org on commits to develop. When you open a PR, Travis will run our test suite, and mark it as passing or failing on the PR at Github. When the PR is merged into develop, and the test suite is passing, Travis will deploy using scripts/deploy.sh
Save page Show preview Show changes Cancel updated=5-12-2025