Add shared core library and architecture plans (Phase 1)
Some checks failed
Validate / Hassfest (push) Has been cancelled

Extract HA-independent logic from the integration into packages/core/
as a standalone Python library (immich-watcher-core). This is the first
phase of restructuring the project to support a standalone web app
alongside the existing HAOS integration.

Core library modules:
- models: SharedLinkInfo, AssetInfo, AlbumData, AlbumChange dataclasses
- immich_client: Async Immich API client (aiohttp, session-injected)
- change_detector: Pure function for album change detection
- asset_utils: Filtering, sorting, URL building utilities
- telegram/client: Full Telegram Bot API (text, photo, video, media groups)
- telegram/cache: File ID cache with pluggable storage backend
- telegram/media: Media size checks, URL extraction, group splitting
- notifications/queue: Persistent notification queue
- storage: StorageBackend protocol + JSON file implementation

All modules have zero Home Assistant imports. 50 unit tests passing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-19 12:40:08 +03:00
parent 71b79cd919
commit d0783d0b6a
23 changed files with 3740 additions and 0 deletions

22
plans/README.md Normal file
View File

@@ -0,0 +1,22 @@
# Plans
This folder contains the primary architecture plan and phase-specific subplans for the Immich Watcher project restructuring.
## Structure
- `primary-plan.md` -- Master plan with architecture decisions and phase overview
- `phase-1-core-library.md` -- Extract shared core library
- `phase-2-haos-refactor.md` -- Wire core into HAOS integration
- `phase-3-server-backend.md` -- Build standalone FastAPI server
- `phase-4-frontend.md` -- Build SvelteKit web UI
- `phase-5-haos-server-sync.md` -- Optional HAOS-Server integration
## Tracking
Each plan uses checkbox tracking:
- `[ ]` -- Not started
- `[x]` -- Completed
- `[~]` -- In progress
- `[-]` -- Skipped/deferred
Phase subplans are created when work on that phase begins (not all upfront).