
From Zero to GenLayer: Connecting Your dApp with Next.js and genlayer-js (Part 3/3)
Your contract is deployed. It lives on the GenLayer network, it can create bets, accept them, and use AI to resolve subjective outcomes. You tested it in Studio, watched validators argue about whether a movie was "critically acclaimed," and saw the right answer win. That was satisfying. But nobody is going to interact with your contract through a developer console. They need a frontend. So let us build one. Project Setup GenLayer provides an official boilerplate that gives you a full-stack project out of the box. Clone it: git clone https://github.com/genlayerlabs/genlayer-project-boilerplate.git GenBets cd GenBets Take a look at what you get: GenBets/ contracts/ # Python intelligent contracts frontend/ # Next.js 15 app (TypeScript, Tailwind, TanStack Query) deploy/ # TypeScript deployment scripts test/ # Python integration tests The boilerplate ships with a sample contract called football_bets.py . We do not need it. Replace it with the genbets.py contract you wrote in Part 2: cp your
Continue reading on Dev.to Tutorial
Opens in a new tab




