a chat app built on Cloudflare Workers AI. uses Llama 3.3 70B running on Workers AI, with each chat session backed by a Durable Object that persists messages in SQLite. the chat sessions are stored in KV.
0012 doesn't mean anything. This is the 12th repository I'm publishing on GitHub, hence the name.
you'll need a Cloudflare account and wrangler authenticated.
wrangler logininstall dependencies:
npm install
bun install # if you use buncreate a KV namespace for session metadata: (this will update wrangler.jsonc file by itself.)
wrangler kv namespace create SESSIONS_KVbuild the frontend and start the dev server:
npm run build
npx wrangler devfor live frontend reloading during development, run these in two separate terminals:
npm run dev:ui # hot reloading
npx wrangler dev # workernpm run deploy- Workers AI runs remotely even in local dev, so you need to be logged into wrangler
- the DO migration in
wrangler.jsonconly needs to run once, don't remove it after deploying - don't copy this and call it your own, i need this for an assignment