Skip to content

This repo is the technical implementation of the SuperFan SBT on the Solana blockchain for the Strade Base music distribution platform.

Notifications You must be signed in to change notification settings

jorshimayor/stradebaseSBT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StradebaseSBT

Description

This project is designed to integrate a blockchain-based stablecoin system with a main app, utilizing Solana for token implementation and a dedicated admin dashboard for management and visualizations. It is split into three main components:

  1. API (Backend Integration): This folder contains the backend logic and APIs for interacting with the blockchain and integrating with the main application.
  2. Mint (Blockchain Token Implementation): This folder is responsible for the creation and management of Solana-based tokens, including minting, transfers, and wallet management.
  3. SBT Board (Admin Dashboard): This folder contains the admin dashboard used for managing the system, visualizing the tokens, and providing admin privileges.

Project Structure

The project is organized into three main modules:

api/

This folder contains the backend integration and API logic to handle requests from the main app and manage Solana transactions. It includes endpoints for:

  • Creating user wallets
  • Sending token transactions
  • Retrieving wallet balances

mint/

This folder is dedicated to the blockchain implementation of the tokens. It handles:

  • SbtToken minting: Creating new stablecoins.
  • SbtReward minting: Creating new reward coins.
  • SbtNft minting: Creating sbt tier nfts.

sbtBoard/

This folder contains the admin dashboard for visualization and management of the stablecoin system. Key features include:

  • Admin authentication and privileges.
  • Visualization of token balances and transactions.

Installation

Prerequisites

To run the project locally, you need the following:

  • Node.js (v14 or above)
  • npm or yarn
  • Solana CLI (for local/devnet blockchain setup)

Steps to Set Up

  1. Clone the repository:

    git clone https://github.com/jorshimayor/stradebasesbt.git
    cd your-repository
  2. Set up environment variables: Create a .env file in the root of each folder with the necessary variables (e.g., private keys, API URLs, Solana configuration).

    Example for api/.env:

    SOLANA_NETWORK=https://api.devnet.solana.com
    PAYER_PRIVATE_KEY=[your-payer-private-key]
    
  3. Run the application:

    • For api/(for backend dev):

      cd api
    • For mint/ (only if needed for minting tokens by blockchain dev):

      cd mint
    • For sbtBoard/ (Admin Dashboard):

      cd sbtBoard

    This will start the API, the minting process, and the admin dashboard. You should now be able to interact with the blockchain and visualize/manage the system through the dashboard.

Usage

API (Backend Integration)

  • Create Wallet:
    POST request to /create-wallet.
    Returns the user's wallet details (public/private keys).

  • Send Transaction:
    POST request to /send-transaction.
    Initiates a transfer of tokens between two wallets.

  • Get Balance:
    POST request to /get-balance.
    Retrieves the balance of a given wallet.

Mint (Blockchain Token Implementation)

  • Mint Tokens:
    This will allow you to mint tokens to a specific wallet address. The implementation handles the interaction with the Solana blockchain.

  • Token Transactions:
    Use the blockchain functions for sending, receiving, and managing tokens. The system integrates directly with Solana to mint and manage token flows.

SBT Board (Admin Dashboard)

  • View Token Balances:
    Displays the token balances of all users in real-time.

  • Admin Privileges:
    Administrators can make transactions, manage wallet creations, and perform other critical operations.

Features

  • Full blockchain integration with Solana.
  • Stablecoin minting and management.
  • Admin dashboard for visualizing token data.
  • Secure user wallet creation and transaction handling.

Testing

You can test the API using tools like Postman:

  1. POST /create-wallet Generate a new wallet for a user.

  2. POST /send-transaction:
    Send tokens from one wallet to another.

  3. POST /get-balance:
    Retrieve the balance of a wallet.

Example Requests

Create Wallet:

POST /create-wallet

{}

Send Transaction:

POST /send-transaction

{
  "userPrivateKey": [/* user's private key array */],
  "recipientPublicKey": "recipientPublicKeyHere",
  "amount": 0.1
}

Get Balance:

POST /get-balance

{
  "publicKey": "userPublicKeyHere"
}

Contributing

We welcome contributions to improve the project! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch.
  3. Make your changes and commit them.
  4. Open a pull request.

About

This repo is the technical implementation of the SuperFan SBT on the Solana blockchain for the Strade Base music distribution platform.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages