Prioritized for 18-hour sprint (due 11:00 AM tomorrow) IBM Skills Build Hackathon — watsonx AI integration is MANDATORY
- File:
circuit3d/js/components.js - Issue: Blue/white rectangular overlays obscure the +/− polarity symbols
- Fix: Simplify geometry on battery mesh, make terminal markings high-contrast
- Status: TODO
This is the core hackathon requirement. Must be visibly working by ~10 PM.
- File:
circuit3d/js/app.js(or newcircuit3d/js/state-export.js) - Expose as
App.exportState()on the window namespace - Output a JSON snapshot of current board state:
{
"components": [
{ "type": "LED", "id": "led_0", "holes": ["e14", "e15"], "color": "red" },
{ "type": "RESISTOR", "id": "res_0", "holes": ["a14", "a18"], "value": "330Ω" }
],
"wires": [
{ "from": "tp_14", "to": "a14" },
{ "from": "bn_15", "to": "e15" }
]
}- New file:
backend/app.py - Endpoint:
POST /api/ask - Request body:
{ "state": <boardJSON>, "message": <userMessage> } - Calls IBM watsonx
ibm-granite-13b-instruct-v2(ormeta-llama/llama-3-70b-instruct) - System prompt instructs the model to act as a circuit tutor, give "next best step" guidance
- Returns:
{ "reply": "..." } - Dependencies:
flask,ibm_watsonx_ai
- Files:
circuit3d/index.html+ newcircuit3d/css/chat.css - Floating panel (bottom-right), collapsible
- Input field + send button
- Calls
POST /api/askwith currentApp.exportState()+ user message - Renders AI reply in a scrollable message list
- "Analyze my circuit" button auto-sends state without a message
- System prompt in
backend/app.pyshould include:- Role: "You are Sparky, an electronics tutor helping beginners build circuits on a breadboard"
- Context: injected board state JSON
- Behavior: suggest next step, identify errors, explain component roles
- Keep replies concise (2–4 sentences max for chat UX)
- File:
circuit3d/js/components.js - Buzzer: cylinder body, ~2×HS wide, 1.5×HS tall, dark gray, 2-hole footprint
- Push Button: square body, 4-hole footprint (DIP style), off-white cap
- Register in component palette in
circuit3d/js/app.js - Status: TODO
- Minimum viable: export/import JSON file (no backend required)
App.exportState()→ JSON.stringify → download as.sparkyfile- Load: file input → JSON.parse → rebuild scene
- Stretch: persist to Supabase or localStorage
- Files:
circuit3d/js/app.js,circuit3d/index.html
- New file:
index.html(project root) - Sections: hero tagline, feature highlights, "Launch App" CTA, IBM watsonx badge
- Keep simple — one scrollable page, no frameworks
- Links to
circuit3d/index.html
- New file:
dashboard.html - Shows list of saved circuits (from localStorage or Supabase)
- Simple cards: name, thumbnail (canvas screenshot), open/delete buttons
- Skip community gallery for now
- When loading a circuit, offer "Challenge Mode"
- Hides wires/components, user must reconstruct
- Hint: reveal one element at a time
- Full reveal button as fallback
- Complex — skip unless Phases 1+2 are fully done
- 3-pin DIP footprint (Base, Collector, Emitter)
- NPN symbol on face
- Skip unless time is comfortable
- Open landing page — explain Sparky
- Launch 3D circuit designer
- Place LED + resistor + battery, wire them up
- Open Sparky AI chat → ask "what's wrong with my circuit?" or "what should I do next?"
- Show watsonx AI response in real time
- Save circuit → show save/load flow
- Close on IBM watsonx branding moment
The money shot for judges: the AI analyzing the live board state.
- Frontend: Vanilla JS/HTML/CSS, Three.js r128, no build tools
- Backend: Python Flask +
ibm_watsonx_aiSDK - AI: IBM watsonx (granite or llama model)
- No frameworks, no npm, keep it simple
circuit3d/
index.html
js/
scene.js ← Three.js scene setup
breadboard.js ← Grid, holes, board mesh
components.js ← Component meshes + placement
interaction.js ← Mouse events, drag, wire mode
simulate.js ← Circuit simulation logic
app.js ← Boot, state, mode management
css/
backend/ ← TO BE CREATED for watsonx Flask API
index.html ← TO BE CREATED landing page