This mobile-friendly site allows Buffalo residents to apply for the Residential Affordable Water Program. Residents can create a new application and upload multiple photos of required documents even at a later date.
This project was developed as part of the 2019 Code for America Community Fellowship.
- Python 3.7 with Django 2.2
- Node.js for npm packages and scripts
- Travis CI for testing and builds
- Heroku deployment
- Heroku-hosted PostgreSQL database for storing application data
- S3 bucket for storing photos of documents
Make sure these are installed on your machine.
- Visual C++ Build Tools. Read Issue #11 for instructions. Required for some Python packages on Windows.
We use npm scripts to speed up development. Manual instructions are also provided.
$ PATH\TO\REPO\affordable_water>
npm run setup
This script automatically:
- Installs pipenv to manage Python virtual environment and dependencies. Learn more about pipenv.
pip install pipenv
- Creates a Python virtual environment using pipenv and installs dependencies based on the Pipfile.lock
pipenv sync
- Installs node modules using npm
npm install
npm run assets
This script automatically:
- Uses gulp.js to copy assets from
node_modules
to_vendor
folder.gulp
- Collects Django
static
files, including the copied assets from_vendor
pipenv run manage.py collectstatic
npm start
This script runs pipenv run manage.py runserver
Open server in browser at http://localhost:8000/
If you make changes to the code, you'll want to run the test suite to make sure existing functionality didn't break. You should also write tests for any new or modified code.
npm test
This script runs the testing suite along with a code coverage analysis using Coverage.py. If the current tests pass, a new folder called htmlcov
will be generated. If you open htmlcov/index.html
in a browser, you can interactively see how much of the source code is covered by tests.
The project is available as open source under the terms of the MIT License.
Everyone interacting in this project’s codebase, issue trackers, chat rooms and mailing lists is expected to follow the Code for America code of conduct.