Skip to content

Latest commit

 

History

History
86 lines (53 loc) · 3.74 KB

README.md

File metadata and controls

86 lines (53 loc) · 3.74 KB

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

  • staking: The staking explorer also a Next.js app
  • ui: House to core react components for staking applications.
  • services: Holds common logic to share between apps e.g ENS service.
  • utils: Holds utilities used inside the packages and also Apps.
  • wallet: Holds common implementation of a web3 wallet to be shared between apps.
  • eslint-config-custom: eslint configurations (includes eslint-config-next and eslint-config-prettier)
  • tsconfig: tsconfig.jsons used throughout the monorepo

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:

  • Combined tag name v + SemVer format tag (e.g. v3.4.0) to pinpoint repository state on a given production release.

Turborepo Useful Links

Learn more about the power of Turborepo: