Smart Hardware & Firmware Auditor — Take a photo of your breadboard. Get a safety report and ready-to-flash code in under 30 seconds.
Built for Build With AI Hack Days @ RU using Google Gemini AI.
- Upload a photo of a breadboard circuit or hand-drawn schematic
- Gemini analyzes the image through a 3-stage AI pipeline:
- Stage 1 — Vision Extraction: Identifies every component and pin connection
- Stage 2 — Safety Audit + Codegen: Checks wiring against electrical rules and writes driver code
- Stage 3 — Self-Check: Verifies every pin number in the code matches the detected connections
- Results show:
- 🔩 Detected components with confidence levels
- 🛡️ Color-coded safety audit (PASS / WARNING / CRITICAL)
- 📟 Copy/download-ready C++ (.ino) or Python (.py) firmware
Go to Google AI Studio and create a free API key.
cd auto-architect
cp .env.example .env
# Edit .env and paste your API key:
# GEMINI_API_KEY=your_key_herenpm install
npm startOpen your browser at http://localhost:3000
auto-architect/
├── .env ← Your API key (never commit this)
├── .env.example ← Template for others
├── .gitignore
├── package.json
├── server.js ← Express app entry point
├── routes/
│ └── analyze.js ← POST /api/analyze handler
├── services/
│ └── geminiService.js ← 3-stage Gemini pipeline
├── data/
│ └── wiringRules.js ← Hardcoded wiring knowledge base
└── public/
├── index.html ← Single-page frontend
├── style.css ← Dark premium UI styles
└── app.js ← Frontend state machine & rendering
Request (multipart/form-data):
| Field | Type | Required | Description |
|---|---|---|---|
image |
File | ✅ | Circuit photo (JPG/PNG/WEBP, max 20MB) |
board |
String | No | "Arduino Uno", "ESP32", "Raspberry Pi Pico", or "auto" |
language |
String | ✅ | "cpp" or "python" |
Response (200 OK):
{
"board": { "type": "ESP32 DevKit", "confidence": "high" },
"components": [{ "id": "c1", "type": "DHT11", "confidence": "high" }],
"connections": [{ "from_pin": "GPIO4", "to_component_id": "c1", "to_component_pin": "DATA", "confidence": "high" }],
"audit": [{ "severity": "WARNING", "issue": "No pull-up resistor on DHT11 data line", "explanation": "..." }],
"code": "// ESP32 + DHT11 code...",
"code_language": "cpp",
"verified": true,
"corrections_made": []
}Error (502):
{ "error": "Human-readable error message" }| Layer | Technology |
|---|---|
| AI | Google Gemini API (gemini-2.5-flash + gemini-2.5-pro fallback) |
| Backend | Node.js + Express |
| File Upload | multer (in-memory) |
| Gemini SDK | @google/genai (official, latest) |
| Frontend | Plain HTML/CSS/Vanilla JS |
| Syntax Highlight | Prism.js |
| Secrets | dotenv |
Best results come from:
- Well-lit breadboard photos with visible component labels
- Clear hand-drawn schematics with labeled pins
- Arduino/ESP32 development board photos with obvious silkscreen
- ✅ No user accounts or database — fully stateless
- ✅ Gemini API key stays server-side only
- ✅ Graceful error handling (bad photo, API timeout, malformed JSON)
- ✅ Self-verifying 3-stage pipeline with structured JSON output mode