
BasePetition
Create and sign transparent, on-chain petitions on Base with IPFS-powered metadata.
Demo
About
BasePetition is an on-chain petition platform built on Base that helps communities turn public concerns into transparent, verifiable action. Anyone can create a petition with a title, description, image, signature goal, and deadline. Petition metadata and images are stored through IPFS, while petition creation and every signature are recorded on Base through a smart contract. Visitors can browse petitions, review their progress, connect a wallet, and sign without relying on a centralized database. Creators can manage their petitions and track activity from a personal dashboard, while anyone can inspect petition details and signer addresses directly on-chain. The platform also includes petition lifecycle management, deadlines, creator controls, and basic moderation visibility for safer public participation.
How it's made
BasePetition is built with Next.js 16 App Router, React, TypeScript, and Tailwind CSS. The frontend uses Wagmi and Viem for wallet connection, contract reads, transaction submission, chain selection, and receipt tracking, with TanStack Query handling caching and reactive updates. The application runs on Base and interacts with a Solidity 0.8.20 smart contract that manages petition creation, deadlines, lifecycle status, signature uniqueness, signer records, creator dashboards, pagination, and owner moderation controls. Petition text and images are uploaded through a Next.js API route to Pinata/IPFS, with the resulting metadata URL stored alongside the petition on-chain. The blockchain remains the source of truth, while the UI reconstructs progress and status from contract reads and events. We also use ERC-8021 transaction attribution through `ox` so submitted transactions can be identified as coming from the application. This combination keeps the interface responsive while preserving publicly verifiable petition data.