diff --git a/frontend/src/pages/DocsPage.tsx b/frontend/src/pages/DocsPage.tsx index 1bcd338..85b1709 100644 --- a/frontend/src/pages/DocsPage.tsx +++ b/frontend/src/pages/DocsPage.tsx @@ -183,40 +183,40 @@ const GettingStartedSection: React.FC = () => (
Run a single Docker command to start a fully local instance:
-{`docker run -d \\
+ {`docker run -d \\
--name velxio \\
-p 3080:80 \\
-v $(pwd)/data:/app/data \\
- ghcr.io/davidmonterocrespo24/velxio:master`}
+ ghcr.io/davidmonterocrespo24/velxio:master`}
Then open http://localhost:3080 in your browser.
Prerequisites: Node.js 18+, Python 3.12+, arduino-cli
{`git clone https://github.com/davidmonterocrespo24/velxio.git
-cd velxio`}
+ {`cd backend
+ {`cd backend
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
-uvicorn app.main:app --reload --port 8001`}
+uvicorn app.main:app --reload --port 8001`}
{`cd frontend
+ {`cd frontend
npm install
-npm run dev`}
+npm run dev`}
Open http://localhost:5173.
{`arduino-cli core update-index
+ {`arduino-cli core update-index
arduino-cli core install arduino:avr
# For Raspberry Pi Pico support:
arduino-cli config add board_manager.additional_urls \\
https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
-arduino-cli core install rp2040:rp2040`}
+arduino-cli core install rp2040:rp2040`}
{`void setup() {
+ {`void setup() {
pinMode(13, OUTPUT);
}
@@ -233,7 +233,7 @@ void loop() {
delay(500);
digitalWrite(13, LOW);
delay(500);
-}`}
+}`}
arduino-cli and returns a .hex file.{`User Code (Monaco Editor)
+ {`User Code (Monaco Editor)
│
▼
Zustand Store (useEditorStore)
@@ -296,7 +296,7 @@ const EmulatorSection: React.FC = () => (
Port listeners (PORTB / PORTC / PORTD)
│
▼
- PinManager ──► Component state ──► React re-renders`}
+ PinManager ──► Component state ──► React re-renders`}
@@ -306,8 +306,8 @@ const EmulatorSection: React.FC = () => (
Each animation frame executes approximately 267,000 CPU cycles (16 MHz ÷ 60 FPS):
-{`avrInstruction(cpu); // decode and execute one AVR instruction
-cpu.tick(); // advance peripheral timers and counters`}
+ {`import { CPU, avrInstruction, AVRTimer, AVRUSART, AVRADC, AVRIOPort } from 'avr8js';
+ {`import { CPU, avrInstruction, AVRTimer, AVRUSART, AVRADC, AVRIOPort } from 'avr8js';
const cpu = new CPU(programMemory); // ATmega328p at 16 MHz
const portB = new AVRIOPort(cpu, portBConfig); // digital pins 8-13
@@ -751,7 +751,7 @@ function runFrame() {
cpu.tick(); // advance timers + peripherals
}
requestAnimationFrame(runFrame);
-}`}
+}`}
{`cd backend
-python mcp_server.py`}
+ Claude Desktop config (~/.claude/claude_desktop_config.json):
{`{
+ {`{
"mcpServers": {
"velxio": {
"command": "python",
"args": ["/absolute/path/to/velxio/backend/mcp_server.py"]
}
}
-}`}
+}`}
{`cd backend
-python mcp_sse_server.py --port 8002`}
+ MCP client config:
-{`{
+ {`{
"mcpServers": {
"velxio": { "url": "http://localhost:8002/sse" }
}
-}`}
+}`}
Velxio circuits are plain JSON objects:
-{`{
+ {`{
"board_fqbn": "arduino:avr:uno",
"version": 1,
"components": [
@@ -832,7 +832,7 @@ python mcp_sse_server.py --port 8002`}
{ "from_part": "uno", "from_pin": "13",
"to_part": "led1", "to_pin": "A", "color": "green" }
]
-}`}
+}`}
{`// Step 1 — Create a circuit
+ {`// Step 1 — Create a circuit
{
"tool": "create_circuit",
"arguments": {
@@ -892,10 +892,10 @@ python mcp_sse_server.py --port 8002`}
],
"board": "arduino:avr:uno"
}
-}`}
+}`}
{`cd backend
+ {`cd backend
pip install -r requirements.txt
# Ensure arduino-cli is installed
@@ -904,7 +904,7 @@ arduino-cli core update-index
arduino-cli core install arduino:avr
# Run tests
-python -m pytest tests/test_mcp_tools.py -v`}
+python -m pytest tests/test_mcp_tools.py -v`}
{`/home/pi/
+ {`/home/pi/
├── script.py ← user's main Python script
└── lib/
- └── helper.py ← optional helper library`}
+ └── helper.py ← optional helper library`}