• Stars
    star
    1,636
  • Rank 27,526 (Top 0.6 %)
  • Language
    TypeScript
  • License
    Apache License 2.0
  • Created about 3 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Scaffolding for a dapp built on Solana

Solana dApp Scaffold Next

The Solana dApp Scaffold repos are meant to house good starting scaffolds for ecosystem developers to get up and running quickly with a front end client UI that integrates several common features found in dApps with some basic usage examples. Wallet Integration. State management. Components examples. Notifications. Setup recommendations.

Responsive Desktop

Getting Started

This is a Next.js project bootstrapped with create-next-app.

The responsive version for wallets and wallet adapter may not function or work as expected for mobile based on plugin and wallet compatibility. For more code examples and implementations please visit the Solana Cookbook

Installation

npm install
# or
yarn install

Build and Run

Next, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.tsx. The page auto-updates as you edit the file.

API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

Features

Each Scaffold will contain at least the following features:

Wallet Integration with Auto Connec / Refresh

State Management

Components: One or more components demonstrating state management

Web3 Js: Examples of one or more uses of web3 js including a transaction with a connection provider

Sample navigation and page changing to demonstate state

Clean Simple Styling 

Notifications (optional): Example of using a notification system

A Solana Components Repo will be released in the near future to house a common components library.

Structure

The scaffold project structure may vary based on the front end framework being utilized. The below is an example structure for the Next js Scaffold.

β”œβ”€β”€ public : publically hosted files
β”œβ”€β”€ src : primary code folders and files 
β”‚   β”œβ”€β”€ components : should house anything considered a resuable UI component
β”‚   β”œβ”€β”€ contexts` : any context considered reusable and useuful to many compoennts that can be passed down through a component tree
β”‚   β”œβ”€β”€ hooks` : any functions that let you 'hook' into react state or lifecycle features from function components
β”‚   β”œβ”€β”€ models` : any data structure that may be reused throughout the project
β”‚   β”œβ”€β”€ pages` : the pages that host meta data and the intended `View` for the page
β”‚   β”œβ”€β”€ stores` : stores used in state management
β”‚   β”œβ”€β”€ styles` : contain any global and reusable styles
β”‚   β”œβ”€β”€ utils` : any other functionality considered reusable code that can be referenced
β”‚   β”œβ”€β”€ views` : contains the actual views of the project that include the main content and components within
style, package, configuration, and other project files

Contributing

Anyone is welcome to create an issue to build, discuss or request a new feature or update to the existing code base. Please keep in mind the following when submitting an issue. We consider merging high value features that may be utilized by the majority of scaffold users. If this is not a common feature or fix, consider adding it to the component library or cookbook. Please refer to the project's architecture and style when contributing.

If submitting a feature, please reference the project structure shown above and try to follow the overall architecture and style presented in the existing scaffold.

Committing

To choose a task or make your own, do the following:

  1. Add an issue for the task and assign it to yourself or comment on the issue
  2. Make a draft PR referencing the issue.

The general flow for making a contribution:

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work back up to your fork
  5. Submit a Pull request so that we can review your changes

NOTE: Be sure to merge the latest from "upstream" before making a pull request!

You can find tasks on the project board or create an issue and assign it to yourself.

Learn More Next Js

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

More Repositories

1

solana

Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.
Rust
11,861
star
2

solana-program-library

A collection of Solana programs maintained by Solana Labs
Rust
2,861
star
3

solana-web3.js

Solana JavaScript SDK
TypeScript
1,749
star
4

token-list

The community maintained Solana token registry
Go
1,415
star
5

wallet-adapter

Modular TypeScript wallet adapters and components for Solana applications.
TypeScript
1,180
star
6

solana-pay

A new standard for decentralized payments.
TypeScript
1,173
star
7

example-helloworld

Hello world on Solana
TypeScript
855
star
8

solana-season

338
star
9

break

Break Solana Game
TypeScript
279
star
10

governance-ui

TypeScript
260
star
11

explorer

Explorer for Solana clusters
TypeScript
166
star
12

defi-hackathon

165
star
13

octane

Octane is a gasless transaction relayer for Solana.
TypeScript
164
star
14

chatgpt-plugin

TypeScript
160
star
15

ecosystem

Project files for Solana ecosystem members
150
star
16

obsolete-spl-zk-token

Obsolete - don't use
Rust
144
star
17

solana-solidity.js

Compile, deploy, and use Solidity contracts on Solana
TypeScript
114
star
18

oyster

TypeScript
109
star
19

oyster-swap

TypeScript
109
star
20

solana-accountsdb-plugin-postgres

Rust
72
star
21

solana-payments-app

Solana Pay for Commerce Platforms
TypeScript
68
star
22

solana-bigtable

Shell
62
star
23

oyster-lending

TypeScript
60
star
24

whitepaper

Solana whitepaper LaTeX source
TeX
60
star
25

perpetuals

Solana perpetuals reference implementation
Rust
57
star
26

dexterity

