The Complete Guide to Full Stack Solana Development with React, Anchor, Rust, and Phantom
Code examples to go with the blog post available here
Prerequisites
-
Node.js - I recommend installing Node using either nvm or fnm
-
Solana Tool Suite - You can see the installation instructions here. note - I had a very hard time getting everything working on an M1 Mac, mainly
solana-test-validator
andcargo-build-bpf
. I finally figured it out, and posted my solution here. I'm sure at some point this will be fixed and work out of the box. -
Anchor - Anchor installation was pretty straight-forward for me. You can find the installation instructions here.
-
Solana browser wallet - I recommend Phantom, which is what I have tested this app with.
To build
- Clone the repo
-
Change into the project directory you'd like to run
-
Install the dependencies
- Start a local Solana node
- Build the anchor project
- Fetch the project ID for the build:
-
Update the project ID in the Rust program located at projectname/programs/src/programname.rs with the output from above.
-
Run the tests
- Change into the app directory and install the dependencies:
- Run the client-side app
GitHub
https://github.com/dabit3/complete-guide-to-full-stack-solana-development