spicebook/docker-compose.dev.yml
Ryan Malloy 8abd7719bf Initial SpiceBook MVP: notebook interface for circuit simulation
Phase 1 implementation with ngspice backend and Astro/React frontend:

Backend (FastAPI):
- ngspice subprocess engine with custom .raw file parser
- Notebook CRUD with .spicebook JSON format (filesystem storage)
- Simulation endpoints (standalone + cell-in-notebook)
- SVG waveform export endpoint
- 18 REST API routes, 5 passing tests

Frontend (Astro 5 + React 19):
- Notebook editor as React island with Zustand state management
- CodeMirror 6 with custom SPICE language mode (syntax highlighting
  for dot commands, components, engineering notation, comments)
- uPlot waveform viewer with transient and AC/Bode plot modes
- Markdown cells with edit/preview toggle
- Notebook list with card grid UI
- Dark theme, Tailwind CSS 4, Lucide icons

Infrastructure:
- Docker Compose with dev/prod targets
- Caddy-based frontend prod serving
- 3 example notebooks (RC filter, voltage divider, CE amplifier)
2026-02-13 01:44:38 -07:00

27 lines
737 B
YAML

services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
target: dev
ports:
- "${BACKEND_PORT:-8099}:8000"
volumes:
- ./backend/src:/app/src
- ./notebooks:/app/notebooks
# Mount mcltspice for live development
- ../mcp-ltspice/src/mcltspice:/app/mcltspice-lib:ro
command: ["uv", "run", "uvicorn", "spicebook.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
target: dev
ports:
- "${FRONTEND_PORT:-4321}:4321"
volumes:
- ./frontend/src:/app/src
- ./frontend/public:/app/public
command: ["npm", "run", "dev", "--", "--host", "0.0.0.0"]