Reference implementation of a decentralized exchange for custom instruments, risk, and fees
Rust
55
star
27

eslint-plugin-require-extensions

JavaScript
48
star
28

wallet-standard

TypeScript
46
star
29

solana-pay-scaffold

Scaffolding for a dapp using Solana Pay
TypeScript
41
star
30

solana-perf-libs

C and CUDA libraries to enhance Solana
C
37
star
31

example-tictactoe

Tic-Tac-Toe built on Solana
JavaScript
34
star
32

wormhole-hackathon

34
star
33

governance-program-library

Rust
33
star
34

example-token

Obsoleted by https://spl.solana.com/token (Token Example)
Rust
33
star
35

solana-ping-api

solana ping api server
Go
32
star
36

example-messagefeed

Simple message feed built on Solana
JavaScript
32
star
37

browser-extension

Solana Chrome Extension
TypeScript
32
star
38

security-audits

Published security audits
31
star
39

obsolete-dontuse-example-webwallet

Example Solana Web-based Wallet
JavaScript
31
star
40

platform-tools

Shell
30
star
41

cluster

Cluster Infrastructure
Shell
25
star
42

rust-bpf-sysroot

Rust sysroot source for Berkley Packet Filter Rust programs
C
20
star
43

governance-docs

JavaScript
19
star
44

solana-labs.github.io

Organization Pages
16
star
45

auto-emissions

Python
16
star
46

token-ops

Scripts and tools for token accounting and operation
Shell
14
star
47

example-move

Solana example which runs a Libra Move program
JavaScript
14
star
48

rust-bpf-builder

Dockerfile
13
star
49

solana-voib-demo

Voice over Internet & Blockchain (VoIB) demo
Rust
13
star
50

buffer-layout-utils

TypeScript utilities for using buffer-layout with Solana programs
TypeScript
12
star
51

sealevel

A parallel runtime for layer 1 blockchains
11
star
52

eslint-config-solana

ESLint rules to be shared across all Solana Labs projects
JavaScript
11
star
53

networkexplorer

Retired
JavaScript
11
star
54

twamm

Solana twamm reference implementation
TypeScript
11
star
55

network_simulation

Python
11
star
56

governance-api

TypeScript
10
star
57

wbtc

TypeScript
10
star
58

bench-tps-dos-test

UDP and QUIC dos test for buildkite using bench-tps utility
Shell
9
star
59

token-aggregator

Aggregates tokens listed in onchain token registry
TypeScript
9
star
60

newlib

Newlib is a C library intended for use on embedded systems.
C
9
star
61

solana-flagged-accounts

A community-maintained registry of flagged accounts
JavaScript
8
star
62

launchpad

Solana launchpad reference implementation
Rust
8
star
63

llvm-builder

Builds customized LLVM for Solana
Dockerfile
8
star
64

tour-de-sol

Tour de SOL
Rust
8
star
65

interns-codehub

Public repo for Solana interns
TypeScript
8
star
66

solminer

Cross-platform Solana Replicator UI ⛏️
JavaScript
7
star
67

oyster-margin

7
star
68

cargo-run-solana-tests

Cargo command to compile and run BPF test
Rust
7
star
69

ledger-app-solana

Solana app for Ledger Wallet
7
star
70

secure-wrap-token

Rust
7
star
71

dc-homedir-skeleton

Base directory struct for the `solana` user on Solana's datacenter infrastructure
Shell
6
star
72

contributor-access-policy

This document outlines the procedure for getting contributor access to various Solana Labs source code repositories
6
star
73

reddit-scaling-demo

Demo for Reddit scaling
Rust
6
star
74

inc-20210825

Tool for audit and reclaim of delegated SPL Token accounts
Rust
6
star
75

bridge-adapter

TypeScript
6
star
76

kurtosis-solana-testing

Rust
5
star
77

governance-ui-landing

Governance UI Landing Page - realms.today
TypeScript
5
star
78

k8s-cluster

5
star
79

farms

Solana Farms
Rust
5
star
80

solana-build

Rust
4
star
81

solana-tokens

Utility for distributing Solana tokens
4
star
82

prettier-config-solana

A Prettier config consistent to all Solana Labs projects
4
star
83

solana-graphql-playground

GraphQL web IDE for working with the Solana RPC-GraphQL resolver
TypeScript
4
star
84

validator-tracker

https://metrics.solana.com:3000/d/jrdi4uUWz/validator-tracker
Shell
3
star
85

oyster-bridge

3
star
86

solana-pkcs8

A utility to parse DER-encoded PKCS #8 files
Rust
3
star
87

governance-sdk

Governance SDK
TypeScript
3
star
88

solana-json-rpc-https-proxy

DEPRECATED - Provides a TLS proxy for web-based Solana JSON RPC users
Shell
2
star
89

oyster-gov

1
star
90

ipfs-ledger

1
star
91

sync_test

For developing a Github Action to sync solana-labs/solana from anza-xyz/agave
1
star
92

spl-token-subscription

Rust
1
star