How sachinnchoudhary/jarvis_aichat works
Project type and purpose
• This is a single‐page web application (SPA) built with React/TypeScript and Vite.
• Its primary function is to provide a voice-driven assistant interface that leverages the local Ollama LLM model, plus browser speech APIs and text-to-speech.
File structure
• Top level: configuration files (vite.config.ts, tailwind.config.ts, tsconfig.json), package.json, README.md, and a public folder.
• src/ contains:
• main.tsx (entrypoint) and index.html (shell)
• App.tsx + App.css (root application container)
• components/ (UI widgets, grouped into feature components and a ui/ library of shadcn/ui primitives)
• hooks/ (custom React hooks for mobile detection, toast notifications, Ollama API calls, text‐to‐speech, and overall voice-assistant orchestration)
• lib/utils.ts (shared utility functions)
• pages/ (route‐level components: home and 404)
• No dedicated backend code; the “backend” is the local Ollama process and browser APIs.
README for architectural insights
• Technology stack: Vite, TypeScript, React, shadcn/ui, Tailwind CSS
• External dependency: Ollama CLI and models (e.g., llama3)
• Runtime flow: user speaks → browser speech recognizer → custom hook sends text to Ollama → receives model response → optionally reads out via text-to-speech
Diagramming conventions
• Blue for UI components
• Green for logic/hooks
• Orange for external services/APIs