If you're looking to build decentralized applications on Linera blockchain, setting up the development environment from scratch can be tedious. That's why I created Linera Dynamic Template β a production-ready Next.js starter that handles all the boilerplate for you.
What is Linera?
Linera is a next-generation blockchain platform designed for scalability through its unique microchain architecture. Unlike traditional blockchains, Linera enables parallel execution across multiple chains, making it ideal for high-throughput applications.
The Problem
Getting started with Linera development involves:
- Configuring SharedArrayBuffer support (COOP/COEP headers)
- Setting up WASM smart contract compilation
- Integrating wallet authentication
- Managing cross-origin policies for browser execution
This template eliminates all that friction.
Features
- π Dynamic wallet authentication β Easy login integration
- βοΈ Linera blockchain interaction β Pre-configured client adapter
- β‘ Next.js 16 + React 19 β Latest framework features
- π¨ Tailwind CSS β Modern styling out of the box
- π¦ Example counter contract β Rust/WASM smart contract included
- π οΈ CLI scripts β Wallet and contract management tools
Quick Start
# Clone with GitHub CLI
gh repo create my-linera-app --template uratmangun/linera-dynamic-template --clone
cd my-linera-app
pnpm install
# Configure environment
cp .env.example .env.local
# Add your Dynamic environment ID
# Start developing
pnpm dev
Project Structure
βββ src/
β βββ app/ # Next.js app router pages
β βββ lib/ # Linera adapter and utilities
βββ contracts/ # Rust smart contracts (WASM)
βββ scripts/ # CLI scripts for wallet/contract management
βββ public/ # Static assets
Available Scripts
| Command | Description |
|---|---|
pnpm dev |
Start development server |
pnpm wallet:init |
Initialize Linera wallet |
pnpm wallet:show |
Show wallet info |
pnpm contract:build |
Build smart contract |
pnpm contract:deploy |
Deploy smart contract |
Tech Stack
- Next.js 16 β React framework with app router
- Dynamic β Wallet authentication provider
- Linera β Blockchain platform
- Rust β Smart contract language
- Tailwind CSS β Utility-first styling
- TypeScript β Type safety throughout
Key Technical Details
The template handles the tricky COOP/COEP headers required for SharedArrayBuffer support in browsers:
// next.config.ts
async headers() {
return [{
source: "/(.*)",
headers: [
{ key: "Cross-Origin-Opener-Policy", value: "same-origin" },
{ key: "Cross-Origin-Embedder-Policy", value: "credentialless" },
{ key: "Cross-Origin-Resource-Policy", value: "cross-origin" },
],
}];
}
This is essential for Linera's WASM client to function properly in the browser.
Get Started
Check out the template on GitHub: uratmangun/linera-dynamic-template
Click "Use this template" to create your own Linera dApp in seconds!
Have questions or feedback? Drop a comment below or open an issue on GitHub. Happy building! π
Demo
Top comments (16)
Did you get bonus prize for all the articles you wrote for the Code with Kiro Hackathon?
not yet wby?
I was just asking tbh.
Thank you for the info.
ah no problem but you also win the bonus prize for kiro?
I didn't participate last time, asking for this time- the ongoing hackathon.
ah i see i thought you won last time as well hopefully you win this time you have access to kirodotdev? you need to ask the mod in discord for access so you can write here as well
Thank you
I didn't participate last time btw.
Didn't know i needed Mod's permission.
Thank you for this info
But the results were announced long ago. It's still not clarified if you'll be getting the bonus prize for articles?
i dont know as well lol hopefully sooner but yeah i think you need to ask kiro organizer if you winning as well but im waiting patiently
Didn't participate honestly.
But thank you for the response.
ask corey kiro in discord and ask for access to write in kirodotdev so you can participate in this bonus blog post prize
Gotcha!
Thank you Uratmangun
Thanks for the useful information.
always pleasure to help
Some comments may only be visible to logged-in visitors. Sign in to view all comments.