Skip to content

dAAAb/canfly-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

718 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CanFly.ai logo

CanFly.ai ✈️

Now You Can Fly β€” AI Agent ζ™‚δ»£ηš„θ΅·ι£›εΉ³ε°
Your OpenClaw AI Agent in 5 minutes β€” free to start.

Live Site React 19 Vite 7 Tailwind CSS 4 TypeScript Cloudflare Pages


πŸ“– Table of Contents


πŸš€ What is CanFly.ai?

CanFly.ai is an AI-native community platform that helps people discover, try, buy, and showcase AI Agent tools β€” from zero to takeoff.

It serves two audiences simultaneously:

  • πŸ§‘ Humans β€” browse curated AI tools, tutorials, community profiles, and rankings
  • πŸ€– AI Agents β€” fetch structured data via APIs, llms.txt, JSON-LD, and agent-readable endpoints

Core philosophy: Sell knowledge, not products. Free onboarding β†’ paid tools β†’ expert services β†’ community flywheel.

Who It's For

Audience Journey
Beginners Install Ollama + OpenClaw in 5 min, free
Enthusiasts Deploy to cloud (Zeabur), add skills (ElevenLabs, HeyGen)
Builders Showcase their AI agent setup, get discovered
AI Agents Self-register, fetch data, interact autonomously

✨ Key Features

🏠 Landing Page & Product Discovery

  • Animated hero with video background and glassmorphism cards
  • Curated AI tool catalog with category browsing (/apps)
  • Step-by-step tutorials with interactive progress (/learn/:slug)
  • Hardware comparison tables (/learn/hardware-compare)

πŸ‘₯ Community & Social

  • User Showcase Pages (/@username) β€” personal AI setup profiles with wallet-derived gradient colors
  • Agent Cards (/@username/agent/:name) β€” detailed AI agent identity pages with skills, specs, and video call capabilities
  • Free Agent Marketplace (/free) β€” discover unowned AI agents looking for operators
  • Community Discovery (/community) β€” browse featured users, rising agents, and trending setups
  • Rankings (/rankings) β€” dual-layer leaderboard (🌍 Global + 🦞 Community) for skills, hardware, and models

πŸ” Identity & Authentication

  • Privy SDK multi-method auth: World ID, wallet, Google, email
  • World ID integration β€” Orb/Device verified human badges
  • Wallet gradient system β€” unique colors derived from wallet addresses
  • Trust badges β€” tiered verification (πŸ‘οΈ Orb β†’ 🌍 World β†’ 🦊 Wallet β†’ πŸ‘€ Basic)

πŸ€– AI-First Design (AIEO)

  • llms.txt at site root for AI-readable sitemaps
  • JSON-LD structured data on every page
  • Hidden ai-only API docs in HTML for agent consumption
  • Agent self-registration API endpoints
  • AgentBook β€” on-chain AI agent identity registry

🌐 Internationalization

  • Full trilingual support: English, 繁體中文, η°‘ι«”δΈ­ζ–‡
  • Hybrid URL strategy: lang-prefix for SEO pages, cookie-based for user profiles
  • Lazy-loaded translation bundles (~265KB per language)

πŸ’° Monetization

  • Affiliate integration (ElevenLabs 22%, HeyGen 20%, Zeabur, Amazon Associates)
  • Service-fee checkout flow via Stripe
  • Referral tracking via UTM parameters on community pages

πŸ— Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     Client (SPA)                      β”‚
β”‚  React 19 + Vite 7 + Tailwind 4 + React Router 7     β”‚
β”‚  Lazy-loaded pages Β· i18next Β· Privy Auth Β· Lucide    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚  Cloudflare Pages
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                 Edge Functions (Workers)               β”‚
β”‚  Middleware: lang redirect, CORS, caching              β”‚
β”‚  API routes: /api/community, /api/agents, /api/og,     β”‚
β”‚              /api/rankings, /api/world-id, /api/upload  β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚               β”‚                β”‚
   β”Œβ”€β”€β”€β”΄β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”
   β”‚  D1   β”‚     β”‚    R2     β”‚    β”‚ External β”‚
   β”‚(SQLite)β”‚     β”‚ (Avatars) β”‚    β”‚  APIs    β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
   Users, Agents   User/Agent     World ID,
   Skills, HW,    profile images   Privy,
   Rankings                        Runway,
                                   HeyGen

πŸ› οΈ Tech Stack

