Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

improbable-eng/Dragoman

Repository files navigation

Dragoman

An open source GUI for polyglot, a universal gRPC client

Build Status

Dragoman

This is an open source project to allow easy debugging of gRPC services, and leverages polyglot. It is powered by Electron, react, redux, webpack

Getting Started

Prerequisites

  • Polyglot requires java runtime 1.8.
  • node >= 8.x
  • npm >= 3.x

Installing

  • Download the latest version from the releases tab.
  • Alternatively clone this repo, run npm run start
  • If you have no polyglot experience/setup consider reading through this readme.
  • If you have used polyglot before you likely used a configuration file to persist settings, by default polylgot looks to ~/.polyglot/config.json.
  • An example config might be (remember to insert the OAuth secret, path to refresh token, and update the proto discovery path and protoc include paths as appropriate):
{
  "configurations": [
    {
      "name": "production",
      "call_config": {
        "use_tls": "true",
        "oauth_config": {
          "refresh_token_credentials": {
            "token_endpoint_url": "https://my.auth.server/auth/v1/token",
            "client": {
              "id": "my_client_id",
              "secret": "{{INSERT CLIENT SECRET HERE}}"
            },
            "refresh_token_path": "{{INSERT PATH TO REFRESH TOKEN HERE}}"
          }
        }
      },
      "proto_config": {
        "proto_discovery_root": "/path/to/protos",
        "include_paths": [
          "path/to/protoc/include/1",
          "path/to/protoc/include/2"
        ]
      }
    }
  ]
}

Known Issues

  • Polyglot is known to hang if authentication fails, causing the request to hang indefinitely. Cancel the request, get a new refresh token and try again.
  • Difficult to read service/method name

Development

To get started clone the repo:

git clone https://github.com/improbable-eng/Dragoman.git your-project-name

And then install dependencies.

$ cd your-project-name && npm install

Run

Run these two commands simultaneously in different console tabs for hot module replacement.

$ npm run hot-server
$ npm run start-hot

To simply get going run:

$ npm run start

DevTools

Toggle Chrome DevTools

  • OS X: Cmd Alt I or F12
  • Linux: Ctrl Shift I or F12
  • Windows: Ctrl Shift I or F12

See electron-debug for more information.

DevTools extension

This boilerplate is included following DevTools extensions:

You can find the tabs on Chrome DevTools.

If you want to update extension versions, please set UPGRADE_EXTENSIONS env, just run:

# For macOS
$ UPGRADE_EXTENSIONS=1 npm run dev

# For Windows
$ set UPGRADE_EXTENSIONS=1 && npm run dev

Packaging

To package apps for the local platform:

$ npm run package

To package apps for all platforms:

First, refer to Multi Platform Build for dependencies.

Then,

$ npm run package-all

To package apps with options:

$ npm run package -- --[option]

Further commands

To run the application without packaging run

$ npm run start

To run End-to-End Test

$ npm run build
$ npm run test-e2e