An AI-powered web app that generates basic Chrome extension files (manifest.json, popup.html, content.js) from a simple idea.
-
🧠 Generate Chrome extension code using AI
-
📂 Outputs:
manifest.jsonpopup.htmlcontent.js
-
🎨 Clean UI with React
-
📦 Download generated files as ZIP
-
⚡ Fast backend using Node.js + Express
- Frontend: React.js
- Backend: Node.js + Express
- AI: Google Gemini API
- Other: JSZip, FileSaver
Extension-Generator/
│
├── backend/
│ ├── server.js
│ ├── .env
│ └── package.json
│
├── frontend/
│ ├── src/
│ │ ├── App.js
│ │ ├── App.css
│ │ └── index.js
│ └── package.json
│
└── README.md
git clone <your-repo-link>
cd Extension-Generatorcd backend
npm installCreate .env file:
GEMINI_API_KEY=your_api_key_hereRun backend:
node server.js👉 Runs on: http://localhost:5000
cd frontend
npm install
npm install jszip file-saverRun frontend:
npm start👉 Runs on: http://localhost:3000 (or 3001)
- User enters an idea
- Frontend sends request to backend
- Backend sends prompt to Gemini API
- AI generates Chrome extension files in JSON format
- Frontend parses and displays files
- User downloads files as ZIP
Create a dark mode Chrome extension
{
"manifest.json": "...",
"popup.html": "...",
"content.js": "..."
}-
AI sometimes returns extra text
-
Fix:
- Use strict prompt in backend
- Clean response before parsing
- API quota exceeded
✅ Solutions:
- Wait 15–60 minutes
- Use
gemini-1.5-flashmodel - Create new API key
- Avoid repeated requests
- Backend failed to call API
✅ Check:
- API key is correct
- Backend is running
- Console logs
- 🌙 Dark/Light mode toggle
- 📋 Copy code button
- 🔍 Live preview of extension
- 🌐 Deploy project online
- 🧠 Better JSON validation
- Popup UI
- Blocks images on websites
- Works on dynamic sites (YouTube)
Status: Completed ✅
Built as part of a guided learning project (Day 1–Day 4).
This project may hit API rate limits on free tier. Use responsibly.