Digital membership card site with Squarespace-sourced membership database.
A live production version of this site (directed at members of the Los Verdes supporters group) may be viewed at: card.losverd.es.
The core components of the application are:
- flask - Used to construct both the frontend ("site") app that serves requests to card.losverd.es and a background tasks ("worker") app responsible for generating Google Pay / Apple Wallet passes, sending out emails, etc.
- Squarespace's Commerce APIs - Source of truth for membership orders. Which are then loaded into to...:
- GCP Cloud SQL for PostgreSQL - User and membership database.
Outside of this repository, all infrastructure resources are housed in an associated Google Cloud Platform (GCP) project. Resource lifecycle is primarily handled by Terraform and the Deploy GitHub actions workflow.
When first provisioning a new GCP project / deployment, some bits of configuration need to be manually established as their creation isn't handled as part of automated deployments (typically due to no, or poor, API support, etc.). These bits include:
- Access to the Google Pay API for passes
- An Apple Developer account
- Google OAuth2 Client
TODO: <fill this bit in>
TODO: <fill this bit in>
- Set up the OAuth consent screen for the desired project via the GCP Console
- Visit the Google API Console to obtain OAuth 2.0 credentials.
TODO: <fill this bit in>
For development against the card.losverd.es production site, you will need:
-
Access to the associated GCP project. This is done by inserting whatever username is associated with your gcloud application-default credentials in the
gcp_project_editors
lists defined in terraform/variables.tf -
Afterwards, be sure to set up
gcloud
and configure it for this project:$ gcloud auth application-default login $ gcloud config set project 'lv-digital-membership' Updated property [core/project]. export EVENTS_PAGE_SA_EMAIL="$(terraform -chdir=terraform output -raw site_publisher_sa_email)" ./events_page/app.py
-
[Optional] Install just
TODO: <fill this bit in>