Giter Site home page Giter Site logo

los-verdes / digital-membership Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 0.0 8.51 MB

Digital membership card website with membership database populated from online storefronts

Home Page: https://card.losverd.es

License: GNU General Public License v3.0

HCL 6.06% Python 66.46% Dockerfile 0.35% JavaScript 6.34% SCSS 1.26% Jinja 16.65% Shell 0.73% Mako 0.11% Just 1.95% HTML 0.09%
python passkit flask squarespace bigcommerce

digital-membership's Introduction

digital-membership

Main Deployment Workflow Lint Run Tests codecov

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.

Application Architecture

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.

System Diagram

overall digital-membership system diagram

Deployment

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.

Initial Setup

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:

  1. Access to the Google Pay API for passes
  2. An Apple Developer account
  3. Google OAuth2 Client

Google Pay API for Passes

TODO: <fill this bit in>

Apple Developer Account

TODO: <fill this bit in>

OAuth2 Configuration

  1. Set up the OAuth consent screen for the desired project via the GCP Console
  2. Visit the Google API Console to obtain OAuth 2.0 credentials.

TODO: <fill this bit in>

Development

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 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>

digital-membership's People

Contributors

jeffwecan avatar verde-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

digital-membership's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.