> For the complete documentation index, see [llms.txt](https://t1t.gitbook.io/t1c-js-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://t1t.gitbook.io/t1c-js-guide/core/source-code.md).

# Source Code

## Dependencies

The GCL is distributed through a Distribution Service. In order to use the Distribution Service, a valid api-key is needed. The JavaScript library is open source and distributed through:

* Github repository
* bower package

### Github Repository

* [T1C-JS client library](https://github.com/Trust1Team/t1c-lib-js)
* [T1C-JS simple HTML page using jQuery](https://github.com/Trust1Team/t1c-lib-js/blob/develop/index.html)
* [T1C-Demo web application](https://github.com/Trust1Team/t1c-webapp-demo) (TBD)

### Bower Package

Bower can be used to add the T1C-JS package to your web application project:

```bash
$ bower install trust1connector --save
```

## Distribution Service API

OpenAPI [(JSON)](https://storage.cloud.google.com/gcl-distro/apis/t1c-ds_v0.5.0.json) [(YAML)](https://storage.cloud.google.com/gcl-distro/apis/t1c-ds_v0.5.0.yaml)

## JVM

Important to know that `Trust1Connector` does **NOT** have any dependencies on Java Virtual Machine.

## Build T1C-JS from source

Webpack is need to build the Javascript library

```bash
$ npm install --global webpack
```

Typings must be installed for typing generation

```bash
$ npm i -g typings
```

For jQuery we need to install from dt source

```bash
$ typings install dt~jquery --global --save
```

Linter:

```bash
$ npm install --global tslint
```

Debug:

```bash
$ typings install debug --save
```

Use npm install to download the necessary dependencies

```bash
$ npm install
```

Use gulp test to run the test suite of the project

```bash
$ gulp test
```

To lint the code,

```bash
$ gulp tslint
```

To build the Javascript library, compressed:

```bash
$ gulp webpack
```
