This application demonstrates how to build a dynamic video showcase using Arweave for permanent deployment and AO (Arweave Object Model) for decentralized data storage and retrieval. It features a horizontally scrolling video carousel with content links managed by an AO process.
- ποΈ Video Carousel - Displays videos from Odysee in an infinitely scrolling marquee.
βοΈ Manual Controls - Allows users to manually scroll the carousel left and right, temporarily pausing the automatic animation.- π Decentralized Video Links - Utilizes an AO process to store and serve video metadata (titles, embed URLs).
- π Permanent Deployment - Designed to be deployed on Arweave's permaweb for lasting availability.
- π€ Wallet Integration - Uses Arweave Wallet Kit for simple wallet connection (primarily for ArNS name display).
- π ArNS Integration - Supports displaying user's primary ArNS name in the navigation bar.
- Frontend: React + Vite
- UI Components: Magic UI (Marquee, manually integrated)
- Deployment: ArDrive Turbo SDK (for Arweave deployment)
- Name System: AR.IO SDK (for ArNS)
- Backend Data: AO Process (Lua) for video links
- Wallet Connection: Arweave Wallet Kit
- Node.js 18+ (or as required by dependencies)
- pnpm (recommended package manager)
- Arweave wallet (JSON keyfile for deployment and ArNS management)
- Turbo credits for Arweave deployment (purchase here)
- $ARIO tokens for ArNS (purchase here)
- AOS installed for AO process management (installation guide)
git clone <YOUR_REPOSITORY_URL> video-showcase-app
cd video-showcase-app
pnpm installIf you don't have an AO process for this app yet:
# Initialize a new AO process using AOS
aos createThis will output a Process ID. Save this Process ID.
- The
lua/videos.luafile in this repository contains the Lua script for storing and serving video links. - Load this script into your AO process:
aos load <YOUR_PROCESS_ID> ./lua/videos.luaThis will set up the GetVideos handler in your AO process.
Update your AO Process ID for video links in the frontend configuration file src/config.js:
// src/config.js
export const AO_QUIZ_PROCESS_ID = "Yen2fhG9thwVz2xrC6wdCE8RTr-KIcsIcVZtf43WbtU"; // Example, update or remove if not used
export const AO_VIDEOS_PROCESS_ID = "<YOUR_AO_VIDEOS_PROCESS_ID>"; // Replace with your actual Process ID
export const AO_NODES = [
"https://ao-testnet.arweave.net",
"https://cu116.ao-testnet.xyz",
"https://ao.arweave.dev",
"https://ao.g8way.io"
];Replace <YOUR_AO_VIDEOS_PROCESS_ID> with the actual ID of the process where videos.lua is loaded.
pnpm devVisit http://localhost:5173 (or the port specified by Vite) to see your app in action.
The video links and metadata are stored in lua/videos.lua. You can modify this file to change:
- The list of videos (IDs, titles, Odysee embed URLs)
After making changes to the videos.lua file, reload it to your AO process:
aos load <YOUR_AO_VIDEOS_PROCESS_ID> ./lua/videos.lua- Export your wallet JSON file (e.g., from Wander, formerly ArConnect).
- Place the wallet JSON file in the root of your project.
- Rename it to
wallet.json(this is the default expected by ArDrive Turbo SDK scripts).
# Build the application for production
pnpm build
# Deploy to Arweave using ArDrive Turbo SDK
pnpm run deploy (Assuming you have a deploy script in your package.json configured for ArDrive Turbo. If not, you'll need to set one up or use the Turbo CLI directly.)
After successful deployment, you'll receive a Transaction ID (manifest ID). Save this ID for setting up ArNS.
β οΈ Note: You must have sufficient Turbo credits in your wallet for deployment. Purchase them at turbo-topup.com if needed.
Follow the ArNS documentation and the AR.IO SDK guides to point an ArNS name to your deployed application's manifest ID.
Scripts like those previously in this project for setBaseArns.js or setUndername.js can be adapted if you have them.
- Displays the video carousel on the landing page.
- Connects to user wallets (primarily for ArNS name display via AR.IO SDK).
- Fetches video links from the AO process using
@permaweb/aoconnect.
- Stores a list of video objects (ID, title, embed URL).
- Provides a
GetVideoshandler to return this list as JSON.
- User visits the landing page.
- The
VideoCarouselcomponent fetches video data from the AO process specified insrc/config.js. - The AO process executes the
GetVideoshandler and returns the list of video links. - The frontend renders the videos in the Magic UI Marquee component.
- If a user connects their wallet, the
NavBarattempts to fetch and display their primary ArNS name.
Your package.json might contain scripts like:
pnpm dev- Run local development serverpnpm build- Build for productionpnpm lint- Lint the codebasepnpm deploy- Deploy to Arweave (custom script, needs setup with Turbo SDK)
- Your
wallet.jsonfile contains your private keys - NEVER commit it to version control. Ensure it's in your.gitignore. - ArNS updates can take a few minutes to propagate across the network.
- Always keep your deployment Transaction IDs (manifest IDs) for reference.
- $ARIO tokens are required for ArNS operations.
- Turbo credits are required for deployment to Arweave.
- Video Carousel Not Loading Videos: Check the
AO_VIDEOS_PROCESS_IDinsrc/config.js. Verify the AO process is running andvideos.luais loaded correctly. Check browser console for network errors (CORS, rate limiting from AO gateways). - Deployment Fails: Check your Turbo credit balance and ensure
wallet.jsonis correctly configured. - ArNS Issues: Verify your ArNS ownership, $ARIO balance, and that the manifest ID is correct.
- Wallet Connection Issues: Ensure a compatible Arweave wallet extension (like Wander) is installed and accessible if testing wallet-specific features beyond basic connection.
This project is licensed under the MIT License - see the LICENSE file for details.