CAST QUEST Frames is a Web3-native social photo protocol that feels like Instagram, mints like Zora, extends like Farcaster Frames, and builds like Remix β powered by a Smart Brain multi-agent AI.
- Chain-first: Built on Base with multi-chain EVM support
- Creator-first: Onchain minting, collecting, royalties, and programmable fees
- Builder-first: Frames, SDK, and a Remix-style module builder
- AI-native: Smart Brain agents for pricing, previews, tagging, and system optimization
Required:
- Node.js 20+ (to prevent ERR_INVALID_THIS errors)
- pnpm 9+ (package manager)
- PostgreSQL 14+ (for database)
Install with nvm:
nvm install 20
nvm use 20
npm install -g pnpm@9# Clone the repository
git clone https://github.com/CastQuest/castquest-frames.git
cd castquest-frames
# Install dependencies
pnpm install
# Set up environment variables
cp .env.example .env.local
# Edit .env.local with your values
# Initialize database
pnpm db:push
# Start development
pnpm devCopy .env.example to .env.local and configure:
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/castquest"
# Auth.js
NEXTAUTH_SECRET="your-secret-key" # Generate: openssl rand -base64 32
NEXTAUTH_URL="http://localhost:3000"
# Web3
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID="your-project-id"
NEXT_PUBLIC_ALCHEMY_ID="your-alchemy-key"
# Contract Deployment (Admin only)
ADMIN_PRIVATE_KEY="your-deployer-private-key"
# AI Agents
OPENAI_API_KEY="sk-your-api-key"
# Feature Flags
NEXT_PUBLIC_WEB3_ENABLED="true"
NEXT_PUBLIC_AGENTS_ENABLED="true"# Generate Prisma client
pnpm db:generate
# Push schema to database
pnpm db:push
# Run migrations (development)
pnpm db:migrate:dev
# Run migrations (production β applies pending migrations without prompting)
pnpm db:migrate
# Open Prisma Studio
pnpm db:studioapps/
web/ - Next.js 15 user app (feed, profiles, frames)
admin/ - Next.js 15 admin app (fees, templates, AI settings)
mobile/ - React Native / Expo app (future)
packages/
contracts/ - Solidity contracts (Base + EVM, Foundry)
sdk/ - CAST QUEST SDK integration
neo-ux-core/ - Shared UI components & Neon Glass design system
ai-brain/ - Multi-agent Smart Brain orchestration
core-services/- Backend services and database layer
frames/ - Farcaster Frame protocol support
strategy-worker/ - Background job processing
prisma/
schema.prisma - Database schema (Users, Roles, Permissions, Feature Flags, Agents, Contracts)
scripts/ - Development and deployment automation
docs/ - Documentation, whitepapers, technical guides
examples/ - Example frame definitions and usage
cd apps/web && pnpm dev
# Access: http://localhost:3000Features:
- β¨ AI Frame Builder
- π Analytics & Metrics
- πͺ Frame Marketplace
- π¬ Community Hub
- π― Frame Management
- β‘ Quest System
- π NFT Mints
cd apps/admin && pnpm dev
# Access: http://localhost:3001Features:
- π User & Role Management
- π© Feature Flags Control
- π Contract Deployment
- π€ Agent Configuration
- π System Monitoring
- π‘οΈ RBAC Permissions
CastQuest uses Auth.js (NextAuth v5) for authentication:
- Credentials-based login (email/password)
- JWT session strategy
- Role-based access control (RBAC)
- Protected routes via middleware
| Role | Access |
|---|---|
| ADMIN | Full system access, user management, deployments |
| OPERATOR | Manage quests, frames, run agents |
| CREATOR | Create content, manage own frames |
| VIEWER | Read-only access |
- RainbowKit for wallet connection
- Wagmi for Ethereum interactions
- viem for low-level blockchain operations
- Ethereum Mainnet (1)
- Base (8453) β Primary
- Optimism (10)
- Arbitrum (42161)
- Polygon (137)
- Base Sepolia (84532) β Testnet
- Sepolia (11155111) β Testnet
AI-powered automation agents:
| Agent | Function |
|---|---|
| FramePricingAgent | Market analysis, pricing recommendations |
| ContentModerationAgent | Content scanning, policy enforcement |
| QuestCompletionAgent | Quest validation, reward distribution |
| SmartBrainOrchestrator | Agent coordination, workflow optimization |
Deploy contracts directly from the Admin dashboard:
- Navigate to
/admin/contracts - Enter Solidity source code or paste pre-compiled bytecode
- Select target chain
- Deploy with one click
Supports verification on Etherscan/Basescan.
# Run comprehensive health check
bash scripts/master.sh health
# Run automated repair
bash scripts/repair-dependencies.sh
# AI-powered insights
.smartbrain/oracle.sh analyze# Development
pnpm dev # Start web app
pnpm dev:admin # Start admin app
pnpm dev:all # Start both apps
# Building
pnpm build # Build all packages
pnpm lint # Run linters
pnpm typecheck # Type checking
# Database
pnpm db:generate # Generate Prisma client
pnpm db:push # Push schema to DB
pnpm db:migrate:dev # Run migrations (development)
pnpm db:migrate # Run migrations (production)
pnpm db:studio # Open Prisma StudioSee CONTRIBUTING.md for contribution guidelines.
- Site: https://castquest.xyz
- Docs: https://docs.castquest.xyz
Social feeds will be onchain. Creators will own their rails. Builders will extend everything through Frames and SDKs. AI will act as the invisible Smart Brain across the entire stack.
Media β Templates β Frames β Mints β Quests β Strategy β Onchain
You are early.