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.

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

On this page