Sesi 3: Frontend DApp Development
ð Informasi Sesiâ
Tanggal: Sabtu, 1 November 2025 Waktu: 09:00 - 17:00 WIB (8 jam) Lokasi: Kampus BINUS Kemanggisan Format: Workshop tatap muka (offline) Peserta: 40-80 pengembang Level: Intermediate - Frontend & Web3 Integration
ðŊ Tujuan Pembelajaranâ
Setelah menyelesaikan sesi ini, Anda akan mampu:
- Setup Modern Frontend Stack - Next.js 15, React 19, TypeScript, Tailwind CSS
- Wallet Connection - Integrasi wallet menggunakan Panna SDK dengan gasless transactions
- Smart Contract Interaction - Read & write data menggunakan Thirdweb SDK
- Component Architecture - Membangun modular React components
- Real-time Updates - Auto-refresh data dari blockchain
- Production Deployment - Deploy aplikasi ke Vercel
ð Jadwal Workshopâ
| Waktu | Durasi | Aktivitas | Format |
|---|---|---|---|
| 08:30 - 09:00 | 30m | Registrasi & Setup Environment | Persiapan |
| 09:00 - 09:15 | 15m | Review Sesi 1-2 & Agenda Hari Ini | Pembukaan |
| 09:15 - 10:45 | 90m | Module 1: Setup & Architecture | Theory + Setup |
| 10:45 - 11:00 | 15m | Istirahat | Break |
| 11:00 - 12:30 | 90m | Module 2: Contract Integration | Hands-on |
| 12:30 - 13:30 | 60m | Istirahat Makan Siang | Lunch |
| 13:30 - 15:00 | 90m | Module 3: UI Components (Part 1) | Hands-on |
| 15:00 - 15:15 | 15m | Istirahat | Break |
| 15:15 - 16:45 | 90m | Module 3: UI Components (Part 2) | Hands-on |
| 16:45 - 17:00 | 15m | Deployment & Closing | Wrap-up |
ð Prerequisitesâ
Yang Harus Sudah Selesai:â
â Sesi 1 - Fondasi Web3:
- Memahami blockchain basics
- Solidity fundamentals
- LiskGarden smart contract sudah deployed ke Lisk Sepolia
- PENTING: Simpan contract address dari Sesi 1!
Tools yang Dibutuhkan:â
â Development Tools:
- Node.js v18.17+ (Download)
- VS Code atau code editor pilihan
- Git untuk version control
â Blockchain Tools:
- MetaMask wallet extension
- Lisk Sepolia ETH (dari faucet: sepolia-faucet.lisk.com)
- LiskGarden Contract Address dari Sesi 1
â Accounts (Free):
- Panna SDK Account - Sign up di panna.network untuk client ID
- Thirdweb Account - Sign up di thirdweb.com untuk client ID (optional)
ð Struktur Dokumentasiâ
Dokumentasi ini dibagi menjadi 3 parts untuk memudahkan pembelajaran:
ð Part 1: Setup & Contract Integrationâ
Module 1 & 2 (09:15 - 12:30)
- Setup Next.js 15 + React 19 project
- Install dependencies (Panna SDK, Thirdweb, shadcn/ui)
- Configure Lisk Sepolia network
- Setup contract types & ABI
- Create contract interaction utilities
- Build custom React hooks (useContract, usePlants)
ð Part 2A: Building UI Componentsâ
Module 3 Part A (13:30 - 15:00)
- GardenHeader (wallet connection dengan Panna SDK)
- usePlantStageScheduler (auto-sync plant stages)
- PlantCard (individual plant cards)
- GardenGrid (responsive grid layout)
ð Part 2B: Building UI Components (Lanjutan)â
Module 3 Part B (15:15 - 16:45)
- PlantDetailsModal (modal lengkap dengan visualization & actions)
- PlantSeedModal (modal untuk planting seeds)
- StatsSidebar (real-time statistics & game info)
- Main page.tsx (menggabungkan semua components)
ð Part 3: Deployment & Productionâ
Deployment (16:45 - 17:00)
- Build optimization
- Environment variables setup
- Deploy ke Vercel
- Testing production build
ðŪ Aplikasi Yang Akan Dibangunâ
LiskGarden DApp - Game blockchain sederhana dengan mekanik:
Core Features:â
- ðą Plant Seeds - Tanam seed dengan bayar 0.001 ETH
- ð§ Water Plants - Siram plants untuk menjaga tetap hidup
- ð Growth Stages - Plants tumbuh melalui 4 stage dalam 3 menit
- ðļ Harvest Rewards - Panen blooming plants untuk dapat 0.003 ETH
- â ïļ Water Depletion - Water berkurang 20% setiap 30 detik
- ð Auto-Refresh - Data update otomatis setiap 5 detik
- ⥠Gasless Transactions - Gratis! Tidak perlu bayar gas fee (via Panna SDK)
Growth Timeline (Total 3 menit):â
- ðą Seed (0-1 menit)
- ðŋ Sprout (1-2 menit)
- ðŠī Growing (2-3 menit)
- ðļ Blooming (Siap panen!)
Game Economics:â
- Plant Cost: 0.001 ETH
- Harvest Reward: 0.003 ETH
- Profit: 3x ROI (200% profit!)
- Water Depletion: 20% setiap 30 detik
- Gas Fees: GRATIS via Panna SDK Account Abstraction
ð ïļ Tech Stackâ
Frontend Framework:â
- Next.js 15.2.4 - React framework dengan App Router
- React 19 - Latest React version
- TypeScript 5 - Type safety
- Tailwind CSS 4 - Utility-first CSS framework
UI Components:â
- shadcn/ui - Component library (built on Radix UI)
- Lucide React - Icon library
- Geist Font - Modern font dari Vercel
Web3 Integration:â
- Panna SDK 0.1.0 - Wallet connection + Account Abstraction (gasless!)
- Thirdweb SDK - Smart contract interactions
- ethers v6 - Ethereum utilities
Development Tools:â
- next-themes - Dark/light mode
- sonner - Toast notifications (via shadcn/ui)
- date-fns - Date formatting
Deployment:â
- Vercel - Hosting platform
- Lisk Sepolia - Blockchain network (Chain ID: 4202)
ðĄ Key Concepts: Panna SDK & Account Abstractionâ
Apa itu Account Abstraction?â
Traditional Wallet (EOA):
â User harus punya ETH untuk gas fees
â Setiap transaction butuh approve di wallet
â Kehilangan private key = kehilangan semua
â Complex UX untuk non-crypto users
Account Abstraction (via Panna SDK):
â
Gasless transactions - app sponsor gas fees
â
Better UX - seperti Web2 apps
â
Smart contract wallet - programmable
â
Social recovery options
Panna SDK Features:â
ðŊ Yang Sudah Otomatis:
- â Gasless Transactions - User tidak perlu bayar gas!
- â Wallet Connection - Support MetaMask, WalletConnect, dll
- â Account Abstraction - Smart contract wallet automatic
- â Multi-chain Support - Mudah switch network
ð Yang Kita Lakukan:
// Cukup wrap app dengan PannaProvider
<PannaProvider clientId="..." partnerId="...">
{children}
</PannaProvider>
// Gasless transactions OTOMATIS aktif! ð
ð Cara Menggunakan Dokumentasiâ
Navigasi:â
- Mulai dari Part 1 (Setup & Contract Integration)
- Lanjut ke Part 2 (Building UI Components)
- Selesaikan dengan Part 3 (Deployment)
- Setiap part memiliki link navigasi di bagian bawah
Tips Belajar:â
- â Follow step-by-step - Jangan skip langkah apapun
- â Type code manually - Jangan hanya copy-paste
- â Test incrementally - Test setelah setiap section
- â Ask questions - Instruktur siap membantu
- â Git commit - Commit progress setelah setiap module
Troubleshooting:â
- Jika ada error, cek browser console (F12)
- Pastikan semua dependencies terinstall
- Verify contract address di
.env.local - Check wallet connected & network correct
ðŊ Learning Outcomesâ
Setelah selesai workshop ini, Anda akan:
â Memahami:
- Modern Web3 frontend architecture
- Panna SDK untuk wallet management & gasless transactions
- Thirdweb SDK untuk contract interactions
- React hooks untuk Web3 operations
- Real-time blockchain data handling
- Production deployment best practices
â Bisa Membuat:
- Full-stack DApp dengan Next.js 15
- Wallet integration dengan multiple providers
- Interactive UI dengan real-time updates
- Production-ready Web3 application
â Siap Untuk:
- Build hackathon projects
- Apply to Lisk EMpower Fund
- Contribute to Web3 open source
- Career sebagai Web3 developer
ð Important Notesâ
Contract Address dari Sesi 1:â
Pastikan Anda punya LiskGarden contract address yang sudah deploy di Sesi 1.
Example Contract Address:
0xf44adEdec3f5E7a9794bC8E830BE67e4855FA8fF
Lisk Sepolia Network Info:â
Chain ID: 4202
RPC URL: https://rpc.sepolia-api.lisk.com
Explorer: https://sepolia-blockscout.lisk.com
Faucet: https://sepolia-faucet.lisk.com
Panna SDK Setup:â
Anda perlu mendaftar di panna.network untuk mendapatkan:
NEXT_PUBLIC_PANNA_CLIENT_IDNEXT_PUBLIC_PANNA_PARTNER_ID
Kedua credentials ini GRATIS dan akan enable gasless transactions!
ð Ready to Start?â
Mari kita mulai membangun DApp pertama Anda dengan gasless transactions!
ð Part 1: Setup & Contract Integration â
ð Support & Resourcesâ
Jika mengalami masalah:
- Tanya instruktur di workshop
- Check Telegram group: Kelas Rutin Batch IV
- Refer to Lisk Docs
- Review Panna SDK Docs
- Review Thirdweb Docs
Learning Resources:
Let's build your first gasless DApp! ð
#BuildOnLisk | #EthereumJakarta | #Web3Indonesia