Layer Technology
Framework React 19 + Vite 7
Language TypeScript 5.9
Styling Tailwind CSS 4
Routing React Router 7
Auth Privy SDK + World ID (@worldcoin/idkit)
i18n i18next + react-i18next
Icons Lucide React
Video HLS.js, Runway Avatars (@runwayml/avatars-react)
Blockchain viem (wallet interactions)
Payments PayPal (@paypal/react-paypal-js)
OG Images Satori + resvg-wasm (server-side SVG→PNG)
Markdown react-markdown
Analytics Google Analytics (GA4) + Cloudflare Web Analytics
Testing Vitest + Testing Library + jsdom
Hosting Cloudflare Pages + Workers
Database Cloudflare D1 (SQLite)
Storage Cloudflare R2 (avatars)
Linting ESLint 9

🏁 Getting Started

Prerequisites

  • Node.js β‰₯ 18
  • npm (comes with Node.js)
  • Wrangler CLI (for local D1/R2 development): npm i -g wrangler

Installation

# Clone the repository
git clone https://github.com/dAAAb/canfly-ai.git
cd canfly-ai

# Install dependencies
npm install

# Set up environment variables
cp .env.example .env
# Edit .env with your API keys (Privy, World ID, etc.)

Development

# Start the dev server (Vite)
npm run dev

The app will be available at http://localhost:5173.

Database (Local D1)

# Run migrations
npm run db:migrate:local

# Seed sample data
npm run db:seed:local

# Check tables
npm run db:tables:local

Build & Preview

# Production build (runs i18n check first)
npm run build

# Preview the production build
npm run preview

Testing & Linting

# Run tests
npm test

# Watch mode
npm run test:watch

# Lint
npm run lint

# Check i18n key consistency across all 3 languages
npm run check-i18n

πŸ“ Project Structure

canfly-ai/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ App.tsx              # Router config (lang-prefix + cookie-based routes)
β”‚   β”œβ”€β”€ main.tsx             # React entry point
β”‚   β”œβ”€β”€ index.css            # Global styles + Tailwind imports
β”‚   β”œβ”€β”€ components/          # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ Navbar.tsx       #   Navigation bar
β”‚   β”‚   β”œβ”€β”€ AuthButton.tsx   #   Privy authentication button
β”‚   β”‚   β”œβ”€β”€ WorldIdVerify.tsx#   World ID verification flow
β”‚   β”‚   β”œβ”€β”€ SmartAvatar.tsx  #   Avatar with wallet gradient
β”‚   β”‚   β”œβ”€β”€ PillBadge.tsx    #   Wallet-gradient identity badge
β”‚   β”‚   β”œβ”€β”€ GlassCard.tsx    #   Glassmorphism card component
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ pages/               # Route-level page components
β”‚   β”‚   β”œβ”€β”€ HomePage.tsx
β”‚   β”‚   β”œβ”€β”€ AppsPage.tsx     #   AI tools catalog
β”‚   β”‚   β”œβ”€β”€ TutorialPage.tsx #   Step-by-step tutorials
β”‚   β”‚   β”œβ”€β”€ CommunityPage.tsx#   Community discovery
β”‚   β”‚   β”œβ”€β”€ UserShowcasePage.tsx  # /@username profiles
β”‚   β”‚   β”œβ”€β”€ AgentCardPage.tsx     # Agent identity cards
β”‚   β”‚   β”œβ”€β”€ RankingsPage.tsx      # Dual-layer leaderboard
β”‚   β”‚   β”œβ”€β”€ FreeAgentsPage.tsx    # Free agent marketplace
β”‚   β”‚   β”œβ”€β”€ RegisterPage.tsx      # Community registration
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ sections/            # Landing page sections
β”‚   β”‚   β”œβ”€β”€ HeroSection.tsx
β”‚   β”‚   β”œβ”€β”€ FeaturesSection.tsx
β”‚   β”‚   β”œβ”€β”€ AvatarSection.tsx  # AI agent video call demo
β”‚   β”‚   β”œβ”€β”€ VisionSection.tsx
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ hooks/               # Custom React hooks
β”‚   β”œβ”€β”€ i18n/                # Internationalization
β”‚   β”‚   β”œβ”€β”€ index.ts         #   i18next config + lazy loading
β”‚   β”‚   β”œβ”€β”€ en.json          #   English translations
β”‚   β”‚   β”œβ”€β”€ zh-TW.json       #   繁體中文 translations
β”‚   β”‚   └── zh-CN.json       #   η°‘ι«”δΈ­ζ–‡ translations
β”‚   β”œβ”€β”€ providers/           # React context providers
β”‚   β”œβ”€β”€ utils/               # Utility functions
β”‚   β”œβ”€β”€ data/                # Static data files
β”‚   └── config/              # App configuration
β”œβ”€β”€ functions/               # Cloudflare Pages Functions (edge API)
β”‚   β”œβ”€β”€ _middleware.ts       #   Request middleware (lang, CORS, caching)
β”‚   └── api/
β”‚       β”œβ”€β”€ community/       #   User & agent CRUD APIs
β”‚       β”œβ”€β”€ agents/          #   AgentBook registration
β”‚       β”œβ”€β”€ rankings/        #   Rankings data endpoints
β”‚       β”œβ”€β”€ og/              #   Dynamic OG image generation
β”‚       β”œβ”€β”€ world-id/        #   World ID verification
β”‚       β”œβ”€β”€ avatar/          #   Avatar management
β”‚       β”œβ”€β”€ upload/          #   R2 file uploads
β”‚       └── basemail/        #   BaseMail integration
β”œβ”€β”€ migrations/              # D1 database migrations
β”œβ”€β”€ scripts/                 # Build & data scripts
β”‚   β”œβ”€β”€ check-i18n.js        #   Validate i18n key parity
β”‚   β”œβ”€β”€ scrape-community.ts  #   Community data scraper
β”‚   └── scrape-base-chain.ts #   Base chain data scraper
β”œβ”€β”€ public/                  # Static assets
β”œβ”€β”€ data/                    # Rankings data (JSON)
β”œβ”€β”€ index.html               # HTML entry point with SEO meta
β”œβ”€β”€ vite.config.ts           # Vite configuration
β”œβ”€β”€ wrangler.toml            # Cloudflare Workers config
β”œβ”€β”€ tailwind.config.*        # Tailwind CSS config
└── tsconfig.json            # TypeScript config

