Skip to main content

Getting Started

Prerequisites:

  • Cloudflare account with Pages + Workers enabled
  • Node.js >= 18.18 and pnpm 9.x (or npm)
  • Wrangler CLI v3.x (npm i -g wrangler)

Clone and install:

git clone <your-fork-or-repo>
cd ChyperAI-Dev
pnpm install # or: npm install

Configure Cloudflare bindings:

  • Edit wrangler.toml (Pages) and wrangler.worker.toml (Worker) to set:
    • D1 binding DB to your database
    • Durable Object DO_WORKSPACE and Worker script name
    • Vars and secrets (see Configuration docs)

Create or link D1:

# If you need a new D1
npx wrangler d1 create chyperai_db

# Apply migrations (remote)
npx wrangler d1 migrations apply chyperai_db --remote

Local development:

# App UI + Pages Functions (Vite)
npm run dev

# Docs site (Docusaurus)
npm run docs:dev

Build & deploy:

# Pages app
npm run build
npx wrangler pages deploy

# Worker (Durable Objects)
npx wrangler deploy --config wrangler.worker.toml

# Docs
npm run docs:build
npx wrangler pages deploy apps/docs/build --project-name chyperai-docs

Verify:

  • Projects API: curl -i https://dev.chyper.ai/api/projects
  • Hello API: curl -i https://dev.chyper.ai/api/hello
  • Docs: open your Pages preview URL