Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dabit3/complete-guide-to-full-stack-solana-development
Code examples for the blog post titled The Complete Guide to Full Stack Solana Development with React, Anchor, Rust, and Phantom
https://github.com/dabit3/complete-guide-to-full-stack-solana-development
Last synced: 6 days ago
JSON representation
Code examples for the blog post titled The Complete Guide to Full Stack Solana Development with React, Anchor, Rust, and Phantom
- Host: GitHub
- URL: https://github.com/dabit3/complete-guide-to-full-stack-solana-development
- Owner: dabit3
- Created: 2021-09-13T19:20:10.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-12T18:17:54.000Z (over 1 year ago)
- Last Synced: 2024-07-31T08:17:02.075Z (3 months ago)
- Language: JavaScript
- Size: 27.6 MB
- Stars: 476
- Watchers: 10
- Forks: 137
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - dabit3/complete-guide-to-full-stack-solana-development - Code examples for the blog post titled The Complete Guide to Full Stack Solana Development with React, Anchor, Rust, and Phantom (JavaScript)
README
## The Complete Guide to Full Stack Solana Development with React, Anchor, Rust, and Phantom
Code examples to go with the blog post available [here](https://dev.to/dabit3/the-complete-guide-to-full-stack-solana-development-with-react-anchor-rust-and-phantom-3291)
![Header image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nl0h25rp5h9ytg5wnrj7.png)
### Prerequisites
1. Node.js - I recommend installing Node using either [nvm](https://github.com/nvm-sh/nvm) or [fnm](https://github.com/Schniz/fnm)
2. Solana Tool Suite - You can see the installation instructions [here](https://docs.solana.com/cli/install-solana-cli-tools). _note - I had a very hard time getting everything working on an M1 Mac, mainly `solana-test-validator` and `cargo-build-bpf`. I finally figured it out, and posted my solution [here](https://github.com/project-serum/anchor/issues/95#issuecomment-913090162). I'm sure at some point this will be fixed and work out of the box._
3. Anchor - Anchor installation was pretty straight-forward for me. You can find the installation instructions [here](https://project-serum.github.io/anchor/getting-started/installation.html).
4. Solana browser wallet - I recommend [Phantom](https://phantom.app/), which is what I have tested this app with.
### To build
1. Clone the repo
```sh
git clone [email protected]:dabit3/complete-guide-to-full-stack-solana.git
```2. Change into the project directory you'd like to run
3. Install the dependencies
```sh
npm install
```4. Start a local Solana node
```sh
solana-test-validator
```5. Build the anchor project
```sh
anchor build
```6. Fetch the project ID for the build:
```sh
solana address -k target/deploy/-keypair.json
```6. Update the project ID in the Rust program located at __projectname/programs/src/programname.rs__ with the output from above.
7. Run the tests
```sh
anchor test
```8. Change into the __app__ directory and install the dependencies:
```sh
cd app && npm install
```9. Run the client-side app
```sh
npm start
```