open-index/open-npm huggingface dataset:
npm package: @metric-im/administrate
Description: Tools for site administration
Author: Michael Sprague
Latest version: 1.2.2

# administrate
Tools for site administration

## Certify
Certify will detect the hostname of incoming ssl requests and present the certs. If the domain name does not have a valid cert it requests one from letsencrypt and saves the keys to $HOME/.metric-im/

```javascript
import https from "https";
import { Certify } from '@metric-im/administrate';
const app = express();
const certify = await Certify.attach(app,{contactEmail:'me@there.com'});
// certify.SNI return {key: xxx, cert: ...} for the current domain and/or triggers a request for a cert
const https_server = https.createServer({...certify.SNI},app);
```
>NOTE: Set the environment variable PROFILE=DEV to instruct acme to fetch test circuits. Use this when testing or you will be throttled.

## Multisite
Multisite acts as a proxy service. It listens on port 80 (4080), 443 (4443) for all web traffic and routes to the designated service. A service is identified by domain name. multisite will look for a service matching the incoming domain name in the *sites* folder. It spawns the app found with npm start and assigns it an http port. All subsquent traffic for that domain are routed to this process.

Multisite can also launch a new instance of the current app with the sanitized domain name as the first argument. In this way the same code can run multiple named apps in separate silos.

```javascript
const multiSite = MultiSite.attach(app);
```
See the Roots project [Harness](https;//github.com/rootz-global/harness). This is a simple host for multisite. It expects symlinks to all the apps the server responds to by domain name.

## Syncrhonize
Provides a web hook to github for manaing synchronization with a code branch.
npm package: @metric-im/bridge-server
Description: External services integrated with metric messenger
Author: Michael Sprague
Latest version: 1.2.3

# bridge-server
connections to third-party data

## Structure

| Path | Description |
| --- | --- |
| /modules | A module is a bridge connector to a specific data profider, like gmaps or sportsdata |
| /processors | The processors perform specific tasks to bridge the data source into Metric Data |

Processors usually require METRIC_KEY be defined in an environment variable
npm package: @metric-im/firemacro
Description: macro transformation for objects
Author: Michael Sprague
Latest version: 2.0.1

# FireMacro

FireMacro enables the templatization of our business and configuration data. It merges
data with objects, arrays, strings and other atomic types. It can conditionally rewrite
object structure and loop. It is intended for scripted integration with foreign
modules and services.

FireMacro is used throughout the metric-im componentry collection. However, it has
no dependencies to the componentry structure. The only external library it uses is
"moment", but only needed when the macro template references date variables.

FireMacro will run in the browser or node.

**[Full Reference](./doclets/FireMacro.md)**
npm package: @metric-im/wiki-mixin
Description: simple markdown wiki for integration with app-harness
Author: Michael Sprague
Latest version: 1.8.3

# Metric Wiki

This module renders markdown text with a few embellishments

* PlantUML - draw UML diagrams with descriptive text

* Frames - Import external data into a flex box

* FireMacro - Preprocess wiki pages with macros populated with data on the query string or web requests
npm package: @metrichor/nextclade
Description: Nextclade visualisation
Author: Oxford Nanopore Technologies
Latest version: 1.0.4


# Nextstrain/Nextclade visualisation

We have recreated the Nextstrain/Nextclade table as a reusable web component.

![Nextclade DEMO](./demo.png)

## Using this component

There are three strategies we recommend for using the `@metrichor/nextclade` web component built with Stencil.

### Script tag

- Put a script tag similar to this `<script src='https://unpkg.com/@metrichor/nextclade@0.0.11/dist/nextclade/nextclade.esm.js'></script>` in the head of your index.html
- Then you can use the element anywhere in your template, JSX, html etc

### Node Modules
- Run `npm install @metrichor/nextclade --save`
- Put a script tag similar to this `<script src='node_modules/@metrichor/nextclade/dist/nextclade/nextclade.esm.js'></script>` in the head of your index.html
- Then you can use the element anywhere in your template, JSX, html etc

### In a stencil-starter app
- Run `npm install @metrichor/nextclade --save`
- Add an import to the npm packages `import @metrichor/nextclade;`
- Then you can use the element anywhere in your template, JSX, html etc


## Visualising Nextstrain/Nextclade data

To use the Nextclade table in your HTML you will need to create a [nxt-table](./src/components/nxt-table/readme.md) tag and set the data attribute with the output from the Nextstrain/Nextclade pipeline

For example

```html
<body>
  <nxt-table />
  <script defer>
    const data = [
      {
        "seqName": "barcode02 MN908947.3",
        "errors": [
          "Unable to align: no seed matches"
        ]
      },
      {
        "seqName": "Bangladesh/BCSIR-NILMRC-257/2020",
        "substitutions": [
          {
            "pos": 240,
            "refNuc": "C",
            "queryNuc": "T",
            "aaSubstitutions": [],
            "pcrPrimersChanged": [],
            ...
          }
        ],
        ...
      }
      ...
    ],

    var nxt = document.querySelector('nxt-table')
    nxt.data = data
  </script>
</body>
```
npm package: @metrichor/plasmid
Description: Plasmid map visualisations
Author: Oxford Nanopore Technologies
Latest version: 0.2.0


# Plasmid visualisation

We have recreated the VIXIS plasmid map (http://angularplasmid.vixis.com/) as a reusable web component for all modern web frameworks.

![Plasmid DEMO](https://raw.githubusercontent.com/nanoporetech/plasmid-map/master/demo.png?token=AAL7PCSSFV57LBDQYKHSBMLBDIXVI)

## Using this component

There are three strategies we recommend for using the `@metrichor/plasmid` web component built with Stencil.

### Script tag

- Put a script tag similar to this `<script src='https://unpkg.com/@metrichor/plasmid@0.1.6/dist/plasmid/plasmid.esm.js'></script>` in the head of your index.html
- Then you can use the element anywhere in your template, JSX, html etc

### Node Modules
- Run `npm install @metrichor/plasmid --save`
- Put a script tag similar to this `<script src='node_modules/@metrichor/plasmid/dist/plasmid/plasmid.esm.js'></script>` in the head of your index.html
- Then you can use the element anywhere in your template, JSX, html etc

### In a stencil-starter app
- Run `npm install @metrichor/plasmid --save`
- Add an import to the npm packages `import @metrichor/plasmid;`
- Then you can use the element anywhere in your template, JSX, html etc


## Visualising Plasmid data

To use the Plasmid map visualisation in your HTML you will need to create a [plasmid-map](./src/components/plasmid-map/readme.md) tag and appropriate nested tags

See [examples](examples/all.html)