Skip to content

Commit

Permalink
Docker and documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
kukabi committed Sep 18, 2023
1 parent 4ac7453 commit 0270374
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 9 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
.vscode
/dist/client/bundle.js
/dist/client/bundle.js.LICENSE.txt
.DS_Store
docker
63 changes: 55 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,65 @@
<p align="center">
<img width="600" src="https://raw.githubusercontent.com/helikon-labs/chainviz-v1/development/readme-files/chainviz-logo.png">
<img width="600" src="https://raw.githubusercontent.com/helikon-labs/chainviz/development/readme-files/chainviz-logo.png">
</p>

![](https://github.com/helikon-labs/chainviz-v1/actions/workflows/prettier_eslint.yml/badge.svg)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=helikon-labs_chainviz-v1&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=helikon-labs_chainviz)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=helikon-labs_chainviz&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=helikon-labs_chainviz)

ChainViz ([alpha.chainviz.app](https://v1.chainviz.app)) is a real-time 3D chain visualization of the Polkadot machine.
[Chainviz](https://chainviz.app) is a real-time 3D chain visualization of the Polkadot machinery.

<p align="center">
<a href="https://chainviz.app" target="_blank"><img width="100%" src="https://raw.githubusercontent.com/helikon-labs/chainviz/development/readme-files/chainviz-v1-screenshot-01.png"></a>
</p>

You may find the release article on [Medium](https://medium.com/helikon/introducing-chainviz-v1-a-new-kind-of-block-explorer-6b9f4ed83e8d).

[Chainviz](https://chainviz.app) visualizes the following elements of the Polkadot and Kusama relay chains and validators in real-time:

- Active validators in a 3D representation and list format.
- Block production process.
- Block list, and block contents on click.
- Parachains, and their assigned validators.
- Recent XCM transfer messages, and message contents (powered by [Polkaholic API](https://docs.polkaholic.io/#introduction)).
- Basic network and staking data.
- Validator details panel, where the user can observe the validator in real-time.

Chainviz uses the services provided by the [SubVT backend](https://github.com/helikon-labs/subvt-backend/tree/development), part of [SubVT](https://subvt.io), a project supported by the Kusama Treasury and W3F Grants.

Please view the [alpha version](https://alpha.chainviz.app) repository [here](https://github.com/helikon-labs/chainviz).

<!--p align="center">
<a href="https://alpha.chainviz.app" target="_blank"><img width="100%" src="https://raw.githubusercontent.com/helikon-labs/chainviz/development/readme_files/screenshot_01.png"></a>
</p-->
## Build & Run

### Development

Follow the commands below to run the application in development mode with live code update.

```
git clone https://github.com/helikon-labs/chainviz.git
cd chainviz
npm install
npm run dev
```

### Docker

You can build and run the Docker image locally by running the following commands:

```
git clone https://github.com/helikon-labs/chainviz.git
cd chainviz/docker
docker build -t helikon/chainviz:1.0.0 --no-cache -f ./chainviz.dockerfile ..
docker run --name chainviz -p 8080:8080 -d helikon/chainviz:1.0.0
```

Application is going to be available at port `8080`.

If you'd like to use the existing image from Helikon on Docker Hub, then please use the following commands:

```
docker pull helikon/chainviz:1.0.0
docker run --name chainviz -p 8080:8080 -d helikon/chainviz:1.0.0
```

---
## Test

🚧 This project is in heavy progress, and this repo is subject to frequent change.
Please view [TEST.md](./TEST.md) for testing details.
Empty file added RUN.md
Empty file.
Empty file added TEST.md
Empty file.
2 changes: 1 addition & 1 deletion dist/server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
const express_1 = __importDefault(require('express'));
const path_1 = __importDefault(require('path'));
const http_1 = __importDefault(require('http'));
const port = 3000;
const port = 8080;
class App {
constructor(tcpPort) {
this.port = tcpPort;
Expand Down
7 changes: 7 additions & 0 deletions docker/chainviz.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM node:18.17.1-bookworm-slim
WORKDIR /usr/src/app
COPY . .
RUN npm install
RUN npm run build
EXPOSE 8080
CMD [ "node", "dist/server/server.js" ]
1 change: 1 addition & 0 deletions docker/docker-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker build -t helikon/chainviz:1.0.0 --no-cache -f ./chainviz.dockerfile ..
Binary file added readme-files/chainviz-v1-screenshot-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed readme-files/screenshot_01.png
Binary file not shown.

0 comments on commit 0270374

Please sign in to comment.