Khala Phase 0: Project scaffolding — CF Worker + Hono + D1 #124

Closed
opened 2026-04-25 04:33:39 +00:00 by tuanzi · 0 comments
Owner

Parent: #119

Objective

Scaffold packages/khala as a Cloudflare Worker project.

Tasks

  1. Create packages/khala/package.json with deps: hono, jsonata, @cloudflare/workers-types, wrangler, vitest
  2. Create packages/khala/wrangler.toml with D1 binding (DB), Durable Object binding (THREAD/ThreadDO), migration tag v1
  3. Create packages/khala/tsconfig.json (ES2022, strict, bundler resolution, CF workers types)
  4. Create packages/khala/src/index.ts — minimal Hono app with /health endpoint
  5. pnpm install and verify wrangler types generates worker-configuration.d.ts

Env type

export type Env = {
  DB: D1Database;
  THREAD: DurableObjectNamespace;
  ADMIN_SECRET: string;
};

References

  • Plan: docs/plans/2026-04-25-khala-mvp.md (Task 0.1)
  • Coding conventions: CLAUDE.md
Parent: #119 ## Objective Scaffold `packages/khala` as a Cloudflare Worker project. ## Tasks 1. Create `packages/khala/package.json` with deps: hono, jsonata, @cloudflare/workers-types, wrangler, vitest 2. Create `packages/khala/wrangler.toml` with D1 binding (DB), Durable Object binding (THREAD/ThreadDO), migration tag v1 3. Create `packages/khala/tsconfig.json` (ES2022, strict, bundler resolution, CF workers types) 4. Create `packages/khala/src/index.ts` — minimal Hono app with `/health` endpoint 5. `pnpm install` and verify `wrangler types` generates worker-configuration.d.ts ## Env type ```typescript export type Env = { DB: D1Database; THREAD: DurableObjectNamespace; ADMIN_SECRET: string; }; ``` ## References - Plan: `docs/plans/2026-04-25-khala-mvp.md` (Task 0.1) - Coding conventions: `CLAUDE.md`
This repo is archived. You cannot comment on issues.
No Label
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/nerve#124