Commit Graph

9 Commits

Author SHA1 Message Date
fe59b68c37 theme config, layout preview, container alignment
Server: ThemeConfig entity + CRUD (GET/PUT /theme), SQLite persistence,
ThemeUpdate broadcast to ESP32 on save and initial connect.
Client: render engine uses theme colors, full-screen redraw on theme change.
SPA: theme page with color pickers + presets, layout preview with TS port
of layout engine, justify/align controls on containers.
DisplayHint refactored to struct (kind + h_align + v_align).
2026-06-19 03:26:18 +02:00
81a4167382 new rendering engine 2026-06-19 02:55:33 +02:00
adda731dc6 add auth system: users, login, JWT, protected routes
Domain: User entity, AuthPort/PasswordHashPort/SecretStore ports.
Adapters: auth (argon2 hashing, JWT tokens), secret-store (env-based),
config-sqlite user repository, http-api auth routes + extractors.
Application: auth_service. SPA: login page, auth client, protected router.
2026-06-19 01:39:42 +02:00
1d7b5324d6 per-source polling, initial client state, webhook, preview, client tracking
- per-source poll intervals: spawn task per source with own interval,
  manager re-checks sources every 30s for add/remove
- initial screen update on TCP connect: send layout + widget states
- client tracking: ClientRegistry port, GET /api/clients, dashboard list
- webhook adapter: POST /api/webhook/{source_id} feeds data into projection
- widget preview: GET /api/widgets/{id}/preview returns current state
- serve SPA from Axum: ServeDir + index.html fallback via KFRAME_SPA_DIR
- layout builder delete confirmation with AlertDialog
- form validation: required fields disable save button
- guide page at /guide
- fix architecture: ClientDto to api-types, ClientRegistry + WidgetStateReader
  ports in domain, DataProjection has internal Mutex, no adapter cross-deps
- ESP32: full screen clear on layout change (stale pixel fix)
2026-06-19 00:42:31 +02:00
26ebfad3a2 add SPA config UI, wire media/rss adapters, event-driven layout push
- React SPA: dashboard, data sources CRUD, widgets CRUD, layout builder,
  presets. TanStack Router + Query, shadcn/ui, Vite proxy to :3000
- wire media + rss adapters into polling loop, remove xtb source type
- media adapter: read username/password from headers, proper subsonic auth
- event handler: subscribe to LayoutChanged, push screen update to clients
- fix clippy warnings across workspace (Default impls, collapsible ifs,
  redundant closures, is_none_or, unused imports)
2026-06-19 00:12:42 +02:00
15b75d860c rewire bootstrap with SQLite, HTTP API, and real polling
bootstrap: SQLite config, HTTP API on :3000, TCP on :2699, poll loops.
http-api: added serve() so bootstrap doesn't depend on axum directly.
polling: reads data sources from config, polls via http-json adapter,
pushes changed widgets to connected clients.

configure via API, e.g.:
  curl -X POST localhost:3000/api/data-sources -H 'Content-Type: application/json' -d '{...}'
  curl -X PUT localhost:3000/api/layout -H 'Content-Type: application/json' -d '{...}'
2026-06-18 23:12:05 +02:00
af47e3939c extract api-types crate, adopt thiserror for all errors
api-types: standalone crate with DTOs (widget, data source, layout, preset)
extracted from http-api. Shared between http-api and future SPA.

thiserror: replaced all manual Display impls with derive macros across
8 crates (config-sqlite, config-memory, tcp-server, tcp-client,
http-json, rss, media, application).
2026-06-18 23:01:31 +02:00
6e77236936 refactor adapters into modular file structure
config-sqlite: split into repository/ (per entity) + serialization/ (per type) + error.rs
http-api: split into dto/ (per resource) + routes/ (per resource)
tcp-server: split into broadcaster, event_bus, server, error
rss: split parser from adapter, external tests
media: split error, external tests
2026-06-18 22:57:58 +02:00
e398c240a0 add config-sqlite and http-api adapters
SQLite config store: full ConfigRepository impl with JSON serialization
for mappings, layouts, data source configs. 12 integration tests.

HTTP API: Axum REST endpoints for widgets, data sources, layout, presets.
6 integration tests using tower::oneshot.

Port traits updated to return Send futures for Axum compatibility.
2026-06-18 22:47:38 +02:00