Git Product home page Git Product logo

home-dashboard's Introduction

Home Dashboard

Home dashboard

Available Scripts

Start App Locally

npm start

Launch Test Nunner

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

Build app for production

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
App is ready to be deployed!

See the section about deployment for more information.

Protobuf

Install pbf Globally to generate .js from .proto

npm install -g pbf

Install pbf locally to be used as dependent lib

npm install pbf --save

Generate JS from PROTO

pbf src/proto/getInvestmentsResponse.proto  >src/proto/getInvestmentsResponse.js
pbf src/proto/getInvestmentsRorMetricsResponse.proto  >src/proto/getInvestmentsRorMetricsResponse.js
pbf src/proto/getRawInvestmentsResponse.proto  >src/proto/getRawInvestmentsResponse.js

Docker Build and Deploy

  1. Build
docker build -t alokkusingh/home-dashboard:latest -t alokkusingh/home-dashboard:1.4.0 .
  1. Push
docker push alokkusingh/home-dashboard:latest
docker push alokkusingh/home-dashboard:1.4.0
  1. Deploy
docker run -d -p 8083:80 --rm --name home-dashboard alokkusingh/home-dashboard

Open Distributed Tracing with Jaeger

  1. Compiled and included ngx_http_opentracing_module
  2. Enabled Jaeger header propagation
  3. Enabled connection to Jaeger agent

Sequence Diagram

sequenceDiagram
  participant web as Home Dashboard
  participant idp as Google IdP
  participant authorizer as Authorizer Service
  participant homeapi as Home API Service
  participant homeetl as Home ETL Service
  participant db as MySQL
  participant sheet as Google Sheet
  participant backup as Github
  web->>idp: Get ID Token for Home Service?
  alt login success
    idp->>web: ID Token (including email)
    web->>authorizer: Validate ID Token
    authorizer->>authorizer: Validate Token Integrity
    authorizer->>authorizer: Validate Email
    alt user authorized
      authorizer->>web:User ID and Email
      web->>homeapi:Get Metrics
      alt has access to API
        homeapi->>db:Get Records
        db->>homeapi:Records
        homeapi->>homeapi:Aggregate Metrics
        homeapi->>web:Metrics
      else dont have access to API
        homeapi->>web:Unauthorized Access
      end
      web->>homeetl:Upload Statement
      alt has access to API
        homeetl->>homeetl:Parse File
        homeetl->>db:Add Records
        homeetl->>web:Success
      else dont have access to API
        homeetl->>web:Unauthorized Access
      end
      web->>homeetl:Refresh data
      alt has access to API
        homeetl->>sheet:Get Sheet Records
        sheet->>homeetl:Records
        homeetl->>db:Delete Records
        homeetl->>db:Add Records
        homeetl->>web:Success
      else dont have access to API
        homeetl->>web:Unauthorized Access
      end
    else user not authorized
      authorizer->>web:User Not Authorized 
    end
  else login failed
    idp->>web: Login failed
  end
Loading

home-dashboard's People

Contributors

alokkusingh avatar

Watchers

 avatar

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.