Skip to content

Refactor shared helpers and split server into route modules#42

Merged
AusafMo merged 2 commits into
mainfrom
phase1-refactor
Mar 26, 2026
Merged

Refactor shared helpers and split server into route modules#42
AusafMo merged 2 commits into
mainfrom
phase1-refactor

Conversation

@AusafMo

@AusafMo AusafMo commented Mar 26, 2026

Copy link
Copy Markdown
Owner

No description provided.

AusafMo added 2 commits March 27, 2026 02:15
- Add UnionFind class, load_image_index(), is_image_file() to utils.py
- Add 9 face recognition constants to constants.py
- Replace 6 inline index-loading blocks across server/similarity/embeddings
- Replace inline union-find in face clustering with UnionFind class
- Replace 8 hardcoded face thresholds with named constants
- Remove unused imports (os, pickle, Path)
- server.py: 1679 → 167 lines (app setup, shared state, router registration)
- routes_search.py: /search, /text-search, /similar, /duplicates
- routes_model.py: /model, /models, /model/unload, /model/ttl
- routes_status.py: /status, /recent, /index-count, /indexed-paths
- routes_indexing.py: /index, /sync, /cleanup, /notify-new-image
- routes_face.py: all /face-* endpoints (21 routes)
- routes_volumes.py: /volume/* endpoints
- Update CI, pre-push hook, and Makefile to lint route files
@AusafMo AusafMo merged commit 33eac27 into main Mar 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant