Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions apps/upmint-shelby/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
76 changes: 76 additions & 0 deletions apps/upmint-shelby/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# UpMint Shelby

Upload files to the Shelby network and mint them as NFTs on Aptos (ShelbyNet). Built with Shelby Protocol for decentralized storage and Petra wallet for authentication.

![UpMint Shelby](https://img.shields.io/badge/Shelby-NFT-blue) ![Aptos](https://img.shields.io/badge/Aptos-ShelbyNet-purple)

## Features

- **Upload to Shelby** – Select files and upload them to the Shelby decentralized network
- **Create Collections** – Define a collection name before minting NFTs
- **Mint NFTs** – Turn your uploaded images into on-chain NFTs (Aptos Token standard)
- **My NFTs** – View your minted NFTs grouped by collection, with Explorer links
- **Petra Wallet** – Connect via Petra and use ShelbyNet for all transactions

## Tech Stack

- **React + TypeScript + Vite**
- **Shelby Protocol** – Blob storage and coordination
- **Aptos** – NFT minting (ShelbyNet)
- **Petra Wallet** – Wallet adapter for Aptos

## Getting Started

### Prerequisites

- [Node.js](https://nodejs.org/) (v18+)
- [Petra Wallet](https://petra.app/) browser extension
- Petra configured for **ShelbyNet**

### Installation

```bash
git clone https://github.com/10ur5en/UpMint-Shelby.git
cd UpMint-Shelby
npm install
```

### Development

```bash
npm run dev
```

Open [http://localhost:5173](http://localhost:5173) in your browser.

### Build

```bash
npm run build
npm run preview
```

## Usage

1. **Connect** – Click "Connect with Petra" and approve the connection to ShelbyNet
2. **Upload** – Select image files to upload to the Shelby network
3. **Create Collection** – Enter a collection name and click "Create Collection"
4. **Mint** – Click "Mint NFT" on each uploaded image
5. **View** – See your NFTs in "My NFTs", grouped by collection

## Notes

- Only image files can be minted as NFTs
- Collection must be created before minting
- If Petra shows empty collection details, view NFTs on [Aptos Explorer](https://explorer.aptoslabs.com/?network=shelbynet)
- Proxy is used in dev for CORS; production should use proper backend or Shelby/Aptos endpoints

## Links

- [Shelby](https://shelby.xyz/)
- [Shelby Docs](https://docs.shelby.xyz/)
- [Aptos Explorer (ShelbyNet)](https://explorer.aptoslabs.com/?network=shelbynet)

## License

MIT
20 changes: 20 additions & 0 deletions apps/upmint-shelby/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap" rel="stylesheet" />
<title>Shelby - Upload & Mint NFTs</title>
</head>
<body>
<div id="app"></div>
<script type="module">
import { Buffer } from 'buffer'
window.Buffer = window.Buffer || Buffer
</script>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
33 changes: 33 additions & 0 deletions apps/upmint-shelby/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "@shelby-protocol/upmint-shelby",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"lint": "biome check .",
"fmt": "biome check . --write"
},
"devDependencies": {
"@biomejs/biome": "2.2.4",
"typescript": "~5.9.3",
"vite": "^7.3.1"
},
"dependencies": {
"@aptos-labs/ts-sdk": "^5.2.1",
"@aptos-labs/wallet-adapter-react": "^7.2.8",
"@shelby-protocol/react": "^1.0.0",
"@shelby-protocol/sdk": "^0.1.0",
"@shelby-protocol/solana-kit": "^0.2.1",
"@solana/client": "^1.7.0",
"@solana/react-hooks": "^1.4.1",
"@tanstack/react-query": "^5.90.21",
"@types/react": "^19.2.13",
"@types/react-dom": "^19.2.3",
"buffer": "^6.0.3",
"react": "^19.2.4",
"react-dom": "^19.2.4"
}
}
1 change: 1 addition & 0 deletions apps/upmint-shelby/public/vite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions apps/upmint-shelby/src/main.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { Network } from "@aptos-labs/ts-sdk";
import { AptosWalletAdapterProvider } from "@aptos-labs/wallet-adapter-react";
import { ShelbyClientProvider } from "@shelby-protocol/react";
import { ShelbyClient } from "@shelby-protocol/sdk/browser";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { Buffer } from "buffer";
import React from "react";
import ReactDOM from "react-dom/client";
import "./style.css";
import { App } from "./shelby-app";

declare global {
interface Window {
Buffer?: typeof Buffer;
}
}
window.Buffer = window.Buffer ?? Buffer;

const queryClient = new QueryClient();
const isDev = typeof window !== "undefined" && import.meta.env.DEV;
const origin = typeof window !== "undefined" ? window.location.origin : "";
const shelbyRpcBase = isDev ? `${origin}/shelby-rpc` : undefined;
const aptosFullnode = isDev ? `${origin}/shelby-aptos` : undefined;
const shelbyClient = new ShelbyClient({
network: Network.SHELBYNET,
...(shelbyRpcBase && { rpc: { baseUrl: shelbyRpcBase } }),
...(aptosFullnode && { aptos: { fullnode: aptosFullnode } }),
});

ReactDOM.createRoot(document.getElementById("app") as HTMLElement).render(
<React.StrictMode>
<AptosWalletAdapterProvider>
<QueryClientProvider client={queryClient}>
<ShelbyClientProvider client={shelbyClient}>
<App />
</ShelbyClientProvider>
</QueryClientProvider>
</AptosWalletAdapterProvider>
</React.StrictMode>,
);
Loading