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.
Try the quest as a blink
Post a memo on devnet is also a blink: a card members complete from an X post or a link, without opening the app.
- In Console, open Settings → API keys in Test, the environment of your app login key, and create a key with Read and Ingest. Set it as
DOMINO_MANAGEMENT_KEYin.env.localand restartnpm run dev. When you host the app on a Live app login key, use a Live API key here too: members link their wallets in the app login key's environment. - Open
http://localhost:3000/api/actions/post-a-memo. It answers the card as JSON; without the key, a message that the key is missing. - Once the app has a public HTTPS address, open
https://dial.to/?action=solana-action:https://<your app>/api/actions/post-a-memo, write a memo and sign on devnet. The card shows the 100 points.
Quests as blinks covers testing, hosting, and registering your domain so the card unfurls on X.
Add your own quests
Add quest files under domino/quests/ and publish them with npm run domino:deploy. To reward calls to your own Anchor program, deploy it to devnet with its IDL and let the CLI write a quest for one of its instructions, with the instruction's arguments as settings and a test beside it:
npm run domino -- quests from-idl <program address> --cluster devnet
npm testStart from your program's Anchor IDL explains the quest it writes. 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.
serve a quest as a Solana Action and get it to unfurl on X.
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.