web-tobi-2-app

0.0.1 • Public • Published

TOBi2 web app

This is the repository for the TOBi 2 chatbot.

  • Product Owner: Darragh Keogh
  • Scrum Master: Andrejs Kasurins
  • Dev Team Lead: Mihai Rotaru

Overview

Getting Started

  • to be able to clone repositories, make sure your (public) SSH key is added to your account (guide)
  • to be able to install first-party npm/yarn dependencies, follow this guide
  • if getting SSL errors in chrome: chrome://flags/#allow-insecure-localhost
  • some services (like IDM, which handles auth) are hosted internally; in order for them to work one needs to connect to bastion
  • to clone and run the app locally:
$ git clone vfuk-digital@vs-ssh.visualstudio.com:v3/vfuk-digital/Digital/web-tobi-2-app
$ cd web-tobi-2-app
$ yarn install
$ yarn nps start
  • Note: you might run into gyp ERR! build error while running yarn install, Possibly it's Node version. At the time of writing v14 is working and later ones are not!

Notable Dependencies

Used APIs

Development Startup Process

Notes

  • DX-IDM can be brittle; if issue persist, contact heimdall_public (https://vfuk-digital.slack.com/archives/CJJUP9TQQ)
  • useful filter for dev tools network panel: -/(pagead)|(ads\.linkedin)|(adrum)|(bing\.com)|(submit-events)|(woff)|(kampyle\.com)|(tags\.tiqcdn)|(logging\/logline)/
  • useful filter for dev tools console: -/tcFramework/ -/postToServer/ -/InqFramework/ -/HMR/ -/WDS/
  • if seeing errors like [hardsource:02bc0307] Could not freeze ./src/client/routes.tsx: Cannot read property 'hash' of undefined:
    • rm -rf ./node_modules/.cache/hard-source/

Notable Development Dependencies

Application Boot Process

  • as defined in the React neutrino preset, the index.ejs file is used as a template
  • links to compiled application code, also to the vendors bundle and Webpack runtime will be injected into the template

Interaction with Chatbots

  • there are two kinds of interactions: request/response, and event-based
  • request/response - all normalized to return promises:
    • start engagement
    • send message
    • send data
    • request email transcript
    • end engagement
  • event-based - must register a callback:
    • initialization complete (engagement can be started)
    • agent chat message received
    • connection lost/re-gained

Build and Test

Locally

  • to run unit tests locally: yarn nps test
  • to run Cypress tests, without the GUI: ./node_modules/.bin/cypress run
  • to open Cypress GUI: ./node_modules/.bin/cypress open
    • Note: the application needs to be started (e.g., with yarn nps start) before running Cypress
  • to run only test(s) containing the string "foo" in description: yarn nps "test -t foo" or yarn test-filter "foo"

DevOps

Contribute

Code Style

Pull Requests

Commit Message Format

  • conventional commits: https://www.conventionalcommits.org/en/v1.0.0/
  • use imperative tense (not past tense)
  • prefix with feat, fix or any of the other supported prefixes
  • if the commit only affects a certain module/functionality, include it after prefix
  • example commit with module: fix(media): large images not scaled
  • example commit with module: fix(auth): user able to see information of other users
  • example commit without module: feat: add support for feature x

Branching

  • github-flow: https://guides.github.com/introduction/flow/
  • branch off from master; branch name should include associated work item number, and a brief description
  • branch should include a prefix: feature/xxxx
  • branch should use dashes not underscores
  • example branch name, when it relates to work item: feature/12345-implement-feature-x
  • release branches not used/created currently - releases controled via the Azure pipeline, described above

Testing

Other

Readme

Keywords

none

Package Sidebar

Install

npm i web-tobi-2-app

Weekly Downloads

0

Version

0.0.1

License

none

Unpacked Size

5.59 MB

Total Files

716

Last publish

Collaborators

  • ibrahemassem