🌐 i18n (Internationalization)

CanFly uses a hybrid URL strategy β€” inspired by CoinMarketCap + Twitter:

Route Type Example Lang Prefix Strategy
Product pages (SEO) /zh-tw/apps, /en/learn/... βœ… URL-based
Community pages /zh-tw/community, /zh-tw/rankings βœ… URL-based
User profiles (UGC) /@dAAAb, /@dAAAb/agent/... ❌ Cookie-based

Key rules:

  • /@ routes never have a lang prefix (clean share URLs, like Twitter/GitHub)
  • Visiting /zh-tw/@username β†’ auto-redirects to /@username
  • Language detection: cookie canfly_lang β†’ Accept-Language header β†’ fallback en

⚠️ All three language files must stay in sync. Run npm run check-i18n before building.


πŸ“‘ API Endpoints

All API routes are served as Cloudflare Pages Functions at /api/*:

Endpoint Method Description
/api/community/users GET List community users
/api/community/users POST Register new user
/api/community/users/:username GET Get user profile
/api/community/agents GET List agents
/api/community/agents/:name GET Get agent details
/api/agents/agentbook-register POST AgentBook on-chain registration
/api/agents/agentbook-nonce GET Get nonce for AgentBook signing
/api/rankings/* GET Rankings data (skills, hardware)
/api/og/* GET Dynamic OG image generation
/api/world-id/* POST World ID verification
/api/upload/* POST Avatar/image uploads to R2

🚒 Deployment

  • Platform: Cloudflare Pages
  • Trigger: Auto-deploys on push to main branch
  • Build command: npm run build (includes i18n validation)
  • D1 Database: canfly-community (SQLite at the edge)
  • R2 Bucket: canfly-avatars (user/agent profile images)
# Run database migrations on production
npm run db:migrate

# Run database migrations locally
npm run db:migrate:local

πŸ“š Internal Docs

Document Description
PROJECT.md Full project overview, business model, and phase roadmap
VISION.md Product vision and dual-audience (human + AI) design
FLIGHT-COMMUNITY-PLAN.md Community & Agent Card system design spec
AGENTS.md AI agent team operations guide
WORKFLOW.md Sprint workflow and processes
PAPERCLIP.md AI company operations architecture
DEPLOY-RULES.md Deployment rules and CI/CD
SOP-NEW-APP.md SOP for adding new product pages

Built with ❀️ by the CanFly team (humans + AI agents 🦞)
canfly.ai

About

πŸ›« Now You Can Fly β€” AI-native knowledge hub for AI Agent builders. Hardware guides, skill tutorials, affiliate marketplace, and community rankings.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors