Today we are introducing create-patchwork, a comprehensive project generator that supercharges the Patchwork Development Kit (PDK) with full-stack application scaffolding. While PDK excels at generating smart contracts, create-patchwork extends this functionality to handle all the infrastructure needed for a production-ready onchain application on Base.
Our first batch of builders gave us the feedback that while config driven smart contract generation was useful, there is still a time consuming long-tail of services, tools, and deployment infrastructure needed on launch onchain application.
Generated Components
Every create-patchwork project includes:
Smart Contracts: Patchwork-compatible contracts with your defined data models
Contract Deployment: Preconfigured create2 deployers for deterministic addresses
Data Infrastructure:
Ponder configuration for event indexing
Database schemas for persistent storage
Event handlers for processing onchain activity
API Layer:
tRPC endpoints for type-safe API access
Event hooks for real-time updates
Frontend Utilities:
React hooks for contract interaction
Type safe API integration
DevOps:
Docker configuration for service orchestration
Local development environment with anvil
Getting Started
Create-patchwork requires Foundry's forge to be installed. Once you have forge, starting a new project is as simple as running:
pnpm create patchwork
Alternatively, head over to the Patchwork Wizard to design your application's entities, data model, and relationships and generate your custom application with your exported config:
pnpm create patchwork patchwork.config.ts
From your new project's root, you can deploy and run everything simply by doing:
and shut it down by doing:
PDK is smart enough to understand which generators need to be run again as you start making changes in the codebase, or when you switch networks.
This is just the beginning
With create-patchwork, developing using Patchwork is currently medium-to-low code. All of our codegen is procedural and configuration-driven which gives us two advantages:
We can produce much higher quality and predictable output than wild west LLMs
We can easily train models to understand and build Patchwork configuration files, which opens a path where you tell an agent what you want to build and you'll get generated contracts in seconds
As we continue to build out capabilities in our generators and greater tooling suite, we see a clear path from low-code to no-code text-to-app. Watch this space.
ā
Keen to follow along and build with us? Join our Discord.