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) andwrangler.worker.toml(Worker) to set:- D1 binding
DBto your database - Durable Object
DO_WORKSPACEand Worker script name - Vars and secrets (see Configuration docs)
- D1 binding
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