Giter Club home page Giter Club logo

frontend's Introduction

Abacus

Development

Backend

Run the Quickstart to bring up service on http://localhost:65432

See Quickstart

Server (development)

Starts server on http://localhost:3000

npm run start

Server (production-like)

docker run -p 3000:80 \
  -e KEYCLOAK_HOST="http://localhost/auth/" \
  -e KEYCLOAK_CLIENT_ID="localhost-abacus" \
  -e KEYCLOAK_REALMS="opentdf-realms" \
  -e ATTRIBUTES_HOST="http://localhost/v2/attributes" \
  -e ENTITLEMENTS_HOST="http://localhost/v2/entitlements" \
  -e SERVER_BASE_PATH="" \
  $(docker build -q .)

Input Format : KEYCLOAK_REALMS="item1,item2,item3"

SERVER_BASE_PATH - for abacus relative path support , example : SERVER_BASE_PATH="/abacus"

The environment variables becomes window.__SERVER_DATA__ via an NGINX sub_filter defined in nginx-default.conf

OpenAPI

Generate TypeScript types from OpenAPI specifications
reference https://github.com/drwpow/openapi-typescript

npx openapi-typescript ../backend/containers/attributes/openapi.json --output src/attributes.ts
npx openapi-typescript ../backend/containers/entitlements/openapi.json --output src/entitlement.ts

Keycloak
reference https://github.com/ccouzens/keycloak-openapi

npx openapi-typescript https://raw.githubusercontent.com/ccouzens/keycloak-openapi/main/keycloak/15.0.json --output src/service/keycloak.ts

Build and deploy

docker build --tag opentdf/abacus .
docker tag opentdf/abacus opentdf/abacus:0.2.0
docker push opentdf/abacus:0.2.0 

Test

react-scripts test

npm run test

Playwright Test

To install
npx playwright install

To run (while development server above is running)
npm run test:playwright

Lint

CI=true npm run build

Design

The REACT_APP_SERVER_DATA environment variable becomes window.__SERVER_DATA__.

frontend's People

Contributors

ysizarie-virtru avatar sievdokymov-virtru avatar obidenko avatar dmihalcik-virtru avatar krokhmaliuk-virtru avatar pflynn-virtru avatar ivanovspvirtru avatar dependabot[bot] avatar bleggett avatar dsvystunvirtru avatar arkavo-com avatar patmantru avatar ttschampel avatar kpals avatar virtru-cloudnative 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.