Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,19 @@ The distrobox has these build deps pre-installed:

**Need distrobox:** pytest, mypy, `uv sync`, `uv pip install`, running `scripts/matrix_cli.py` with venv deps, any C compilation

**Do NOT need distrobox:** `git`, `gh`, file reads/writes, `grep`, `ls`, basic shell, `python3 -c "import ast; ..."` (syntax checks)
**Do NOT need distrobox:** `git`, `gh`, file reads/writes, `grep`, `ls`, basic shell, `python3 -c "import ast; ..."` (syntax checks), Angular CLI (`ng build`, `ng serve`, `ng test`, `ng lint`)

### Node.js / Angular CLI

Node.js v24+ and npm are available on both the host and inside the distrobox via NVM (`~/.nvm/`). Angular commands run directly on the host — no distrobox needed.

```bash
# Angular commands run from frontend/ directory (no distrobox)
cd frontend && npx ng build # production build → frontend/dist/ledmatrix/
cd frontend && npx ng serve # dev server at http://localhost:4200
cd frontend && npx ng test # unit tests
cd frontend && npx ng lint # ESLint
```

## Commands

Expand All @@ -53,6 +65,22 @@ python3 src/api/start.py
# Accessible at http://localhost:5000
```

### Angular Frontend Development
```bash
# Dev server with API proxy (run alongside FastAPI)
cd frontend && npx ng serve # http://localhost:4200, proxies /api/v3 → :5000

# Production build
cd frontend && npx ng build # output: frontend/dist/ledmatrix/browser/

# Both servers together (convenience script)
bash scripts/dev/run_frontend_dev.sh # starts FastAPI + ng serve

# Lint and test
cd frontend && npx ng lint
cd frontend && npx ng test
```

### Testing a Single Plugin (no full display loop)
```bash
python3 scripts/render_plugin.py <plugin-id>
Expand Down Expand Up @@ -104,7 +132,7 @@ Plugins live in `plugins/<plugin-id>/` and inherit from `BasePlugin` (`src/plugi
```

### Web Interface
FastAPI app at `src/api/main.py` with routers in `src/api/routers/` (plugins, config, system, store, fonts, wifi, assets, starlark, streams). SSE streams: `/api/v3/stream/stats`, `/api/v3/stream/display`, `/api/v3/stream/logs`. Static files and HTMX templates remain in `web_interface/static/` and `web_interface/templates/` (pending Phase 3 Angular migration).
FastAPI app at `src/api/main.py` with routers in `src/api/routers/` (plugins, config, system, store, fonts, wifi, assets, starlark, streams). SSE streams: `/api/v3/stream/stats`, `/api/v3/stream/display`, `/api/v3/stream/logs`. Static files and HTMX templates remain in `web_interface/static/` and `web_interface/templates/` (being replaced by Angular in Phase 3). Angular 21 SPA in `frontend/` — when built (`frontend/dist/ledmatrix/browser/`), FastAPI serves it via a catch-all route at `/`.

### Config System
- `config/config.json` — all user settings (gitignored, created from `config/config.template.json`)
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ PREFIX ?= /usr/local
BINDIR := $(PREFIX)/bin
CLI_SRC := $(CURDIR)/scripts/matrix_cli.py

.PHONY: install-matrix remove-matrix help
.PHONY: install-matrix remove-matrix frontend-dev help

help:
@echo "Usage:"
@echo " sudo make install-matrix Install the matrix CLI to $(BINDIR)/matrix"
@echo " sudo make remove-matrix Remove the matrix CLI from $(BINDIR)/matrix"
@echo " make frontend-dev Start FastAPI + Angular dev servers"

install-matrix:
@echo "Installing matrix CLI -> $(BINDIR)/matrix"
Expand All @@ -22,3 +23,6 @@ remove-matrix:
@echo "Removing matrix CLI from $(BINDIR)/matrix"
rm -f "$(BINDIR)/matrix"
@echo "Done. matrix CLI has been removed."

frontend-dev:
bash scripts/dev/run_frontend_dev.sh
6 changes: 3 additions & 3 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
This document tracks planned improvements, features, and large-scale refactors for the LEDMatrix project.
Items are organized into versioned phases. Each phase delivers a cohesive set of changes before the next begins.

Current version: **v1.1.0**
Current version: **v2.0.0**

---

## Phase 1 — Foundation `v1.1.0`
## Phase 1 — Foundation `v1.1.0` COMPLETE

> Python modernization, developer tooling, and CI infrastructure. No breaking changes to public APIs or behavior.

Expand Down Expand Up @@ -44,7 +44,7 @@ Current version: **v1.1.0**

---

## Phase 2 — Backend Modernization `v2.0.0`
## Phase 2 — Backend Modernization `v2.0.0` COMPLETE

> Full Flask → FastAPI rewrite. Breaking change: API response formats and endpoint paths may change.

Expand Down
Loading
Loading