**Scaffold Stellar** is a developer toolkit for building decentralized applications (dApps) and smart contracts on the Stellar blockchain. It helps you go from idea to working full-stack dApp faster — by providing CLI tools, reusable contract templates, a smart contract registry, and a modern frontend. Visit the [Scaffold Stellar](https://scaffoldstellar.org) homepage for guides, docs, and more. ## Prerequisites Before you begin, make sure you have the following installed: | Tool | Description | Install Link | | --- | --- | --- | | [Rust & Cargo](https://www.rust-lang.org/tools/install) | For writing and compiling smart contracts | `curl https://sh.rustup.rs -sSf \| sh` | | [Node.js & npm](https://nodejs.org) | For frontend development | Download from official site | | [Stellar CLI](https://github.com/stellar/stellar-cli) | For building, deploying, and interacting with smart contracts | [`Link for the repo`](https://github.com/stellar/stellar-cli) | | [Docker](https://www.docker.com/get-started) | For running a local Stellar network via the `stellar/quickstart` image | [Download Docker Desktop](https://www.docker.com/products/docker-desktop) | ## Getting Started ### Installation Install the required CLI tools: ```bash # Install stellar-scaffold CLI cargo install --locked stellar-scaffold-cli # Install registry CLI (to easily deploy your contract to the registry) cargo install --locked stellar-registry-cli ``` :::tip[For a faster install, use cargo-binstall] Instead of building from source, you can speed up the installation by getting the binary directly using [cargo-binstall](https://github.com/cargo-bins/cargo-binstall). This is especially useful in CI environments. ```bash # Install cargo-binstall (see other install methods in their README linked above) cargo install cargo-binstall # Install the binaries cargo binstall stellar-scaffold-cli stellar-registry-cli ``` ::: While the CLIs are installing, check out this intro to Scaffold Stellar! ### Creating a New Project 1. Initialize a new project: ```bash stellar scaffold init my-project cd my-project ``` This will create the project scaffold in the directory you specified with a few sample contracts. Or you can start from the [OpenZeppelin Wizard](./openzeppelin-contracts) to customize your contract and start a Scaffold Stellar project from there. 2. Start the app: ```bash npm start ``` You'll have a running dApp integrated with the starter contracts, ready to start building! Explore the `environments.toml` file to customize your development environment(s) that's set by your `.env` file. ## Project Structure When you run `stellar scaffold init`, it creates a full-stack project structure with example contracts and a modern frontend: ``` my-project/ ├── contracts/ # Rust smart contracts (compiled to WASM) ├── packages/ # Auto-generated TypeScript contract clients ├── src/ # React frontend code │ ├── components/ # Reusable UI components │ ├── contracts/ # Contract interaction logic │ ├── App.tsx # Main app component │ └── main.tsx # Entry point ├── environments.toml # Configuration per environment (dev/test/prod) ├── .env # Local environment variables ├── package.json # Frontend packages └── target/ # Build outputs ``` This template provides a ready-to-use frontend application with example smart contracts and their TypeScript clients. The frontend is set up with `Vite`, `React`, and includes basic components for interacting with the contracts. ## Features - **CLI Plugins for Stellar** - `stellar scaffold init`: Initialize new Stellar smart contract projects - `stellar scaffold upgrade`: Transform existing Stellar contract workspaces into Scaffold projects - `stellar scaffold build`: Build contracts and generate TypeScript clients - `stellar scaffold watch`: Development mode with hot reloading - `stellar registry`: Publish, deploy, and manage smart contracts - **Environment Management** - Environment-specific builds (development, testing, staging, production) - Seamless integration with both local and deployed contracts - Network configuration via `environments.toml` - Support for multiple deployment environments - **Smart Contract Registry** - On-chain publishing platform for Wasm binaries - Version management and contract naming - Contract verification and dependency management - Secure deployment workflow for testnet and mainnet ### More Resources For more information, check out the [project on GitHub](https://github.com/theahaco/scaffold-stellar)! ## Video Series Check out the [Scaffold Stellar video series on YouTube](https://www.youtube.com/playlist?list=PLmr3tp_7-7Gjj6gn5-bBn-QTMyaWzwOU5) for step-by-step tutorials and guides: - [Scaffold Stellar | A Boilerplate For Stellar Developers](https://www.youtube.com/watch?v=7wKD3d9w5d0) - Comprehensive walkthrough of Scaffold Stellar as a boilerplate for Stellar development. - [Scaffold Stellar: Getting Started and Guess the Number](https://www.youtube.com/watch?v=86hWe8Ragtg) - A practical tutorial that walks through improving the default "Guess the Number" dApp included in Scaffold Stellar. - [Building dApps with Scaffold Stellar](https://www.youtube.com/watch?v=t85jrhsTYV8) - An overview of the open source Scaffold Stellar development toolkit and how it streamlines the creation and management of Stellar apps. - [Live Demo of Scaffold Stellar](https://www.youtube.com/watch?v=0syGaIn3ULk) - A live demonstration showing Scaffold Stellar in action. - [Intro to Scaffold Stellar](https://www.youtube.com/watch?v=559ht4K4pkM) - Introduction to the Scaffold Stellar toolkit and its features. - [Which Frontend?](https://www.youtube.com/watch?v=pz7O54Oia_w) - Guide on choosing and working with frontend frameworks in Scaffold Stellar. - [Scaffold Stellar: Get started building](https://www.youtube.com/watch?v=H-M962aPuTk) - Learn how to install Scaffold Stellar, review included libraries and integrations, and get your development environment up and running. - [Rapid Application Development with Scaffold Stellar | Meridian 2025](https://www.youtube.com/watch?v=sx77r9qQOeE) - Introduction to Scaffold Stellar's rapid development environment, showing how to go from prototype to production.