How bobdon/katha works
Katha is a bilingual English/Bengali story-reading and authoring application. Readers browse stories and topics, open a story, and can bookmark or react; authors sign in, draft or publish stories, and use AI writing tools. The sampled editor code loads and manages stories through the stories API, which persists them in Cloudflare KV. The tree and excerpts support these workflows, but the README is empty and some client code is unsampled; uncertain wiring is omitted. The Netlify AI function appears to be an alternative deployment endpoint.
Main entry points: editor.js Editor workflow · app.js Reader interactions · index.html Story site · editor.html Editor page
Components 15
Story Reading
- Story site
index.html - Reader interactions
app.js - Story content
index.html
Story Authoring
- Editor page
editor.html - Editor workflow
editor.js - Browser storage
- AI tool client
editor.js
Application Services
- Stories API
functions/api/stories.js - Story KV
functions/api/stories.js - Cloudflare AI endpoint
functions/api/ai.js - Netlify AI endpoint
netlify/functions/ai.js
External Integrations
- Google sign-in
editor.js - Gemini API
Other components
- Reader
- Author
Connections 16
- Reader → Story site: opens
- Story site → Reader interactions: loads
- Reader interactions → Story content: renders
- Reader → Reader interactions: browses and reacts
- Author → Editor page: opens
- Editor page → Editor workflow: loads
- Editor workflow → Google sign-in: initializes sign-in
- Google sign-in → Editor workflow: returns identity
- Editor workflow → Browser storage: stores session
- Editor workflow → Stories API: loads and syncs stories
- Stories API → Story KV: reads and writes
- Editor workflow → AI tool client: invokes AI tools
- AI tool client → Cloudflare AI endpoint: posts requests
- Cloudflare AI endpoint → Gemini API: generates content
- AI tool client → Netlify AI endpoint: posts requests
- Netlify AI endpoint → Gemini API: generates content