The official monorepo for the Mantle website, bridge and faucet.
This monorepo uses turborepo for the monorepo build and pnpm as a package manager. It includes the following packages/apps:
Apps (some apps not created yet)
mantle-website
: The main Mantle.xyz marketing website and pagesmantle-bridge
: The mantle bridge applicationmantle-faucet
: The mantle faucet applicationmantle-converter
: The mantle converter applicationmantle-lsd
: The mantle liquid staking derivatives (LSD) applicationmantle-template
: A template for other apps
Packages
@mantle/eslint-config-next
:eslint
configurations for nextjs apps@mantle/tsconfig
:tsconfig.json
s 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.
The following tools are being used:
- Supagraph for creating indexes from onchain events
- MongoDB for storing indexes from onchain events
- TypeScript for static type checking
- ESLint for code linting
- Prettier for code formatting
- Husky for for git hooks
- Commitlint for cleaner commit messages
You will need to have Node 16.16.0 LTS and pnpm installed
To build all apps and packages, run the following command:
cd mantle-xyz
pnpm run build
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
Add packages to individual apps
pnpm add <PACKAGE_NAME> --filter mantle-website
For dev dependencies
pnpm add <PACKAGE_NAME> -D --filter mantle-website
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
Learn more about the power of Turborepo: