This monorepo uses turborepo for tasks/caching and pnpm as a package manager. It includes the following packages/apps:
Apps:
@sni/assets-gateway
: API for retrieving assets metadata from various blockchains.@sni/contracts
: solidity contracts for DEEP Protocol built with Hardhat and OpenZeppelin.@sni/gateway
: GraphQL gateway built with GraphQL Mesh (DEPRECATED).@sni/indexer
: indexer for The Graph (DEPRECATED).@sni/verification-portal
: REAL website for interacting with DEEP Protocol.@sni/web3-highlights
: utility API for retrieving highlights lists.
Packages:
@sni/constants
: Shared constants.@sni/configs
: Shared configs.@sni/json-schemas
: Shared JSON schemas.@sni/solidity-interfaces
: Shared Solidity interfaces, like IDerivative.
To install dependencies for whole monorepo run pnpm i
from the root repo directory.
To build all apps and packages, run the following command:
pnpm build
To develop all apps and packages, run the following command:
pnpm -r --parallel run dev
To develop specific package run:
pnpm dev --filter <PACKAGE_NAME>
For example, to develop verification portal, run:
pnpm dev --filter @sni/verification-portal
Turborepo can use a technique known as Remote Caching to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can create one, then enter the following commands:
npx turbo login
This will authenticate the Turborepo CLI with your Vercel account.
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your turborepo:
npx turbo link
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"