Commit Graph

17 Commits

Author SHA1 Message Date
c6f82090d2 feat: auth hardening + codebase quality sweep
Refresh tokens: RefreshToken entity, PostgresRefreshTokenRepository,
login returns refresh token, POST /auth/refresh (rotation), POST /auth/logout,
JWT expiry 24h→1h, configurable via with_expiry().

Route protection: require_auth middleware on protected routes,
public routes split (register, login, refresh, sharing/access).

Authorization: caller_id added to ReadAssetFileQuery, ReadDerivativeQuery,
GetStackQuery, DeleteStackCommand with ownership checks. Admin-only gates
on processing, storage, sidecar, duplicates handlers.

Quality fixes: visibility filtering bypass in search(), unwrap panics in
date parsing, DRY auth header parsing, centralized parsers module,
email validation via email_address crate, value objects (Username, MimeType,
RelativePath), domain events (UserCreated, UserDeleted, AlbumCreated,
TagCreated, DuplicateDetected), postgres error mapping for constraint
violations, OptionExt::or_not_found helper, in_memory_repo! macro,
GetStackQuery moved to queries, album add_entry 200→201.
2026-05-31 22:26:02 +02:00
ef64e86439 feat: serve derivative files via GET /assets/{id}/derivatives/{profile}
- ReadDerivativeHandler queries DerivativeRepository + FileStoragePort
- Profile URL param: thumbnail, thumbnail_large, web_optimized, video_sd
- Immutable cache headers (derivatives don't change once generated)
- Wired into bootstrap catalog service builder
2026-05-31 21:10:58 +02:00
e11a1a828b refactor: use workspace deps for all internal crates, no relative paths 2026-05-31 20:48:09 +02:00
b5cda3afeb feat: add VisibilityFilteredAssetRepository decorator for automatic access control on asset queries 2026-05-31 19:06:49 +02:00
a6b86c23d8 feat: wire remaining handlers — tag, quota, register asset, sidecar, processing
14 new endpoints: POST tags, GET quota, POST register, 6 sidecar, 7 processing.
DTOs, AppState groups, LogSidecarWriter, full bootstrap wiring.
2026-05-31 11:04:22 +02:00
3399e25441 feat: add sharing endpoints — share, link, revoke, public access 2026-05-31 10:50:28 +02:00
2d9dd2c2d0 refactor: clean up presentation layer — AppState grouping, multipart extractor, thin handlers 2026-05-31 06:14:19 +02:00
34b231a8f6 refactor: move business logic out of presentation — ReadAssetFile, checksum, auth checks, MetadataValue conversions 2026-05-31 06:10:07 +02:00
0f003a3bd6 feat: add file serving endpoint GET /assets/:id/file 2026-05-31 05:59:19 +02:00
3a18fd1d3f fix: axum 0.8 route syntax, smoke test verified 2026-05-31 05:55:47 +02:00
9aba393fde feat: vertical slice — migrations, postgres adapters, presentation handlers, bootstrap wiring 2026-05-31 05:52:42 +02:00
201eff717d feat: add presentation layer + bootstrap wiring for vertical slice 2026-05-31 05:51:09 +02:00
c2ebca0da0 style: cargo fmt --all 2026-05-31 05:31:42 +02:00
fa36bb8c0e refactor: restructure application to CQRS, update api-types + presentation
- application: replace flat use_cases/ with identity/{commands,queries}/ and organization/commands/
- each use case now split into Command/Query struct + Handler struct
- api-types: add username to RegisterRequest/UserResponse, add CreateAlbumRequest/AlbumResponse
- presentation: update state, handlers, factory to use new handler types
- tests: restructured to match CQRS module layout, added get_profile tests
2026-05-31 05:00:34 +02:00
aa432e6594 domain: add domain errors, events, and services module scaffold 2026-05-31 03:16:40 +02:00
3571c94bec domain: add cross-cutting value objects (SystemId, DateTimeStamp, Checksum, StructuredData) 2026-05-31 03:16:28 +02:00
f9cb142c3b init: scaffold from k-template with postgres + worker 2026-05-31 03:08:38 +02:00