How to Build a Full-Stack NFT Marketplace Dapp, Step by Step
A full-stack NFT marketplace dapp combines smart contracts, a web app, an indexer and storage. Here is the stack, the build order and the launch checklist.
On this page
Short answer
A full-stack NFT marketplace dapp is a decentralised app where users mint, list, buy and sell NFTs, built from smart contracts, a web frontend, a backend indexer and decentralised storage. The full stack means every layer works together, from the wallet click to the on-chain sale.
What is a full-stack NFT marketplace dapp?
A full-stack NFT marketplace dapp is a complete NFT trading app where the frontend, smart contracts, backend services and storage are all built and connected as one system.
The smart contracts hold the rules: minting, listing, buying, royalties and escrow. The frontend is the website where users connect a wallet, browse collections and place bids. The backend indexer reads chain events and serves fast search and listings, because reading directly from the chain is too slow for a good user experience.
Storage holds the NFT media and metadata, usually on IPFS or a similar decentralised store, so the art survives even if the marketplace goes down. A dapp that skips any layer is not full-stack: it may look finished but breaks under real use. For the general guide, see how to develop an NFT marketplace.
What does the stack look like?
The stack has five layers, and each one has a clear job.
| Layer | What it does | Common choices |
|---|---|---|
| Smart contracts | Mint, list, buy, royalties, escrow | ERC-721, ERC-1155 |
| Frontend | Browse, connect wallet, trade | React or Next.js |
| Indexer | Reads chain events, serves listings | Subgraph or custom indexer |
| Storage | Holds media and metadata | IPFS, Arweave |
| Wallet | Signs transactions, holds NFTs | MetaMask, WalletConnect |
ERC-721 fits unique items, one token per artwork. ERC-1155 fits editions, where many copies share one contract. The indexer is the layer most teams underestimate: without it, every page load waits on chain reads and the site feels broken. The wallet layer decides which chains you support, so pick it early.
Choosing the chain is part of the stack decision. Ethereum has the largest NFT audience and the highest gas fees, while other chains offer lower fees and smaller audiences. The right choice depends on where your creators and buyers already trade, not on which chain is newest. Pick one chain for the first version and add others only after the marketplace works.
How do you build it, step by step?
Build the contracts first, then the frontend, then the indexer, and test the whole flow on a testnet before touching mainnet.
- Define the rules. Decide what can be minted, how listings work, how royalties are paid and what fees the marketplace takes.
- Write the contracts. Mint, list, buy, bid and royalty logic, with tests for every path, including failed payments and cancelled listings.
- Audit the contracts. Get an independent review before mainnet, because a bug in a contract cannot be patched like a website.
- Build the frontend. Wallet connection, collection pages, listing flow and transaction status, with clear feedback while a transaction confirms.
- Build the indexer. Read contract events into a database so search, filters and activity feeds load fast.
- Connect storage. Upload media and metadata to IPFS, and store the content address on chain, not a web link.
- Test on a testnet. Run the full flow end to end with test tokens, then invite a small group to break it.
Do not skip the audit. A contract bug can drain funds or lock NFTs, and fixing it after launch means deploying a new contract and migrating users. For the token standard, see how to create an ERC-20 token.
How do royalties and fees work?
Royalties pay the creator on every resale, and fees pay the marketplace, but both depend on the marketplace enforcing them.
On-chain royalties are set in the contract, usually as a percentage of the sale price. Some marketplaces respect the royalty and some do not, so creators should check whether the marketplace they list on enforces it. A common royalty is 5% to 10% of the sale price, but the right number depends on the collection and the market.
Marketplace fees are separate and usually 2% to 5% of the sale price. Gas fees are paid by the buyer or seller on each transaction and vary with network congestion. Lazy minting, where the NFT is only created when it sells, removes the upfront gas cost for creators. See create an NFT on Polygon for a lower-fee chain option.
Creators should also check how royalties are handled when an NFT moves between marketplaces. A royalty set on one marketplace may not be respected on another, so the effective royalty depends on where the sale happens. Some creators set royalties in the contract and accept that enforcement varies, while others rely on the marketplace rules. Either way, the terms should be clear before the collection lists.
How do you launch it?
Launch in stages: testnet first, then a closed mainnet launch with a few collections, then a public opening once the system proves itself.
Before mainnet, check the list: contracts audited, frontend tested on real wallets, indexer keeping up with chain events, storage links working, support ready for stuck transactions and a plan for what happens if a contract needs replacing. A launch checklist is not paperwork; it is the difference between a smooth opening and a week of emergency fixes.
Seed the marketplace with a few collections so the first visitors see real items, not empty pages. Announce the launch to the communities that will actually use it, and watch the first sales closely, because the first bugs appear in the first hours. Have a pause function ready in the contracts so trading can stop if something goes wrong.
Example: a 100-piece collection launch
Example (hypothetical): a creator launches 100 NFTs at 0.05 ETH each, with a 5% royalty and a 2.5% marketplace fee.
If all 100 sell, the creator receives 100 x 0.05 = 5 ETH from primary sales, less the marketplace fee of 2.5% x 5 = 0.125 ETH. One NFT later resells for 0.2 ETH, so the creator earns a 5% royalty of 0.01 ETH and the marketplace earns 2.5% of 0.005 ETH.
The numbers are small on purpose. The point is the flow: primary sale, fee, resale, royalty. If the indexer misses the resale event, the royalty still pays on chain, but the activity feed shows nothing, which is why the backend matters as much as the contracts.
What are the common mistakes?
The most common mistakes are skipping the audit, storing media on a web server and launching with no collections.
- Skipping the audit. A contract bug cannot be patched like a website bug.
- Storing media on a web server. If the server dies, the NFT points at nothing. Use IPFS or Arweave.
- No indexer. Reading listings straight from the chain makes the site slow and unusable.
- Launching empty. A marketplace with no items gives visitors no reason to return.
- Ignoring royalties. Check whether the marketplace enforces them before promising them to creators.
- No pause function. Without one, a bug keeps running while the team fixes it.
Key takeaways
- Contracts hold the rules; the frontend is what users see
- An indexer makes listings fast; reading the chain directly is too slow
- Store media on IPFS, not on a web server
- Audit before mainnet, then launch in stages
- Seed the marketplace so first visitors see real items
Frequently asked questions
What is the difference between ERC-721 and ERC-1155?
ERC-721 is for unique items, one token per artwork, and it is the standard most collections use. ERC-1155 handles editions, where many identical copies share one contract, which saves gas for large collections. Pick ERC-721 for one-of-one art and ERC-1155 for editions or game items with many copies.
Do I need a backend for an NFT marketplace?
Yes, for a usable one. The contracts hold the rules and the money, but the backend indexer reads chain events into a database so search, filters and activity feeds load fast. Without it, every page waits on chain reads. The backend should never hold user funds or private keys.
What is lazy minting?
Lazy minting creates the NFT only when it sells, instead of when the creator lists it. The creator signs the listing off chain, and the buyer pays the gas to mint at purchase time. It removes upfront costs for creators, but it means unsold items never exist on chain, which some collectors dislike.
How much does it cost to build one?
Costs vary with the chain, the features and the team, but a first version with minting, listings, buying and an indexer is a substantial build, not a weekend project. The audit is a real cost too, and skipping it is the most expensive mistake. Ask vendors for a breakdown by layer, and treat prices as indicative until quoted.
Can I launch on more than one chain?
Yes, but start with one. Each chain needs its own contracts, indexer and wallet support, so multi-chain doubles the work. Pick the chain where your creators and buyers already are, prove the marketplace there, and add a second chain only when the first one works.
Who owns the NFT if the marketplace closes?
The buyer does, as long as the NFT and its media live on chain and on decentralised storage. The marketplace is only the shop window: the token stays in the buyer's wallet and the art stays on IPFS. If the media is stored on the marketplace's own server, it can disappear with the site.