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-dapp

create-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:

PartWhere
Wallet sign-in (Sign-In With Solana)app/api/wallet/, app/lib/domino/
Domino's participant API for the browserapp/relay/[...path]/route.ts
Quests and Leaderboard pagesapp/quests/, app/leaderboard/
The sample quests, the points ledger and the leaderboarddomino/
Domino project settingsrelay.json

Connect your Domino project

npm run domino login
npm run domino whoami

Set 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:deploy

Create an app login key

  1. In Console, open Settings → App login keys in Test and create a key with http://localhost:3000 as its origin.
  2. 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.
  3. Copy .env.example to .env.local and fill in the Domino variables:
VariableValue
DOMINO_APP_LOGIN_KEYThe app login key, starting di_
DOMINO_APP_ORIGINThe app's exact address, the one the key names. Leave it empty for http://localhost:3000 under npm run dev
IRON_SESSION_SECRET32 or more random characters, such as the output of openssl rand -base64 32. Required in production

Complete the quests

  1. Run npm run dev and open http://localhost:3000/quests.
  2. Connect your wallet from the header and choose Sign in with Solana.
  3. 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.
  4. 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.

Post a memo on devnet is also a blink: a card members complete from an X post or a link, without opening the app.

  1. 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_KEY in .env.local and restart npm 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.
  2. 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.
  3. 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 test

Start 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

On this page