Skip to content

NextJS Dashboard App to serve medical data collected by ETL, to explore with sagemaker, to annotate labels for MLOps, and to assess AI performance.

Notifications You must be signed in to change notification settings

zcemycl/hc-frontend

Repository files navigation

Healthcare Platform RXScope Website

CICD Design

  • Local Development with/without Docker Compose

    flowchart TB;
    B([Mock OAuth]);
    subgraph Python
       E([FastAPI])
    end;
    subgraph NextJS
       direction TB
          A([Client]);
          C([Server]);
    end;
    A <-->|1: request token| B;
    A -->|2: request with token| C;
    C <-->|3: authorize| B;
    C -->|4: claim| D[AWS]
    A <-->|"request (No Auth)"| E;
    E -->|query| F[(Postgres)]
    
    Loading
  • Cloud Deployment

    flowchart TB;
    subgraph AWS
       A[Cognito];
       B[(RDS)];
       G[Other Resources];
       subgraph NextJS ECS
          C([Client])
          D([Server])
       end
       subgraph Python ECS
          E([FastAPI])
       end
    end;
    F((User));
    
    F -->|1: visit| C;
    C <-->|2: login to request token| A;
    C -->|3: request with token| D & E;
    D & E <-->|4: authorize| A;
    D -->|5: claim| G;
    E -->|5: query| B;
    
    Loading

Environment Variables

  • .env for running scripts and npm run dev.
  • .env.local for running npm run dev locally.
  • .env.sample specifies what you need to setup.

Special Variables

  • NEXT_PUBLIC_ENV_NAME
    • Deployment: dev (Disable jupyter lab presigned url)
    • Local: local-dev (Bypass protected route)
  • NEXT_PUBLIC_COGNITO_OPENID_CONF_URI
    • Deployment: https://cognito-idp.{region}.amazonaws.com/{cognito_user_pool_id}/.well-known/openid-configuration
    • Local without docker compose: http://localhost:8001/default_issuer/.well-known/openid-configuration
    • Local with docker compose: http://oauth:8080/default_issuer/.well-known/openid-configuration
  • NEXT_PUBLIC_BACKEND_BASE_URL
    • Deployment: https://api.service.internal:4000
    • Local without docker compose: http://0.0.0.0:4000
    • Local with docker compose: http://api:4000
  • NEXT_PUBLIC_AWS_ACCESS_KEY_ID and NEXT_PUBLIC_AWS_SECRET_ACCESS_KEY
    • Deployment: Pass by IAM
    • Local Necessary: Pass manually

How to run?

# run NEXT server
source .env # sometimes the env variables are not loaded
npm run dev
# run external testing scripts
npx ts-node scripts/xxx.ts

References

About

NextJS Dashboard App to serve medical data collected by ETL, to explore with sagemaker, to annotate labels for MLOps, and to assess AI performance.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages