A production-ready Next.js 15 starter template with TypeScript, Tailwind CSS v4, testing, linting and optional AWS deployment infrastructure.
genlayerlabs/genlayer-project-boilerplate
Boilerplate for building GenLayer intelligent contracts, using a football bets game as the example, with tests, linting, CI and a Next.js frontend.
- Stars
- 19,304
- Forks
- 937
- Open issues
- 38
- Last commit
- 2 months ago
What is it?
This repository is a starter template for building an intelligent contract on GenLayer. Its example is a football bets game: users predict the winner of a match, and the contract later fetches the result from BBC Sport, uses an LLM to extract the score, and checks the outcome through the equivalence principle before awarding points.
The template covers the full development loop. A GenVM linter checks Python contracts for forbidden imports, non-deterministic calls and invalid storage types before deployment. Fast in-memory direct tests use mocks for web and LLM calls, while integration tests run against GenLayer Studio. A GitHub Actions workflow runs linting and direct tests.
A Next.js 15 frontend built with TypeScript, TanStack Query and Radix UI connects to the deployed contract through an environment variable. Deployment scripts and a network configuration file are included.
Key features
- 01Example intelligent contract that fetches web data and calls an LLM
- 02Static linter that flags non-deterministic code and invalid storage types
- 03In-memory direct tests with mocks for web and LLM responses
- 04Integration tests run against GenLayer Studio
- 05GitHub Actions CI for linting and direct tests
- 06Next.js 15 frontend with TypeScript, TanStack Query and Radix UI
Use cases
- Starting a new GenLayer intelligent contract project from a working example
- Learning how web access and LLM calls are structured inside a contract
- Setting up linting and CI checks for contract code before deployment
Quick start
- 1
Install the GenLayer CLI globally
npm install -g genlayer - 2
Create a Python virtual environment (Python 3.12+)
python3 -m venv .venv - 3
Run the fast in-memory direct mode tests (no Studio needed)
pytest tests/direct/ -v - 4
Install frontend dependencies in the frontend folder, then run npm run dev
npm install
Things to know
- Python 3.12 or newer is required.
- Integration tests and deployment need a running GenLayer Studio, local or hosted.
- The frontend needs a deployed contract address set in its environment file before it works.
In collections
Topics
FAQ
- What is genlayer-project-boilerplate?
- Boilerplate for building GenLayer intelligent contracts, using a football bets game as the example, with tests, linting, CI and a Next.js frontend. This repository is a starter template for building an intelligent contract on GenLayer. Its example is a football bets game: users predict the winner of a match, and the contract later fetches the result from BBC Sport, uses an LLM to extract the score, and checks the outcome through the equivalence principle before awarding points.
- Is genlayer-project-boilerplate free to use? What license does it have?
- genlayer-project-boilerplate is open source under the MIT license. Check the license terms before using it in commercial products.
- Is genlayer-project-boilerplate still maintained?
- Updated within 6 months. The last commit to genlayer-project-boilerplate was on Sep 9, 2026.
- What can I use genlayer-project-boilerplate for?
- Starting a new GenLayer intelligent contract project from a working example Learning how web access and LLM calls are structured inside a contract Setting up linting and CI checks for contract code before deployment
- How do I install genlayer-project-boilerplate?
- Install the GenLayer CLI globally: npm install -g genlayer Create a Python virtual environment (Python 3.12+): python3 -m venv .venv Run the fast in-memory direct mode tests (no Studio needed): pytest tests/direct/ -v Install frontend dependencies in the frontend folder, then run npm run dev: npm install
- Where can I get genlayer-project-boilerplate?
- The source code and installation instructions are on GitHub: https://github.com/genlayerlabs/genlayer-project-boilerplate
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Interactive web app and generator that builds smart contracts from OpenZeppelin Contracts components for Solidity, Cairo, Stellar, Stylus and more.
The second edition of "Mastering Ethereum", a book covering Ethereum development, smart contracts, and the network's underlying technology.
Rust SDK for the Solana blockchain, providing core types and interfaces for on-chain programs and the Agave validator.
Ethereum development environment for compiling, deploying, testing, and debugging smart contracts and dapps.
Open-source Next.js SaaS starter with Clerk auth, multi-tenancy, RBAC, i18n, Drizzle ORM and Tailwind CSS.