How haiere/kirana works
Kirana is a browser-based streaming chatbot. A user submits a message, the app adds it to in-memory conversation history, requests a Groq completion either directly or through a server-side proxy, and renders streamed text back into the chat. Settings and theme preferences are also held in memory. The tree and sampled source support these runtime paths; deployment configuration and the HTML/CSS details are not mapped as separate subsystems.
Main entry points: app.js Chat controller · chat.js Chat proxy · index.html Chat interface
Components 10
Chat experience
- Chat interface
index.html - Chat controller
app.js - Conversation history
app.js - Message renderer
app.js
Model requests
- Streaming client
app.js - Chat proxy
functions/api/chat.js - API key secret
Preferences
- In-memory preferences
app.js
Other components
- User
- Groq API
Connections 11
- User → Chat interface: enters messages
- Chat controller → Chat interface: handles events
- Chat controller → Conversation history: updates history
- Chat controller → Message renderer: renders messages
- Chat controller → Streaming client: requests completion
- Streaming client → Groq API: calls directly
- Streaming client → Chat proxy: posts messages
- Chat proxy → API key secret: reads key
- Chat proxy → Groq API: forwards request
- Groq API → Streaming client: streams response
- Chat controller → In-memory preferences: reads and writes