An interactive movie platform where users extend branching narratives through AI-generated video scenes. Built as a Base mini app using OnchainKit and the Farcaster SDK.
Before getting started, make sure you have:
- Base app account
- A Farcaster account
- Vercel account for hosting the application
- Coinbase Developer Platform Client API Key
git clone https://github.com/your-org/basedon.gitcd basedon
npm installCreate a .env.local file and add your environment variables:
# App Configuration
NEXT_PUBLIC_PROJECT_NAME="BasedOn"
NEXT_PUBLIC_ONCHAINKIT_API_KEY=<Replace-WITH-YOUR-CDP-API-KEY>
NEXT_PUBLIC_URL=
# Database (Neon PostgreSQL)
POSTGRES_URL=<Your-Neon-Postgres-URL>
# Video Storage (Cloudflare R2)
AWS_REGION=auto
AWS_ACCESS_KEY_ID=<Your-R2-Access-Key>
AWS_SECRET_ACCESS_KEY=<Your-R2-Secret-Key>
AWS_S3_BUCKET_NAME=scenesnpm run db:migratenpm run devThe app will be available at http://localhost:3001
app/- Next.js app directory with pages and API routesapp/components/- React componentsapp/types/- TypeScript type definitionsschema.md- Database schema documentationMOVIE_PLATFORM.md- Platform design and mechanicsminikit.config.ts- Farcaster manifest configuration
vercel --prodYou should have a URL deployed to a domain similar to: https://your-vercel-project-name.vercel.app/
Add your production URL to your local .env file:
NEXT_PUBLIC_PROJECT_NAME="BasedOn"
NEXT_PUBLIC_ONCHAINKIT_API_KEY=<Replace-WITH-YOUR-CDP-API-KEY>
NEXT_PUBLIC_URL=https://your-vercel-project-name.vercel.app/Add all environment variables to your production environment:
vercel env add NEXT_PUBLIC_PROJECT_NAME production
vercel env add NEXT_PUBLIC_ONCHAINKIT_API_KEY production
vercel env add NEXT_PUBLIC_URL production
vercel env add POSTGRES_URL production
vercel env add AWS_REGION production
vercel env add AWS_ACCESS_KEY_ID production
vercel env add AWS_SECRET_ACCESS_KEY production
vercel env add AWS_S3_BUCKET_NAME production- Navigate to Farcaster Manifest tool
- Paste your domain in the form field (ex: your-vercel-project-name.vercel.app)
- Click the
Generate account associationbutton and follow the on-screen instructions for signing with your Farcaster wallet - Copy the
accountAssociationobject
Update your minikit.config.ts file to include the accountAssociation object:
export const minikitConfig = {
accountAssociation: {
"header": "your-header-here",
"payload": "your-payload-here",
"signature": "your-signature-here"
},
frame: {
// ... rest of your frame configuration
},
}vercel --prodGo to base.dev/preview to validate your app:
- Add your app URL to view the embeds and click the launch button to verify the app launches as expected
- Use the "Account association" tab to verify the association credentials were created correctly
- Use the "Metadata" tab to see the metadata added from the manifest and identify any missing fields
To publish your app, create a post in the Base app with your app's URL.
- Framework: Next.js 15 with App Router
- Blockchain: Base (Ethereum L2)
- Wallet Integration: OnchainKit
- Database: PostgreSQL (Neon)
- Video Storage: Cloudflare R2
- Styling: Tailwind CSS v4
- AI: GPT-4o-mini for prompt refinement
MOVIE_PLATFORM.md- Platform design and mechanicsschema.md- Database schema and architecture- Base Mini Apps
- OnchainKit