| 01-foundation |
01 |
backend |
| python |
| fastapi |
| pydantic |
| uvicorn |
| websocket |
| nginx |
| terminal-ui |
|
|
| Python package lightsync/ with all backend modules |
| Pydantic v2 DeviceConfig and ShowModel with full schema |
| BaseDevice ABC + SK6812/WS2801 concrete implementations |
| DeviceRegistry with JSON persistence (devices.json) |
| ShowStore with JSON save/load (shows/ directory) |
| FastAPI app with lifespan, REST stubs, WebSocket stub |
| Terminal-aesthetic frontend shell (DAW skeleton) |
| python -m lightsync entry point serving on port 8000 |
|
| phase-01-02 |
| phase-02 |
| phase-03 |
| phase-04 |
| phase-05 |
| phase-06 |
| phase-07 |
|
| added |
patterns |
| FastAPI 0.115+ — web framework, REST, WebSocket, StaticFiles |
| uvicorn[standard] 0.34+ — ASGI server with WebSocket support |
| Pydantic v2 — model validation and JSON serialization |
| aiofiles 24+ — async file I/O for show JSON and device registry |
| python-dotenv — HOST/PORT config from .env file |
| structlog — structured logging |
| hatchling — build backend for pyproject.toml |
|
| lifespan context manager for startup/shutdown (replaces deprecated @app.on_event) |
| Module-level registry/show_store refs in main.py — accessed via `import lightsync.main as state` |
| StaticFiles LAST — API routes registered before mount to prevent catch-all interception |
| Pydantic v2 APIs: model_dump_json(), model_validate_json(), model_validate() — never v1 .json()/.parse_obj() |
| BaseDevice ABC + _DEVICE_CLASSES dict — adding new strip type = new file + one dict entry (INF-02) |
| pathlib.Path throughout — cross-platform safe file paths |
| aiofiles for all file I/O in async contexts — non-blocking |
|
|
| created |
modified |
| pyproject.toml |
| .env |
| .gitignore |
| lightsync/__init__.py |
| lightsync/__main__.py |
| lightsync/main.py |
| lightsync/models/__init__.py |
| lightsync/models/device.py |
| lightsync/models/show.py |
| lightsync/devices/__init__.py |
| lightsync/devices/base.py |
| lightsync/devices/sk6812.py |
| lightsync/devices/ws2801.py |
| lightsync/devices/registry.py |
| lightsync/store/__init__.py |
| lightsync/store/show_store.py |
| lightsync/api/__init__.py |
| lightsync/api/devices.py |
| lightsync/api/shows.py |
| lightsync/api/ws.py |
| lightsync/frontend/index.html |
| lightsync/frontend/style.css |
| lightsync/frontend/app.js |
|
|
|
| aiofiles for all JSON file I/O — keeps async handlers non-blocking per research guidance |
| Module-level state in main.py for registry/show_store — acceptable for Phase 1, Phase 2 migrates to Depends() |
| StaticFiles mounted last — required to prevent catch-all interception of /api/* routes |
| encode_animation_cmd stubs return b'' — Phase 3 implements real UDP animation command encoding |
| .gitignore excludes devices.json and shows/ — these are runtime data, not source |
|
| lifespan context manager for app startup/shutdown |
| BaseDevice ABC + _DEVICE_CLASSES registry dict for extensible device type system |
| Pydantic v2 serialization patterns (model_dump_json, model_validate_json) |
| aiofiles for async file I/O in FastAPI route handlers |
| CSS custom properties for terminal aesthetic — all colors via :root vars |
|
| INF-01 |
| INF-02 |
| DEV-01 |
| DEV-02 |
| SHW-01 |
| SHW-02 |
|
4min |
2026-04-05 |