Commit Graph

4 Commits

Author SHA1 Message Date
2b913ba049 style: format backend 2026-01-22 00:57:11 +01:00
a7a7e7ef18 test(domain): write failing tests for Relay aggregate
Created test suite for Relay entity covering construction, state toggling,
and explicit state control methods. Tests intentionally fail as Relay
struct is not yet implemented.

Tests cover:
- Relay::new() with id, state, and optional label
- toggle() flipping state between On/Off
- turn_on() setting state to On
- turn_off() setting state to Off

TDD phase: RED - Tests written, implementation pending (T022)

Ref: T021 (specs/001-modbus-relay-control/tasks.md)
2026-01-22 00:57:11 +01:00
0ec7fdf11b feat(domain): implement RelayId newtype with validation
Implement smart constructor that validates relay IDs are within valid 
range (1-8 for 8-channel relay controller). Add accessor method as_u8() 
for safe access to inner value. Add comprehensive documentation to satisfy 
clippy requirements.

TDD green phase: Tests from T017 now pass.

Ref: T018 (specs/001-modbus-relay-control/tasks.md)
2026-01-22 00:57:11 +01:00
837a49fc58 refactor: reorganize project into monorepo with frontend scaffolding
Convert project from single backend to monorepo structure with separate
frontend (Vue 3 + TypeScript + Vite) and backend directories. Updates
all configuration files and build system to support both workspaces.

Ref: T007 (specs/001-modbus-relay-control)
2026-01-22 00:57:10 +01:00