https://github.com/Olanetsoft/compact-by-example
Learn Midnight's Compact language through practical examples.
https://github.com/Olanetsoft/compact-by-example
compact midnightntwrk privacy smart-contracts
Last synced: 3 months ago
JSON representation
Learn Midnight's Compact language through practical examples.
- Host: GitHub
- URL: https://github.com/Olanetsoft/compact-by-example
- Owner: Olanetsoft
- License: mit
- Created: 2025-10-28T23:19:32.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2026-03-04T14:14:07.000Z (4 months ago)
- Last Synced: 2026-03-04T21:33:28.569Z (4 months ago)
- Topics: compact, midnightntwrk, privacy, smart-contracts
- Language: MDX
- Homepage: https://compact-by-example.org
- Size: 10.4 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- midnight-awesome-dapps - Compact By Example - Learn Midnight's Compact language through practical, real-world examples (Dormant Projects / Community Created Tutorials)
README
# Compact by Example
Learn Midnight's Compact language through practical examples. This project is built on the Midnight Network.
Visit [https://compact-by-example.org](https://compact-by-example.org). Inspired by [Solidity by Example](https://solidity-by-example.org/).
[](./LICENSE)
[](./CONTRIBUTING.md)
[](https://midnight.network)
[](https://compact-by-example.org)
[](https://discord.com/invite/midnightnetwork)
[](https://github.com/Olanetsoft/compact-by-example)
## What is This?
A community-driven collection of Compact smart contract examples for building privacy-preserving applications on Midnight Network. Each example is complete, tested, and ready to run.
## Quick Start
**Prerequisites:**
- Node.js v18 or higher
- npm or yarn
**Installation:**
```bash
# Clone the repository
git clone https://github.com/Olanetsoft/compact-by-example.git
cd compact-by-example
# Install dependencies
npm install
# Start the development server
npm run dev
```
Visit `http://localhost:3000` to view the documentation locally.
## Project Structure
```
compact-by-example/
├── basics/ # Fundamentals
│ ├── hello-world.mdx
│ ├── first-app.mdx
│ └── primitive-types.mdx
├── .github/ # Issue templates, PR templates, CI/CD
├── images/ # Assets and graphics
├── logo/ # Brand assets
├── docs.json # Mintlify configuration
└── index.mdx # Homepage
```
## Content Categories
Help us build these sections:
- **Privacy & ZK Proofs** - Zero-knowledge circuits and private state
- **Smart Contracts** - Tokens, NFTs, and DAOs
- **DeFi** - Decentralized finance protocols
- **Advanced Patterns** - Complex contract architectures
- **Security** - Best practices and common vulnerabilities
## Contributing
We welcome contributions! Whether you're fixing a typo, improving documentation, or adding a new example.
**How to contribute:**
1. Fork the repository
2. Create a feature branch (`git checkout -b feature/your-example`)
3. Make your changes (follow our [style guide](./CONTRIBUTING.md))
4. Test your code (`npm run dev`)
5. Commit with clear messages (`git commit -m 'Add: your feature'`)
6. Push to your branch (`git push origin feature/your-example`)
7. Open a Pull Request
Read our [Contributing Guide](./CONTRIBUTING.md) for detailed instructions.
## Community
- [Discord](https://discord.com/invite/midnightnetwork) - Ask questions, share projects
- [Twitter](https://twitter.com/MidnightNtwrk) - Latest updates
- [YouTube](https://www.youtube.com/@MidnightNetwork) - Video tutorials
## Resources
- [Midnight Documentation](https://docs.midnight.network) - Official docs
## License
MIT - see [LICENSE](./LICENSE) file for details.
---
Built by the Midnight community • [Report Bug](https://github.com/Olanetsoft/compact-by-example/issues/new?template=bug_report.md) • [Request Feature](https://github.com/Olanetsoft/compact-by-example/issues/new?template=feature_request.md) • [Submit Example](https://github.com/Olanetsoft/compact-by-example/issues/new?template=new_example.md)