mn-scaffold
v1.0.2
Published
Scaffold Midnight network project templates interactively
Maintainers
Readme
mn-scaffold
Scaffold Midnight blockchain projects from a curated template registry — interactively, in seconds.
Usage
npx mn-scaffoldThe CLI walks you through four steps:
- Category — pick a domain (Basics, DeFi, ZK & Privacy, etc.)
- Difficulty — filter by Beginner, Intermediate, or Advanced
- Template — choose from available templates with descriptions
- Project name — defaults to the template slug
Your project is scaffolded locally and ready to build.
Templates
Templates are fetched live from the Midnight Club registry. Current offerings:
Basics
| Template | Difficulty | |---|---| | Hello World | Beginner | | Counter | Beginner | | Calculator | Beginner |
State & Storage
| Template | Difficulty | |---|---| | Todo | Beginner | | Bulletin Board | Beginner |
Governance & Finance
| Template | Difficulty | |---|---| | Escrow | Intermediate | | Voting | Intermediate | | Quadratic Voting | Intermediate |
DeFi Primitives
| Template | Difficulty | |---|---| | Token Transfers | Intermediate | | Bonding Curve | Intermediate |
ZK & Privacy
| Template | Difficulty | |---|---| | ZK Allowlist | Advanced | | Battleship | Advanced |
All templates are Compact smart contracts targeting the Midnight testnet.
How it works
Templates live in tusharpamnani/midnight-programs-list as subdirectories in a monorepo. The CLI fetches metadata from templates.json hosted on Midnight Club, then uses degit to scaffold only the chosen subdirectory — no full repo clone, no extra history.
Contributing a template
- Add your template as a subdirectory in
midnight-programs-listfollowing the existing structure - Add an entry to
templates.jsonin the Midnight Club repo:
{
"id": "your-template-id",
"title": "Your Template",
"description": "One sentence describing what it demonstrates.",
"category": "ZK & Privacy",
"difficulty": "advanced",
"repo": "tusharpamnani/midnight-programs-list",
"subdir": "compact-your-template",
"branch": "main",
"link": "https://github.com/tusharpamnani/midnight-programs-list/tree/main/compact-your-template"
}- Open a PR — once merged, the template is live in the CLI immediately.
Built with
License
MIT
