/mantle-xyz

Monorepo for mantle website, bridge and faucet

Primary LanguageTypeScript

Mantle XYZ

The official monorepo for the Mantle website, bridge and faucet.

Tech Stack

This monorepo uses turborepo for the monorepo build and pnpm as a package manager. It includes the following packages/apps:

Apps and Packages

Apps (some apps not created yet)

  • mantle-website: The main Mantle.xyz marketing website and pages
  • mantle-bridge: The mantle bridge application
  • mantle-faucet: The mantle faucet application
  • mantle-converter: The mantle converter application
  • mantle-lsd: The mantle liquid staking derivatives (LSD) application
  • mantle-template: A template for other apps

Packages

  • @mantle/eslint-config-next: eslint configurations for nextjs apps
  • @mantle/tsconfig: tsconfig.jsons used throughout the monorepo
  • @mantle/ui: A shared design system component library
  • @mantle/wallet: Shared connectos for the wallet
  • @mantle/utils: A shared utility functions library
  • @mantle/web-tests: e2e tests configurable for all projects

Each package/app is 100% TypeScript.

Utilities

The following tools are being used:

Getting Started

You will need to have Node 16.16.0 LTS and pnpm installed

Build

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

cd mantle-xyz
pnpm run build

Develop

Install dependencies:

cd mantle-xyz
pnpm i

Run all Website, faucet and bridge together:

pnpm run dev

Run projects alone:

Mantle Website

pnpm run dev:web

Mantle Faucet

pnpm run dev:faucet

Mantle Bridge

pnpm run dev:bridge

Mantle Converter

pnpm run dev:converter

Adding packages

Add packages to individual apps

pnpm add <PACKAGE_NAME> --filter mantle-website

For dev dependencies

pnpm add <PACKAGE_NAME> -D --filter mantle-website

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:

cd mantle-xyz
pnpm dlx 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:

pnpm dlx turbo link

Useful Links

Learn more about the power of Turborepo: