Monorepo for maintaining Berachain Applications & Libraries
Monobera requires node 18+.
| Script | Description | 
|---|---|
| pnpm i | Installs packages for all apps & packages | 
| pnpm build | Builds all packages and apps. Not recommended as it takes large amounts of memory | 
| pnpm build:dex | Builds only the Bexand related packages. | 
| pnpm build:honey | Builds only the Honeyand related packages. | 
| pnpm build:bgt | Builds only the BGTand related packages. | 
| pnpm build:lend | Builds only the Bendand related packages. | 
| pnpm build:perp | Builds only the Berpsand related packages. | 
| pnpm build:berajs-docs | Builds only the Berajs Docsand related packages. | 
| pnpm build:ambassador | Builds only the Ambassadorand related packages. | 
| pnpm build:ecosystem | Builds only the Ecosystemand related packages. | 
| pnpm build:pkg | Builds all packages. | 
| pnpm dev | Runs all packages and apps in dev mode. Not recommended as it takes large amounts of memory | 
| pnpm dev:dex | Runs Bexand related packages in dev mode. | 
| pnpm dev:honey | Runs Honeyand related packages in dev mode. | 
| pnpm dev:bgt | Runs BGTStation and related packages in dev mode. | 
| pnpm dev:lend | Runs Bendand related packages in dev mode. | 
| pnpm dev:perp | Runs Berpsand related packages in dev mode. | 
| pnpm dev:berajs-docs | Runs Berajs Docsand related packages in dev mode. | 
| pnpm dev:ambassador | Runs Ambassadorand related packages in dev mode. | 
| pnpm dev:ecosystem | Runs Ecosystemand related packages in dev mode. | 
| pnpm clean | Cleans the project using turbo clean and removes untracked files with git clean, including node_modules. | 
| pnpm pullenv | Pulls production environment variables from Vercel. Requires Vercel Login | 
| pnpm check-types | Runs type-checking across all apps and packages. | 
| pnpm lint | Lints all apps and packages. | 
| pnpm format:check | Checks the formatting of all apps and packages without making changes. | 
| pnpm format | Formats the apps and packages and writes the changes. | 
| pnpm check | Performs a comprehensive check of all apps and packages, including linting and type-checking. | 
| pnpm prepare | Installs Husky, setting up Git hooks for the project. | 
| pnpm upsertenv | Runs a script to upsert environment variables in Vercel for the project. | 
| pnpm knip | Executes the knip command to exclude binaries from operations. | 
To run Bex for example, run pnpm i && pnpm dev:dex
| App | Description | 
|---|---|
| app/dex | Bexapplication code | 
| app/honey | Honeyapplication code | 
| app/bgt-station | BGT Stationapplication code | 
| app/lend | Bendapplication code | 
| app/perp | Berpsapplication code | 
| app/ambassador | Ambassadorapplication code | 
| app/ecosystem | Ecosystemapplication code | 
| Package | Description | 
|---|---|
| packages/berajs | A Typescript package for interacting with Berachain. View Docs | 
| packages/wagmi | A package to create a shared wagmi / dynamic config for web3 applications | 
| packages/config | A package to store shared config variables across applications | 
| packages/graphql | A package to store appolo clients / gql subgraph queries | 
| packages/proto | A package to generate e2e typing & protobuf for interacting with Cosmos-SDK | 
| packages/shared-ui | A package of built UI widgets made from packages/uicomponent | 
| packages/ui | A package of shadcn components | 
| packages/beracrocswap | A forked version of CrocSwap SDK to work better with packages/berajs | 
All Berachain dapps are built to be single chain applications.
| Environment Variables | Environment | 
|---|---|
| .env.devnet | Environment variables for running the application against our Devnet. Subject to change often | 
| .env.testnet | Environment variables for running the application against our Testnet. Subject to change often | 
| .env.prod | thoon | 
To run our applications in one of these environments, simply copy and paste a .env.* file into your .env and run any application.
A short list of tooling and libraries we use across all apps and packages.
Banners serve as an essential tool for communicating urgent messages or event-related information to users across the site. The management of these banners is centralized in the Bannerconfig component, located within the packages/shared-ui directory. This allows for effective global notification during scenarios like RPC issues or network congestion.
For targeted communications, banners can be configured to appear on specific pages by listing the desired paths in the hrefs field. For example, to display a banner only on the "Pools," "Swap," and homepage in BEX, you would set hrefs to ["/pools", "/swap", "/"].
To modify the banner configuration, submit a PR with changes to the enabled field in the bannerConfig. This will update the banner's active status and display it as specified.