How sakshampaliwal21/image-recognition-chatbot works
This Electron app lets a user upload an image, ask a question, and continue with follow-ups. The renderer validates and converts the image, maintains conversation history, and sends requests through a narrow preload bridge to the main process, which validates the request and calls Groq. Responses are rendered in the chat; the interface also provides image previews, suggested prompts, theme switching, and chat reset. The README documents these capabilities; the graph follows sampled source for the request flow and treats interface details as renderer responsibilities.
Main entry points: renderer.js Chat and controls · preload.js IPC bridge · main.js Request validation
Components 11
Electron desktop
- App window
src/main.js - IPC bridge
src/preload.js
Chat interface
- Chat and controls
src/renderer.js - Image upload and preview
src/renderer.js - Conversation history
src/renderer.js - Response rendering
src/renderer.js - Chat utilities
src/renderer.js
Image analysis
- Request validation
src/main.js - Groq vision chat
src/main.js
Other components
- Desktop user
- Groq API
Connections 12
- Desktop user → Chat and controls: uses
README.md - Chat and controls → Image upload and preview: selects image
src/renderer.js - Image upload and preview → Conversation history: resets on upload
src/renderer.js - Chat and controls → Conversation history: sends context
src/renderer.js - Chat and controls → IPC bridge: invokes ask
src/preload.js - IPC bridge → Request validation: dispatches IPC
src/main.js - Request validation → Groq vision chat: validates request
src/main.js - Groq vision chat → Groq API: requests completion
src/main.js - Chat and controls → Response rendering: displays answer
src/renderer.js - Response rendering → Conversation history: records exchange
src/renderer.js - Chat and controls → Chat utilities: controls prompts and theme
src/renderer.js - App window → Chat and controls: loads interface
src/main.js