Thanks to visit codestin.com
Credit goes to github.com

Skip to content

On-chain e-commerce platform for PRJ3223 Capstone Project 2, Turbin3 Builders Cohort and School of Solana

Notifications You must be signed in to change notification settings

ChiefWoods/splurge

Repository files navigation

Splurge

Preview

On-chain e-commerce platform for PRJ3223 Capstone Project 2, Turbin3 Builders Cohort and School of Solana.

Live Website

Program on Solana Explorer

Source Repository

Features

  • Manage store listings
  • Track and fulfill orders
  • Leave product reviews

Built With

Languages

  • Rust
  • TypeScript
  • React

Test Runner

  • Bun

Getting Started

Prerequisites

  1. Update your Solana CLI, avm and Bun toolkit to the latest version
agave-install init 2.1.0
avm use 0.31.1
bun upgrade

Setup

  1. Clone repository
git clone https://github.com/ChiefWoods/splurge.git
  1. Configure to use localnet
solana config set -ul
  1. In another terminal, start a local validator
solana-test-validator
  1. Create and fund keypair
solana-keygen new -o splurge-wallet.json
solana airdrop 10 -k splurge-wallet.json
  1. Install dependencies
bun i
  1. Configure .env files
cp .env.example .env

Program

  1. Resync your program id
anchor keys sync
  1. Build program
anchor build
# Alternative build for running tests
# bun run build:test
  1. Run tests
bun test

Note

Tests may fail with an TypeError: Expected Buffer error even with no code changes when bumping dependencies. Delete node_modules, bun.lock, reinstall dependencies and run tests again.

  1. Deploy program
anchor deploy
  1. Optionally initialize IDL
anchor idl init -f target/idl/splurge.json <PROGRAM_ID>

Sync IDL with App

IDL files in /app may need to be updated on every program build.

bun run idl:sync

Accounts

Initialize program accounts. Depending on the cluster used, you may be required to initialize your own stablecoin mints.

  1. Configure .env files
cp .env.example .env
  1. Run scripts
bun run scripts/instructions/initializeConfig.ts

Tuktuk Automation

When an order is updated to Shipping status, it is scheduled as a task and will automatically be picked up by Tuktuk crank turners after 1 minute. This eliminates the need for manual order completion.

A public crank turner is relied on to run tasks, but you may optionally set up your own crank turner to ensure tasks don't go stale before being picked up.

bun run tuktuk

Issues

View the open issues for a full list of proposed features and known bugs.

Acknowledgements

Resources

Hosting and API

Contact

[email protected]

About

On-chain e-commerce platform for PRJ3223 Capstone Project 2, Turbin3 Builders Cohort and School of Solana

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages