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.
This monorepo uses Yarn v1 as a package manager and is controlled by turborepo.
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.
staking
: The staking explorer also a Next.js appui
: 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 (includeseslint-config-next
andeslint-config-prettier
)tsconfig
:tsconfig.json
s used throughout the monorepo
Each package/app is 100% TypeScript.
This turborepo has some additional tools already setup for you:
- TypeScript for static type checking
- ESLint for code linting
- Prettier for code formatting
To develop all apps and packages, run the following command:
yarn run dev
Note: When running turborepo tasks like
dev
orbuild
it will run apps like staking in parallel. e.g. when you want only to dodev
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
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).
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.
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.
Learn more about the power of Turborepo: