cartesi / explorer

Cartesi Blockchain Explorer
https://explorer.cartesi.io
Apache License 2.0
9 stars 12 forks source link

Explorer

This is a monorepo holding up two explorer applications from Cartesi. One is the well established Staking platform where users can participate in the network running they own private node, becoming a pool manager and/or also becoming a staking delegator. The second application is the new Rollup's explorer that will support Dapp developers.

What's inside?

This monorepo uses Yarn v1 as a package manager and is controlled by turborepo.

Package Installation

You can add, remove and upgrade packages from within your monorepo using your package manager's built-in commands:

yarn workspace <workspace> add <package>

Refer to Turborepo package-installation session for more information.

Apps and Packages

Each package/app is 100% TypeScript.

Utilities

This turborepo has some additional tools already setup for you:

Develop

To develop all apps and packages, run the following command:

yarn run dev

Note: When running turborepo tasks like dev or build it will run apps like staking in parallel. e.g. when you want only to do dev on staking app, you should filter the task

The filtering should be done by the name inside the package.json of the targeted apps/*

yarn run dev --filter staking

Test coverage reporting

We are using Coveralls as a reporting tool for our tests' coverage. Each workspace that has tests, generates coverage report for them as well using the test:ci npm script. At each build we merge coverage reports for all workspaces, and then send the merged report to Coveralls.

To include a new workspace that has tests in the merged coverage report, all you need to do is provide in its dedicated package.json file the test:ci script (found in existing workspaces).

Build

To build all apps, run the following command:

yarn run build

Note: We are not building the packages since it is only for internal use. The transpilation/compilation is delegated to the application using the package. That may change in the future.

Release

The project use tags that represent releases, including a branch to signal cloud providers to update the production code (e.g. Staking).

That is as follows:

Turborepo Useful Links

Learn more about the power of Turborepo: