buerokratt / byk-widget-mvp

MVP version of Buerokratt Chat Widget
MIT License
0 stars 3 forks source link

Bürokratt Widget

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.\ Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.\ You will also see any lint errors in the console.

npm test

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

npm test:coverage

Launches the test runner and displays code coverage

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

npm run webpack

Bundles the app into a single bundle named widget_bundle.js for easy embedding

Snippet embedding

Snippet can be embedded to any site using the following html:

<div id="byk-va"></div>
<script>
  window._env_ = {
    RUUTER_API_URL: 'LOCATION_OF_RUUTER',
    TIM_AUTHENTICATION_URL: 'TIM url with callback parameter',
    NOTIFICATION_NODE_URL: 'LOCATION_OF_NOTIFICATION_SERVER',
    OFFICE_HOURS: {
      TIMEZONE: 'Europe/Tallinn',
      BEGIN: 8,
      END: 17,
      DAYS: [1, 2, 4, 5],
    },
    other variables...
  };
</script>
<script id="script-bundle" type="text/javascript" src="https://github.com/buerokratt/byk-widget-mvp/raw/main/LOCATION_OF_WIDGET_BUNDLE" crossorigin=""></script>

Configurable variables

Rasa Buttons Support

In order for Rasa buttons to be supported this Pull Request must be merged and deployed. Other option is to merge and deploy it manually using these steps:

Licence

See licence here.