updated claude.md to new progress

This commit is contained in:
2026-06-25 17:17:30 +02:00
parent 40cbe7103f
commit 17e15279c5
+28 -12
View File
@@ -43,40 +43,56 @@ Frontend (optional, defaults to `/api`):
### Backend (`backend/src/main/java/com/vaessl/app/`) ### Backend (`backend/src/main/java/com/vaessl/app/`)
Server context path is `/api`. Main endpoints: Package-by-feature layout. Server context path is `/api`. Main endpoints:
- `POST /api/login` — authenticates a service, stores connection ID in session - `POST /api/login` — authenticates a service, stores connection ID in session
- `GET /api/connections/status` — lists connected services for the current session - `GET /api/connections/status` — lists connected services for the current session
- `DELETE /api/connections/{serviceType}` — removes a service from the session; invalidates the session if no connections remain - `DELETE /api/connections/{serviceType}` — removes a service from the session; invalidates the session if no connections remain
- `POST /api/search` — paged search against the requested service; returns 401 if no active session
Four main modules: Five packages:
**`shared/`** — cross-cutting types used by more than one feature package
- `ServiceType` (enum): identifies each integrated app (e.g. `HOMEBOX`); used in both `connection/` and `search/`
- `ServiceProvider` (interface): base for `ConnectionProvider` and `SearchProvider`; declares `getServiceType()`
- `Endpoint` (enum): API path constants for all external service calls
- `SessionKeys`: builds session attribute names of the form `{SERVICE_TYPE}_CONNECTION_ID`
**`config/`** **`config/`**
- `CorsConfig`: env-driven allowed origins (`FRONTEND_LOCAL_URL`, `FRONTEND_PUBLIC_URL`); `allowCredentials(true)` is required for session cookies to work cross-origin - `CorsConfig`: env-driven allowed origins (`FRONTEND_LOCAL_URL`, `FRONTEND_PUBLIC_URL`); `allowCredentials(true)` is required for session cookies to work cross-origin
- `SessionConfig`: JDBC-backed Spring Session with a persistent cookie (`SameSite=Lax`, `HttpOnly`) - `SessionConfig`: JDBC-backed Spring Session with a persistent cookie (`SameSite=Lax`, `HttpOnly`)
**`connection/`** — core business logic **`connection/`** — connecting to and persisting service credentials
- `ConnectionProvider` interface: each integrated app (Homebox, WikiJS) implements `login()` and declares its `ServiceType` - `ConnectionProvider` interface: extends `ServiceProvider`; each integrated app implements `login()` and credential checking
- `ConnectionService`: auto-discovers providers via Spring injection, dispatches login by `ServiceType` - `ConnectionService`: auto-discovers providers via Spring injection, dispatches login by `ServiceType`
- `ConnectionController`: stores `{serviceType}_CONNECTION_ID` in `HttpSession` after login; reads session attributes to build status responses - `ConnectionController`: stores `{serviceType}_CONNECTION_ID` in `HttpSession` after login; reads session attributes to build status responses
- Entity (`Connection`) uses **Single Table Inheritance** — one `connections` table with app-specific nullable columns - Entity (`ConnectionEntity`) uses **Single Table Inheritance** — one `connections` table with app-specific nullable columns
- `HomeboxConnectionProvider` / `HomeboxEntity`: Homebox-specific implementation
**`dto/`** — `ConnectionRequest`, `LoginResult`, `AuthResponse`, `ConnectionStatusResponse` **`search/`** — querying connected services
- `SearchProvider` interface: extends `ServiceProvider`; each integrated app implements `getSearchResults()`
- `SearchService`: auto-discovers providers via Spring injection, dispatches by `ServiceType`
- `SearchController`: guards with session check before delegating to `SearchService`
- `HomeboxSearchProvider`: Homebox-specific search implementation using bearer token from session
**`exception/`** — `GlobalExceptionHandler` via `@ControllerAdvice` **`exception/`** — `GlobalExceptionHandler` via `@ControllerAdvice`
### Frontend (`frontend/src/`) ### Frontend (`frontend/src/`)
React 19 + TypeScript + SCSS, Vite 8 build. React 19 + TypeScript + SCSS, Vite 6 build. Package-by-feature under `components/`.
- `api/client.ts` — typed `apiFetch` wrapper; always sends `credentials: 'include'` for session cookies; base URL from `VITE_API_URL` (defaults to `/api`) - `api/client.ts` — typed `apiFetch` wrapper; always sends `credentials: 'include'` for session cookies; base URL from `VITE_API_URL` (defaults to `/api`)
- `api/connections.ts` — connection-specific API calls - `api/connections.ts` — connection-specific API calls (`getStatuses`, `login`, `logout`)
- `types/connection.ts` — shared types: `LoginRequest`, `AuthResponse`, `ConnectionStatus` - `api/searches.ts` — search API call (`search`)
- `components/Dashboard` — main view listing connected services - `types/connection.ts``ServiceType`, `LoginRequest`, `AuthResponse`, `ConnectionStatus`
- `components/ConnectModal` — login form for adding a service connection - `types/search.ts``SearchRequest`, `SearchResponse`, `PagedSearchResponse`
- `components/ServiceCard` — per-service status display - `components/connections/``Dashboard`, `ConnectModal`, `ServiceCard` (connection management UI)
- `components/search/SearchModal` — search dialog; posts to `/api/search` and renders paged results
- `components/ui/` — shared UI primitives (`ActionButton`, `Modal`)
### Data & AI ### Data & AI