Skip to content

Latest commit

 

History

History
84 lines (55 loc) · 3.08 KB

development.md

File metadata and controls

84 lines (55 loc) · 3.08 KB

Development

Services Status

Repository structure

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.

Installing Dependencies

To install dependencies for whole monorepo run pnpm i from the root repo directory.

Build

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

pnpm build

Develop

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

Remote Caching

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

JWT Secret Generation

node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"