How to Build a dApp on Tezos, Step by Step
Tezos dApps run on a proof-of-stake chain with low fees and on-chain upgrades. Here is the stack, the seven build steps, and how to test on Ghostnet.
On this page
Short answer
A dApp on Tezos is an application whose logic runs in a smart contract on the Tezos blockchain while users interact with it through a wallet and a web interface. The contract stores state and enforces rules, the wallet signs transactions, and the frontend reads contract data and shows it to users. Building one means writing the contract, connecting a wallet and shipping a frontend that talks to both.
What is a dApp on Tezos?
A dApp on Tezos is an application that runs partly on the Tezos blockchain and partly in a web browser. The smart contract holds the shared state, such as votes, balances or ownership records, and the frontend is a normal web app that reads that state and asks users to sign transactions.
Tezos is a proof-of-stake blockchain, which means blocks are produced by validators who stake tez, the native currency, rather than by miners. The chain is known for low transaction fees and for upgrades that happen through on-chain voting, so the protocol can change without splitting the network.
Tezos smart contracts are written in Michelson, a low-level stack language, but most developers write in a higher-level language such as SmartPy or Ligo and compile down to Michelson. For the frontend, the Taquito library connects a web app to the chain, and the Beacon SDK connects it to user wallets. A general guide to the same pattern on another chain is how to build a dApp on Solana.
What do you need before you start?
Before writing code, set up the tools and accounts a Tezos dApp needs. Most of them are free, and the testnet gives you fake tez for practice.
| Piece | What it does | Common choice |
|---|---|---|
| Contract language | Writes the on-chain logic | SmartPy or Ligo |
| Testnet | A live test chain with fake tez | Ghostnet |
| Wallet | Signs transactions for users | Temple or Kukai |
| Frontend library | Reads contracts and sends calls | Taquito |
| Wallet connector | Links the app to the wallet | Beacon SDK |
| Explorer | Checks contracts and transactions | TzKT |
You also need a clear contract design before you start. Write down what the contract stores, which actions users can take and who is allowed to take each one. A voting contract, for example, stores proposals and votes, lets any wallet vote once per proposal and lets only the admin close a vote.
How do you build a Tezos dApp, step by step?
You build a Tezos dApp by writing and testing the contract first, then adding the wallet connection and the frontend. The contract is the hard part; the frontend is mostly reading and displaying its state.
- Define the contract. List the stored data, the entrypoints users can call and the rules for each one. Keep the first version small.
- Write the contract. Use SmartPy or Ligo to write the logic, then compile it to Michelson and check the output for errors.
- Test locally. Run the contract in a local sandbox with test accounts. Call each entrypoint and check that the storage changes as expected.
- Deploy to Ghostnet. Publish the contract to the Ghostnet testnet with test tez from a faucet, and confirm the address on the TzKT explorer.
- Connect a wallet. Add the Beacon SDK so users can connect Temple or Kukai, and request permission to sign transactions.
- Build the frontend. Use Taquito to read contract storage and to send calls, then show balances, proposals or items in the interface.
- Test the full flow. Run the whole journey as a real user: connect a wallet, make a transaction, confirm it on the explorer and check the result in the app.
Do not skip the local testing step. A contract deployed with a bug is hard to fix, because Tezos contracts are not upgraded in place. You deploy a new contract and move users to it, which is costly once real users and funds are involved.
How do wallets and transactions work?
Wallets and transactions work through signing: the user approves each action in their wallet, and the wallet signs the transaction with the user's private key before it is sent to the chain.
When a user clicks a button in your dApp, the frontend builds a transaction, such as calling a contract entrypoint with some parameters, and asks the wallet to sign it. The wallet shows the details, including the fee in tez, and the user confirms or rejects it. Nothing is signed without the user's explicit approval.
Fees on Tezos are low, usually a small fraction of a tez per transaction, which makes it practical to build apps where users transact often. The fee depends on the size and complexity of the operation, so a simple token transfer costs less than a complex contract call. For the design of wallet-first apps, see dApps benefits and use cases.
How do you test on Ghostnet?
You test on Ghostnet by deploying your contract to the testnet, funding a test wallet with faucet tez and running the same flows a real user would run.
Ghostnet is a live Tezos test network that mirrors the main network. A faucet gives you test tez for free, and you can deploy contracts, call entrypoints and check every transaction on the TzKT explorer. Test with at least two wallets, so you can check that one user cannot do another user's actions.
Test the failure paths too, not just the happy path. Try calling an entrypoint without the right permission, try voting twice and try sending a transaction with too little tez. Each of these should fail cleanly with a clear error, and the contract storage should stay unchanged.
Example (hypothetical): a simple voting dApp
Example (hypothetical): a community builds a voting dApp for 200 members. Each member can vote on three proposals, so the contract must handle 200 × 3 = 600 votes in total.
At an assumed fee of 0.01 tez per vote, the total cost of all votes is 600 × 0.01 = 6 tez. If tez trades at $1 in this example, the whole vote costs about $6, which is why the team chooses Tezos for a vote that would be far more expensive on a high-fee chain.
The team deploys the contract to Ghostnet first, runs a test vote with 20 members, then deploys to the main network. The admin closes each proposal after the deadline, and the contract records the result so anyone can check it on the explorer.
What are the common mistakes?
The most common mistakes in Tezos dApp development are deploying an untested contract, ignoring upgrade limits and building a frontend that trusts its own data.
- Deploying without local tests. A bug in a deployed contract usually means deploying a new one and migrating users, which is slow and confusing.
- No upgrade plan. Tezos contracts cannot be edited in place. Design for a new deployment from the start, or use a proxy pattern if your design needs one.
- Trusting frontend data. The frontend should display what the contract says, not what its own database says. The contract is the source of truth.
- Skipping permission checks. Every entrypoint should check who is calling it. A missing check can let anyone call an admin-only action.
- Hardcoding the testnet. Make the network and contract address configurable, so the same code can point at Ghostnet for testing and the main network for production.
- Ignoring fees in the design. Even low fees add up if the app asks users to sign many transactions. Batch where the contract allows it.
If you need a team to build it, a partner for dApp development can take the contract, wallet connection and frontend from design to mainnet.
Key takeaways
- A Tezos dApp pairs a smart contract with a wallet and a web frontend
- SmartPy or Ligo compile to Michelson; Taquito and Beacon connect the frontend
- Test the contract locally, then on Ghostnet, before mainnet
- Contracts cannot be edited in place, so design for redeployment
- Every entrypoint needs a permission check on who can call it
Frequently asked questions
What language do you use to build a dApp on Tezos?
Most developers write Tezos contracts in SmartPy or Ligo, which compile down to Michelson, the chain's low-level language. The frontend usually uses the Taquito library to talk to the chain and the Beacon SDK to connect user wallets such as Temple or Kukai.
How much does it cost to build a dApp on Tezos?
Development cost depends on the contract's complexity, the frontend and the testing needed. Transaction fees are low, usually a small fraction of a tez, so running costs are modest. The main cost is engineering time, plus an audit if the contract handles real funds.
What is Ghostnet?
Ghostnet is the Tezos test network. It mirrors the main network but uses test tez that you can get free from a faucet, so you can deploy contracts and test transactions without spending real money. Always test on Ghostnet before deploying to the main network.
Can you update a Tezos smart contract after deployment?
No, a deployed contract cannot be edited in place. To change the logic you deploy a new contract and move users to it, or you design with a proxy pattern from the start. This is why local testing and a clear upgrade plan matter before the first deployment.
Do users need a wallet to use a Tezos dApp?
Yes. Users connect a wallet such as Temple or Kukai, which signs each transaction. The dApp never sees the private key. The wallet shows the fee and the action details, and the user confirms or rejects each transaction.
Is Tezos a good choice for a first dApp?
Tezos is a reasonable choice when low fees and on-chain upgrades matter, and when the app needs formal verification options for the contract. The trade-off is a smaller developer community than the largest chains, so finding examples and hiring can take longer.