Repair Assistant 🛠️ Welcome to the Repair Assistant! This is a web application that uses Artificial Intelligence (Google Gemini) to help you diagnose and fix broken items around your house.

Think of it as a friendly expert in your pocket. You can upload a photo of a broken toaster, a leaky user, or a strange error code on your washing machine, and this app will guide you through the repair process step-by-step.

✨ Features

  1. Visual Diagnosis: Upload a photo, and the AI will analyze it to understand the problem.
  2. Interactive Chat: Talk to the assistant to provide more details or ask questions.
  3. Step-by-Step Guides: Get a clear, easy-to-follow repair plan with a list of tools you'll need.
  4. Beginner Friendly: The code is heavily commented to help you learn how it works!

🧠 How it Works (Under the Hood)

  1. User Uploads Image: The main.js file detects the file selection and converts it to a text format (Base64) using utils.js.
  2. Sending to AI: When you send a message, main.js gathers the chat history from state.js and sends it to callGeminiApi in api.js.
  3. AI Thinks: The app waits for the response, showing a typing animation (ui.js).
  4. Response: When the AI replies, main.js receives the text and tells ui.js to display it on the screen.
  5. Final Guide: If the AI detects that it has enough info, it generates a full Markdown guide, which we convert to HTML to display nicely.

Built With

Share this project:

Updates

Submission history