teleport/web
2019-09-20 15:21:02 -04:00
..
.storybook Move code to this repo 2019-09-12 19:37:15 -04:00
packages Change default datetime format 2019-09-20 15:21:02 -04:00
scripts Docs (#1) 2019-09-20 15:13:48 -04:00
.dockerignore Move code to this repo 2019-09-12 19:37:15 -04:00
.eslintrc.js Move code to this repo 2019-09-12 19:37:15 -04:00
.gitignore dist files 2019-09-13 12:26:58 -04:00
.gitmodules Add E reference 2019-09-12 19:40:06 -04:00
.prettierrc Move code to this repo 2019-09-12 19:37:15 -04:00
babel.config.js Move code to this repo 2019-09-12 19:37:15 -04:00
Dockerfile Move code to this repo 2019-09-12 19:37:15 -04:00
jest.config.js Move code to this repo 2019-09-12 19:37:15 -04:00
jsconfig.json Exclude all dist folders 2019-09-14 14:13:16 -04:00
Makefile Docs (#1) 2019-09-20 15:13:48 -04:00
package.json Docs (#1) 2019-09-20 15:13:48 -04:00
README.md Docs (#1) 2019-09-20 15:13:48 -04:00
yarn.lock Move code to this repo 2019-09-12 19:37:15 -04:00

Gravitational Web Applications and Packages

This mono-repository contains the source code for the Teleport and Gravity Web UI.

The code is organized in terms of independent yarn packages which reside in the packages directory.

Getting Started

You can make production builds locally or you can use Docker to do that.

Local Build

Make sure that you have yarn installed on your system since this monorepo uses the yarn package manager.

Then you need download and initialize these repository dependencies.

$ yarn install

To build Teleport Web UI

$ yarn build-teleport

To build Gravity Web UI

$ yarn build-gravity

The resulting output will be in /packages/teleport/dist/ and /packages/gravity/dist/

Docker Build

To build Teleport Web UI

$ make teleport

To build Gravity Web UI

$ make gravity

Development

To avoid having to install a dedicated Teleport or Gravity cluster, you can use a local development server which can proxy network requests to an existing cluster.

For example, if https://example.com:3080/web is the URL of your cluster UI then:

to start your local Teleport development server

$ yarn start-teleport --target=https://example.com:3080/web

or to start your local Gravity development server

$ yarn start-gravity --target=https://example.com:3080/web

This service will serve your local javascript files and proxy network requests to the given target.

Keep in mind that you have to use a local user because social logins (google/github) are not supported by development server.

Unit-Tests

We use jest as our testing framework.

To run all jest unit-tests:

$ yarn run test

To run jest in watch-mode

$ yarn run tdd

Interactive Testing

We use storybook for our interactive testing. It allows us to browse our component library, view the different states of each component, and interactively develop and test components.

To start a storybook:

$ yarn start storybook

This command will open a new browser window with storybook in it. There you will see components from all packages so it makes it faster to work and iterate on shared functionality.