Web App with a Smart Contract Connection

Info

This is a beta version of the Solana Toolkit, and is still a WIP. Please post all feedback as a GitHub issue here.

npx create-solana-dapp

This command generates a new project that connects a Solana smart contract to a frontend with a wallet connector. It has options for multiple popular frontend stacks and UI libraries, including: NextJS, React, Tailwind, and more.

Build and Test #

To test out this project before making any modifications, follow these steps:

Build the smart contract #

npm run anchor-build

Start the local validator #

npm run anchor-localnet

Run tests #

npm run anchor-test

Deploy to the local validator #

npm run anchor deploy --provider.cluster localnet

Build the web app #

npm run build

Run the web app #

npm run dev

Additional Resources #