Best Flask open-source libraries and packages

Ga dashboard demo

Simple Google Analytics Dashboard Demo (React + Server-side Authorization)
Updated 10 months ago

Simple Google Analytics Dashboard Demo (React + Server-side Authorization)

Simple Google Analytics Dashboard Demo written in React and Material UI, with python for getting authorization token from Google Cloud Platform.

Tech Stack


Prerequisite

  1. Get a service account by following this tutorial, copy the content of JSON file
  2. Create config file ./backend/instance/config.py, put the copied content of step 1 as config SERVICE_ACCOUNT_CREDENTIALS='{...}'
  3. Enable Google Analytics API
  4. Add the service account created in step 1 to the Google Analytics view you wish to display
  5. Add the view id to REACT_APP_GA_VIEW_ID of ./frontend/.env
  6. Configure the domain for getting authorization token (i.e. endpoint of Python backend)

Setup Development Environment

  • Frontend: yarn install
  • Backend: yarn setup:backend

Development

  • Frontend: yarn start:frontend
  • Backend: yarn start:backend

Build production

  • Frontend: yarn build:frontend

To-Do

  • Datepicker for changing date
  • Refresh token (as token will expire in 1 hour)
  • Responsive handling (the api does not support window resize)

Reference