Web3 Monorepo is an open-source, NX-based full-stack starter template for building web3 services, combining a Next.js frontend, Hasura GraphQL gateway, and NestJS backend for blockchain applications. It provides everything needed to run a dApp with wallet and social authentication, smart contract wallet features, and live on-chain data queries.
What is Web3 Monorepo?
Web3 Monorepo is a monorepo boilerplate that scaffolds a complete web3 stack: Next.js v13 with ChakraUI for the frontend, Hasura as a GraphQL API gateway to Postgres, Prisma ORM for database management, and NestJS for business logic. It runs locally with Docker Compose and pnpm, and is deployable to Vercel, Hasura Cloud, and Railway.app (a live example is at web3-monorepo.app). The project was created by sebpalluel and is based on the nextarter-chakra template.
Key Features
- NX monorepo structure — Organizes apps and libraries with Nx, including code generation, dependency graph, and Nx Cloud caching for up to 10x faster builds.
- Web3 authentication — Next-Auth with SIWE enables sign-in with MetaMask/WalletConnect; Biconomy smart contract wallet and Web3Auth add social login via Google/Facebook and gasless transactions.
- Hasura GraphQL gateway — Hasura exposes a single GraphQL endpoint tied to Postgres, with next-auth adapter, and role-based query generation for user and admin.
- NestJS backend services — Nest.js extends Hasura and handles blockchain operations such as fetching ERC20 token balances on Ethereum, Polygon, and Arbitrum through Alchemy RPC.
- The Graph integration — The Graph Graph Client queries live smart-contract data, with code generation configured via a
.graphclientrc.ymlfile. - ChakraUI component library — The Next.js app uses ChakraUI with a reusable UI components library in
libs/client/ui, and Storybook with interaction tests and Chromatic visual reviews. - Pre-configured testing — Jest for unit/integration tests with an in-memory test database and Hasura engine; Cypress for e2e/component tests with session cookies for three test users.
Who is it for?
- Web3 developers — bootstrap a full-stack dApp in minutes, instead of integrating Hasura, NextAuth, and Biconomy from scratch.
- Startups — launch a web3 service with passwordless social login and gasless transactions via Web3Auth and Biconomy.
- Blockchain engineers — query on-chain data with The Graph, manage RPC providers for Ethereum/Polygon/Arbitrum, and extend backend logic with NestJS.
- Full-stack teams — take advantage of the NX monorepo with TypeScript, ESLint, Prettier, Husky hooks, and a standard CI pipeline.
What can you do with Web3 Monorepo?
- dApp developers — set up wallet sign-in with SIWE, plus a Biconomy smart contract wallet, so users can interact with your service without managing gas fees.
- Backend developers — create additional NestJS services to extend Hasura, such as the included ERC20 balance API for Ethereum, Polygon, and Arbitrum.
- Data analysts — use The Graph Graph Client to pull live data from smart contracts into the web app, as demonstrated on the Blockchain page.
- QA engineers — run Cypress e2e tests with pre-injected NextAuth session cookies for Alpha Admin, Beta Admin, and Seb Google users.
How does Web3 Monorepo work?
The repository uses an NX workspace with apps for the Next.js client and NestJS server, plus a hasura folder for migrations/metadata and a prisma folder for database schema. Quick install requires pnpm: install dependencies, set .env with Alchemy API keys, run pnpm start to launch Docker services, then apply Prisma migrations with pnpm prisma-db:dev:start. Local access includes the Hasura console on port 9695, the Next.js app on port 3000, and Mailhog on port 8025.
FAQ
Does Web3 Monorepo support social login?
Yes. The project integrates Web3Auth through Biconomy, allowing users to authenticate with Google or Facebook in addition to Ethereum wallets like MetaMask and WalletConnect. The sign-in flow is handled by Next-Auth with a SIWE provider.
Which blockchains are supported by default?
The template includes RPC providers for Ethereum, Polygon, and Arbitrum via Alchemy. The NestJS backend also uses ethers to interact with EVM-compatible blockchains, so additional networks can be added.
How do I configure the required API keys?
You need to create an Alchemy account and obtain API tokens for Ethereum, Polygon, and Arbitrum mainnets. Add them to a .env file; client-side keys can be omitted and replaced by a public RPC network, but server-side keys are required for the NestJS app.
What testing tools are pre-configured?
Jest handles unit and integration tests with an in-memory test database and Hasura engine; Cypress handles e2e and component tests. Both run through NX commands like pnpm affected:test and pnpm affected:e2e.
Is Web3 Monorepo free to use?
It is an open-source public repository on GitHub, so the template itself is free. You are responsible for costs of external services such as Alchemy, Hasura Cloud, Vercel, and Railway when deploying.







