Backend Code for Bowie
Bowie is a single-tap mobile donation application for the Alemeda County Community Food Bank.
-
Clone the project
-
Run
pip3 install -r requirements.txt
to install dependencies -
For local testing, set the following environment variables. Either set them to your own values or, for trusted contributors, contact ExtraE113 for the information.
Variable | Value |
---|---|
GOOGLE_APPLICATION_CREDENTIALS |
Path to the firebase admin SDK credentials (.json ). |
SQUARE_APPLICATION_ID |
The square application id. Can be accessed from the square developer dashboard. Should be the sandbox id because production deployments should use the secret manager for GCP. |
SQUARE_APPLICATION_TOKEN |
Above, but the token instead of the ID. |
BOWIE_BACKEND_DEBUG |
Set to any non-empty string in local testing or debug environments, although it is good form to set to True . Should not be set in production. |
For testing, use functions-framework (installed with pip from requirements above)
functions-framework --target=endpoint --debug
Where endpoint
is the endpoint you'd like to test. More information about functions-framework
here.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests (such as they exist) as appropriate. All new features should have tests.
Remember to include any new packages with pip freeze > requirements.txt
GNU Affero General Public License
Contact ExtraE113 with any questions, or open an issue.