smemon819/circuit-copilot
0
⚡ Circuit Copilot v4.2
AI-powered circuit design assistant. Describe circuits in plain English → get schematics, simulations, BOM, Arduino code, and more instantly.
🚀 Features
Core
- Voice-to-Circuit: Speak your circuit description naturally (hands-free Iron Man mode).
- Schematic Generation: Create interactive SVG schematics from natural language prompts.
- Vision Support: Upload an image of a circuit — AI identifies and digitizes it.
- Interactive Simulations: DC operating point analysis with animated current flow.
- Hardware Bridge (WebSerial): Flash generated code to Arduino directly from the browser + live Serial Monitor.
- AI Breadboard Router: Generate and visualize realistic breadboard wiring layouts.
- Arduino Code & BOM: Instantly generate microcontroller code and Bill of Materials.
- Learn & Quiz Modes: Electronics concepts + interactive quizzes with three difficulty levels.
- Template Library: Browse and load battle-tested circuit templates.
- Calculators: Ohm's Law, LED Resistor, and 555 Timer calculators built-in.
- PDF Export: Full circuit report — schematic, BOM, simulation, Arduino code — in one click.
v4.1 New — What's Improved
🛠️ Architecture
- Backend: FastAPI + Groq LLaMA 3.3 70B Specdec
- Frontend: Single-file HTML/CSS/JS with SVG schematic renderer
- Database: Supabase PostgreSQL (Community Gallery + saved circuits)
- Rate Limiting:
slowapiwith custom JSON 429 responses includingretry_after - Realtime: WebSocket-based collaboration per circuit session
- PWA: Service worker, offline support, installable
⚙️ Environment Variables
Set these in Space Secrets or your .env file before running:
GROQ_API_KEY: Required for AI content generation.SUPABASE_URL: Required for saving circuits and the Community Gallery.SUPABASE_KEY: Required for database authentication.
(If Supabase credentials are not provided, the application gracefully degrades and disables cloud-saving features without crashing.)
🖥️ Running Locally
pip install -r requirements.txt
export GROQ_API_KEY=your_key_here
uvicorn app:app --reload --port 7860Then open http://localhost:7860.
