Start from create-solana-dapp
Create a Solana dApp with Sign-In With Solana, quests, points and a leaderboard, and sample quests that check devnet.
create-solana-dapp makes a new Solana app from a template. Domino's template, Domino Quests, is the Solana Foundation's Next.js and @solana/kit starter with Sign-In With Solana, a Quests page, a Leaderboard page and two sample quests that check devnet: Hold devnet USDC and Post a memo on devnet.
The app runs on your machine at http://localhost:3000 against real Domino, in your project's Test environment.
Before you start
- Node.js 24, which Domino's SDK and CLI need.
- A Domino project. Create one in Console with the existing-app path.
- A Solana wallet in your browser, such as Phantom, Solflare or Backpack, switched to devnet.
Create the app
npx create-solana-dapp@latest my-solana-dapp -t solana-foundation/templates/community/domino-quests
cd my-solana-dappcreate-solana-dapp installs the dependencies with npm; pass --pnpm, --yarn or --bun for another package manager, and run the npm run commands below with it. Besides the Foundation starter's own pages, the app has:
| Part | Where |
|---|---|
| Wallet sign-in (Sign-In With Solana) | app/api/wallet/, app/lib/domino/ |
| Domino's participant API for the browser | app/relay/[...path]/route.ts |
| Quests and Leaderboard pages | app/quests/, app/leaderboard/ |
| The sample quests, the points ledger and the leaderboard | domino/ |
| Domino project settings | relay.json |
Connect your Domino project
npm run domino login
npm run domino whoamiSet organization and project in relay.json to the IDs whoami lists, then publish the quests, the Points ledger and its leaderboard to Test:
npm run domino:deployCreate an app login key
- In Console, open Settings → App login keys in Test and create a key with
http://localhost:3000as its origin. - Under Connected apps, choose Allow vouching on the key, give a reason, and confirm. Domino then attaches the wallet each member signs in with, which the quests read. This needs an organization admin with Publish permission.
- Copy
.env.exampleto.env.localand fill in the Domino variables:
| Variable | Value |
|---|---|
DOMINO_APP_LOGIN_KEY | The app login key, starting di_ |
DOMINO_APP_ORIGIN | The app's exact address, the one the key names. Leave it empty for http://localhost:3000 under npm run dev |
IRON_SESSION_SECRET | 32 or more random characters, such as the output of openssl rand -base64 32. Required in production |
Complete the quests
- Run
npm run devand openhttp://localhost:3000/quests. - Connect your wallet from the header and choose Sign in with Solana.
- For Hold devnet USDC, get devnet USDC for the same wallet from Circle's faucet (choose Solana Devnet), then press Check. It pays once the wallet holds 1 USDC.
- For Post a memo on devnet, open the home page, pick devnet in the header, and use Add memo. Then press Check on the quest.
Each quest pays 100 points, which show on Quests and on Leaderboard. Domino counts a devnet transaction once it is finalized, about 13 seconds after it lands, so a check right after a transaction may ask you to try again. For devnet SOL to pay fees, use Airdrop 1 SOL on the home page or faucet.solana.com.
Add your own quests
Add quest files under domino/quests/ and publish them with npm run domino:deploy. To reward calls to your own program, deploy it to devnet and set it as the Program of Post a memo on devnet, in the quest file or in Console. npm run domino agents install adds Domino's guide for coding agents.
Where next
Every Solana guide in one place, and how to move from devnet to mainnet.
every onchain check a quest can make: balances, NFTs and Solana program calls, on mainnet and devnet.
the sign-in this app uses, and paying prizes to members' wallets.
boards, seasons and payout lists.