Important
This repository is archived. Since 2026-09-21, card.losverd.es has been served by los-verdes/card-losverd-es, and this code is kept for reference only. Pull requests and issues belong there.
Its Terraform still describes live Google Cloud resources that the new site depends on: the
lv-digital-membership project and the APIs enabled on it (terraform/bootstrap/), the Google OAuth client
behind Google sign-in, and possibly the Google Wallet service account. The Cloud SQL instance is also still
here, waiting for its final destroy. State is kept in the lv-digital-membership-tfstate bucket, so this
configuration can still be planned and applied from a clone. Read
card-losverd-es's cutover runbook, section 5
before changing anything: targeted destroys only, never the whole configuration or the project.
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_editorslists defined in terraform/variables.tf -
Afterwards, be sure to set up
gcloudand 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>
