Title
Scaffold Mina
Project Background
Scaffold Mina is a starter kit designed to help developers quickly build and deploy Mina zkApps with integrated frontends and smart contracts. It enables developers to get started swiftly with just a few commands, simplifying the initial setup for new developers exploring Mina and assisting existing developers in setting up new projects without the hassle of manual configuration. Additionally, Scaffold Mina offers React hooks that enable easy interaction with smart contracts.
The current version of Scaffold Mina can be found here.
Proposal Overview
Problem: The existing scaffold provided by the zkapp-cli is not optimal for developers aiming to create production-ready projects. It is primarily designed for simple single-page React applications, requiring developers to build additional components for a complete web application from scratch.
Solution: During our participation in the Starter Program, we developed an improved scaffold that abstracts away initial configuration complexities and provides React hooks for seamless integration across applications. In this proposal, we aim to further enhance Scaffold Mina by adding tools to improve both the developer and user experience.
Key enhancements include:
- MinaJS Integration: We will integrate MinaJS to provide a seamless wallet connection interface compatible with WalletConnect and TypeScript-ready account interactions. Since MinaJS is still in development, we will also contribute to MinaJS as needed for this project. The ultimate goal is to have Scaffold Mina included as part of the MinaJS toolkit, allowing developers to use this scaffold to start a well-structured project that can be easily maintained and expanded.
- React Hooks & Functions: We will extract the React hooks and functions into standalone modules, making them easily usable in other Mina zkApps. We plan to extract types directly from the o1js smart contracts by leveraging TypeScript, as it is the language used for writing o1js smart contracts. However, if necessary, we will also develop a tool similar to @wagmi/cli to generate hooks and types specifically for the frontend. Weāll keep these tools compatible with MinaJSās architecture, similar to how wagmi is compatible with viem.
- Lightnet Integration and Burner Wallets: We will integrate Minaās Lightnet for deploying and testing contracts on a local blockchain, along with the block explorer. We will also provide browser-based burner wallets for interacting with Lightnet.
- General Improvements Based on Community Feedback: While gathering feedback from the community, several improvements and features were suggested for the Scaffold, including a āDebug Contractsā tab in the frontend, using cached prover keys, the possibility of moving compiling and proving to the cloud, improving the smart contract deployment script, and mobile support. We are also considering adding off-chain storage support, but further research is needed to determine the most viable and standard approach, and whether it can be accomplished within the scope of this proposal.
- Website and Documentation: We will provide documentation for the developed tools to ensure developers can conveniently utilize them.
We may add or remove features based on feedback from the community and our own experience during development, but such changes will be guided by feedback and confirmation from the Mina developer community, not by personal decisions from our team.
Impact: We believe this project will make it easier for developers to build on Mina, fostering the development of more projects and contributing to the growth of the Mina ecosystem.
Audience: The target audience includes both new developers starting on Mina and existing developers looking to streamline the setup of new projects.
Architecture & Design
Design: The structure of Scaffold Mina draws inspiration from wagmi and viem, tools already familiar to many web3 developers. For this proposal, we will focus on providing these tools for React, given its popularity in the web3 space.
Vision: Our vision is to make these development tools as modular as possible and to follow the architecture of existing web3 tools, creating solutions that are familiar and convenient for web3 developers and users.
Timeline
- MinaJS integration and providing React hooks: 1 month
- Lightnet integration and general improvements mentioned in the proposal: 1 month
- Finalize and improve the tool based on feedback from Mina developers: 1 month
Budget & milestones
- Deliverables & Mid-Point milestones: We will deliver the developed tools at each milestone as outlined in the timeline section.
- Project Timeline: 3M
- Budget Requested: 72,000 MINA
- Wallet Address:
B62qs1fVSySq8fAMmLumRwhnFQxhgKSyKqBzuHp8LX1VASWERJKSSoV B62qn3bDNBvWm4HoY7x7UfuLxPYrsMoeeppwevPjDehhLLcdCRp3AMq
Team Info
Risks & Mitigations
Since we already have the foundation for the Scaffold project, the risk involved in further development is minimal. The main potential risk lies in unforeseen challenges when adding features and integrating tools. To mitigate this, we have already vetted the tools we plan to integrate and will maintain regular communication with the Mina developers community in case we encounter any challenges.