Skip to content

Shubh6665/AIWebScroller

Repository files navigation

AIWebScroller

AIWebScroller is a Chrome extension that automatically answers Google Forms questions using AI. It supports both multiple-choice (single/multiple answers) and short-answer questions, and can be toggled ON/OFF by the user. The backend is powered by Node.js/Express and connects to the Groq AI API for generating answers.


🚀 Features

  • Auto-answer Google Forms:
    Detects questions and fills in answers using AI.
  • Supports MCQ & Short Answers:
    Handles single/multiple-choice (checkbox/radio) and text fields.
  • Fuzzy Matching:
    Matches AI answers to options even if wording is different.
  • Highlight-to-Answer:
    Highlight any question text on a page to get an instant AI answer and auto-fill/tick.
  • ON/OFF Toggle:
    Easily enable or disable the extension from the popup.
  • Backend API:
    Node.js/Express backend with endpoints for AI queries and health checks.
  • Environment Config:
    Uses .env for secure API key management.

🛠️ Tech Stack

  • Frontend:
    • JavaScript (Chrome Extension APIs)
    • HTML/CSS (Popup UI)
  • Backend:
    • Node.js
    • Express.js
    • Axios (for Groq API calls)
    • CORS
    • dotenv
  • AI Service:

📦 Folder Structure

AIWebScroller/
├── content.js         # Main extension logic 
├── popup.html         # Popup UI for ON/OFF toggle
├── popup.js           # Popup logic
├── manifest.json      # Chrome extension manifest
├── server.js          # Node.js backend server
├── .env               # Environment variables (GROQ_API_KEY, etc.)
└── ...                # Other assets

⚙️ Backend API

1. /api/ask

POST
Generates an AI answer for a given question/context.

Request Body:

{
  "messages": [
    { "role": "user", "content": "Context: ... Question: ..." }
  ]
}

Response:

{
  "choices": [
    {
      "message": {
        "content": "AI-generated answer here."
      }
    }
  ]
}

2. /api/health

GET
Health check endpoint.

Response:

{ "status": "ok", "message": "Server is running" }

🔑 Environment Variables

Create a .env file in the root:

GROQ_API_KEY=your_groq_api_key_here
PORT=8000

🖥️ How to Run

1. Backend

cd AIWebScroller
npm install
node server.js

2. Frontend (Chrome Extension)

  1. Build/Zip the extension folder (if sharing).

  2. Load in Chrome:

    • Go to chrome://extensions/
    • Enable Developer mode
    • Click Load unpacked and select the extension folder.
  3. ON/OFF Toggle:

    • Click the extension icon in Chrome.
    • Use the checkbox to enable or disable auto-answering.

✨ Usage

  • Auto-answer:
    Open a Google Form or supported page. The extension will auto-fill answers.
  • Highlight-to-Answer:
    Highlight any question text, and the extension will fetch and fill/tick the answer.
  • Toggle:
    Use the popup to turn the extension ON or OFF as needed.

🧩 Customization

  • Change AI Model:
    Edit server.js and update the model field in the Groq API call.
  • Add More Domains:
    Update the CORS origin array in server.js if you want to support more sites.

🛡️ Security & Privacy

  • Your API key is stored in .env and never exposed to the frontend.
  • All AI requests are proxied through your backend.

📝 License

MIT License


🙋 FAQ

Q: Can I use a different AI backend?
A: Yes! Just update the API call in server.js to your preferred provider.

Q: How do I share with friends?
A: Zip the extension folder and share. Friends can load it via chrome://extensions/ > Load unpacked.

Q: What if I hit API limits?
A: You can self-host a local model (like Ollama) and update the backend to use it.


🤝 Contributing

Pull requests and suggestions welcome!


Made with ❤️ for productivity.

About

AIWebScroller is a Chrome extension that automatically answers Google Forms questions using AI. It supports both multiple-choice (single/multiple answers) and short-answer questions, and can be toggled ON/OFF by the user.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors