shelby.xyz | docs.shelby.xyz | github.com/shelby | @shelbyserves
This is a demo app shown at the Shelby Breakpoint 2025 conference. The app is a short-form video sharing platform powered by the Shelby Network.
- Video Upload and Playback - Demonstrates how to record on device and upload videos to the Shelby Network using
@shelby-protocol/reactand play them usingmedia-chromevideo player. - X-Chain Wallet Support - Demonstrates how to use the
@aptos-labs/wallet-adapter-reactto support X-Chain wallets - Geomi Gas Station Support - Demonstrates how to use the
@aptos-labs/gas-station-clientto support Geomi Gas Station - Aptos Wallet Authentication - Demonstrates how to authenticate Aptos wallets to off-chain services using the
@aptos-labs/siwalibrary
- Node.js 20+ installed
- pnpm 10+ installed
- A Turso account (sign up at turso.tech)
- A Geomi account (sign up at geomi.dev)
-
Install dependencies:
pnpm install
-
Setting up the environment variables:
cp .env.example .env
-
Set up Turso database:
- Create a new database in the Turso dashboard
- Get your database URL and auth token
- Set the
TURSO_DATABASE_URLandTURSO_AUTH_TOKENenvironment variables in the.envfile
-
Run database migrations:
npm run db:push
This will create the tables defined in
lib/db/schema.ts. -
Set up Geomi API keys:
- Go to the Geomi and login with your account
- Setup an API key for
Shelbynetby following the instructions in the Geomi documentation - Set the
NEXT_PUBLIC_APTOS_SHELBYNET_API_KEYandNEXT_PUBLIC_SHELBY_SHELBYNET_API_KEYenvironment variables in the.envfile using the API key you created. - Setup an API key for the Shelbynet Gas Station by following the instructions in the Geomi documentation
- Set the
NEXT_PUBLIC_APTOS_SHELBYNET_GAS_STATION_API_KEYenvironment variables in the.envfile using the API key you created.
-
Start the development server:
pnpm run dev
Open http://localhost:3000 with your browser to see the result.
It is important to fund your accounts with the appropriate tokens to cover the transaction fees.
To fund your account with ShelbyUSD, you can begin by running the application, click on "Profile", connect your wallet, and then click the "Copy Address" button in the header. Once you have copied your address, you can fund it with ShelbyUSD at the ShelbyUSD Faucet.
To fund your the gas station sponsor with APT, you should go to the gas station resource you setup in Step 5 and find the "Fee Payer Address" towards the top of the page. Copy the address by clicking it. Once you have copied the address, you can fund it with APT at the APT Faucet.
pnpm run db:generate- Generate migration files from schema changespnpm run db:migrate- Run pending migrationspnpm run db:push- Push schema changes directly to database (development)pnpm run db:studio- Open Drizzle Studio to view and edit your database
| Variable | Required | Description |
|---|---|---|
NODE_ENV |
The environment of the application. If not set, it will default to development. |
|
NEXT_PUBLIC_ALLOWED_HOSTS |
The hosts allowed to authenticate. If not set, it will default to localhost:3000. |
|
NEXT_PUBLIC_APTOS_SHELBYNET_API_KEY |
✅ | The API key for the Aptos Shelbynet API |
NEXT_PUBLIC_APTOS_SHELBYNET_GAS_STATION_API_KEY |
✅ | The API key for the Aptos Shelbynet Gas Station |
NEXT_PUBLIC_SHELBY_SHELBYNET_API_KEY |
✅ | The API key for the Shelby Shelbynet RPC API |
NEXT_PUBLIC_UPLOAD_ALLOWLIST_ADDRESSES |
The addresses allowed to upload videos. If empty, anyone can upload videos. | |
NEXT_PUBLIC_RECAPTCHA_SITE_KEY |
The site key for the reCAPTCHA v3. If empty, reCAPTCHA is disabled. | |
TURSO_DATABASE_URL |
✅ | The URL of the Turso database |
TURSO_AUTH_TOKEN |
✅ | The authentication token for the Turso database |
RECAPTCHA_SECRET_KEY |
The secret key for the reCAPTCHA v3. If empty, reCAPTCHA is disabled. | |
JWT_SECRET |
The secret key for the JWT token. If empty, JWT will use a demo secret. |
The project is deployed to Vercel and will automatically deploy when changes are pushed to the main branch.