A curated collection of Midnight programs — from pure Compact contracts to full-stack DApps — built with Compact and TypeScript.
Each program is organized in its own dedicated folder:
compact-[programname]— Pure Compact contract programs (CLI-based)midnight-[projectname]— Full-stack DApps with frontend + contract
Legend:
- 🟢 Completed
- 🟡 In Progress
- 🔴 Planned
- 🏗️ Work in Progress
- ✅ Tests Available
- ❌ No Tests
| Program | Description | Features | Status |
|---|---|---|---|
| Hello World | Hello World on Midnight | Compact Public State ZK Proofs CLI |
🟢 ❌ |
| Counter | Counter on Midnight | Compact Public State ZK Proofs CLI |
🟢 ❌ |
| Escrow | Escrow on Midnight | Compact Public State ZK Proofs CLI |
🟢 ✅ |
| Todo | Todo App on Midnight | Compact Private State ZK Proofs CLI |
🟢 ❌ |
| Voting | Voting App on Midnight | Compact Commit-Reveal ZK Proofs CLI |
🟢 ❌ |
| Calculator | Calculator on Midnight | Compact Witness Function Verification CLI |
🟢 ❌ |
| Token Transfers | Token Transfers on Midnight | Compact Mint Shielded Unshielded CLI |
🟢 ❌ |
| Bulletin Board | Bulletin Board on Midnight | Compact Public State ZK Proofs CLI |
🟢 ❌ |
| Battleship | Battleship game on Midnight | Compact Private State ZK Proofs CLI |
🟢 ❌ |
| Allowlist | Allowlist on Midnight | Compact Private State ZK Proofs CLI |
🟢 ✅ |
| Bonding Curve | Bonding Curve on Midnight | Compact Private State ZK Proofs CLI |
🟢 ✅ |
| Quadratic Voting | Quadratic Voting on Midnight | Compact Private State ZK Proofs CLI |
🟢 ❌ |
| Coinflip | Coinflip game on Midnight | Compact Private State ZK Proofs CLI |
🟢 ✅ |
| Project | Description | Stack | Status |
|---|---|---|---|
| Coinflip | Coinflip game on Midnight | Compact Private State ZK Proofs CLI |
🟢 ✅ |
| NFT Launchpad | NFT Launchpad on Midnight | Compact Private State ZK Proofs CLI |
🟢 ❌ |
Programs and DApps are being added actively. Watch the repo for updates.
- Midnight Compact compiler
- Node.js v22+
- Docker (for proof server)
- Midnight Lace Wallet (for testnet interaction)
- Clone the repository
git clone https://github.com/tusharpamnani/midnight-programs-list.git
cd midnight-programs-list- Navigate to a program or DApp directory
# For a CLI program
cd compact-hello-world
# For a full-stack DApp
cd midnight-[projectname]- Follow the program's own
README.mdfor setup and deployment instructions
compact-[programname]/
├── contracts/
│ ├── contract.compact # Compact smart contract source
│ └── managed/ # Compiled artifacts (generated)
├── src/
│ ├── deploy.ts # Deployment script
│ ├── cli.ts # Interactive CLI
│ └── check-balance.ts # Wallet balance checker
├── docker-compose.yml # Proof server config
├── package.json
└── README.md
midnight-[projectname]/
├── contracts/
│ ├── contract.compact # Compact smart contract source
│ └── managed/ # Compiled artifacts (generated)
│ ├── src/
│ │ ├── index.ts # Contract API & deployment logic
│ │ └── witnesses.ts # Witness functions
│ └── package.json
├── ui/ # Frontend application
│ ├── src/
│ │ ├── components/ # UI components
│ │ ├── hooks/ # Midnight.js React hooks
│ │ └── App.tsx
│ └── package.json
├── docker-compose.yml # Proof server config
├── package.json
└── README.md
Compact is Midnight's domain-specific language for writing ZK-provable smart contracts. It distinguishes between:
- Private state — known only to the user, proved via ZK
- Public ledger state — visible on-chain to everyone
Understanding this distinction is essential before diving into any program here.
Full-stack DApps connect Compact contracts to a browser-based UI using:
- Midnight.js SDK — TypeScript SDK for interacting with contracts and the Midnight wallet
- Lace Wallet — browser extension for signing transactions and managing keys
- Proof Server — local Docker service that generates ZK proofs client-side
- Deploy any program to get your wallet address
- Visit https://faucet.preprod.midnight.network/
- Enter your address to receive test tokens (tNight)
PRs are welcome! Please open an issue first to discuss what you'd like to add.
MIT