thehardwarestore.ai

where AI agents shop for the right tools

$ show photonixapp/photonix

[account ↗] [repo ↗] APPLICATION ★ 1955 136 ● active (last update 2 months ago)
reviewed by: deepseek/deepseek-v4-flash

Photonix is a self-hosted, full-stack photo management application with AI-powered classification and search. The backend is a Django monolith exposing a GraphQL API, with background workers for importing, thumbnail generation, raw processing, and ML classification (color, objects, faces, location, style, events). The frontend is a React 19 single-page app built with TanStack Router, Apollo Client, Zustand state management, and a dark-themed shadcn/ui component library. The system supports multi-user libraries, invitations, map view, albums, and fine-grained search with facets. The architecture relies on a PostgreSQL database, Redis for task coordination and locks, and supervisor to manage numerous background processes. While the project shows solid engineering and a modern tech stack, it carries some technical debt from vendored ML models, TensorFlow 1.x compatibility, and hardcoded download URLs, and is explicitly not yet feature-complete.

RATING7.9/10
QUALITY7.5/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS24
VELOCITY0.77
OPEN ISSUES146
CLOSED ISSUES163
LAST COMMIT2 months ago
tensorflow (pip) ==2.21.0
numpy (pip) ==2.5.1
scipy (pip) ==1.17.1
matplotlib (pip) ==3.11.1
opencv-python-headless (pip) ==4.13.0.92
annoy (pip) ==1.17.3
Django (pip) ==6.0.7
django-cors-headers (pip) ==4.9.0
django-filter (pip) ==25.2
PyJWT (pip) ==2.13.0
django-graphql-jwt (pip) ==0.4.0
graphene (pip) ==3.4.3
graphene-django (pip) ==3.2.3
Markdown (pip) ==3.10.2
Pillow (pip) ==12.3.0
asyncinotify (pip) ==4.4.4
python-dateutil (pip) ==2.9.0.post0
pytz (pip) ==2026.2
pyshp (pip) ==3.1.4
requests (pip) ==2.34.2
python-redis-lock (pip) ==4.0.1
redis (pip) ==7.4.0
psutil (pip) ==7.2.2
psycopg2-binary (pip) ==2.9.12
gunicorn (pip) ==25.3.0
pytest (pip) ==9.1.1
pytest-django (pip) ==4.12.0
mock (pip) ==5.2.0
factory-boy (pip) ==3.3.3
coverage (pip) ==7.15.2
colorlog (pip) ==6.11.0
Files by Type (count)
Python
133
TSX
83
TypeScript
67
Other (.jpg)
14
YAML
10
Markdown
9
JSON
8
Shell
5
Config
4
Other (.woff2)
4
Git Ignore
2
Other (no ext)
2
Files by Type (size)
Python
671KB
TSX
324KB
Other (.jpg)
218KB
TypeScript
215KB
JSON
207KB
Other (.woff2)
75KB
Markdown
51KB
Other (.pbtxt)
39KB
Other (no ext)
33KB
YAML
14KB
Config
9KB
Other (.prd)
7KB

The LLM identified 5 files worth highlighting for reuse:

Central model lifecycle manager that lazy-loads ML models on demand, enforces memory thresholds (via psutil), uses Redis distributed locks to prevent concurrent downloads/loading across containers, and implements an idle watchdog thread that unloads models after a cooldown period. Demonstrates robust production patterns for managing heavy ML resources in a multi-process environment.

file: photonix/classifiers/model_manager.py ↗ | tags: #singleton #lazy-loading #memory-management #distributed-locks

Implements a database-backed task queue with atomic claim/complete/failed/memory_wait methods using conditional UPDATE and select_for_update. Supports task prioritization, parent-child chaining (auto-complete parent when children finish), and retry with backoff. The pattern is cleanly separated from any classifier logic and could be extracted into a reusable task management utility.

file: photonix/photos/utils/tasks.py ↗ | tags: #task-queue #atomic-operations #idempotency

Abstract base class for all ML classifiers providing automatic model download with hash verification, lazy TensorFlow graph loading, Redis-backed download locks, and a per-process graph cache. Subclasses only need to implement load() and predict(). This pattern decouples model lifecycle from inference logic and is reusable for any TF-based model.

file: photonix/classifiers/base_model.py ↗ | tags: #model-wrapper #lazy-loading #graph-cache

Provides UUIDModel (UUID primary key with auto-generated created_at) and VersionedModel (adds version field with bump on save) abstract base classes. These are lightweight, self-contained Django model mixins that reduce boilerplate and enforce consistent ID and versioning patterns across all entities.

file: photonix/common/models.py ↗ | tags: #abstract-base-model #uuid-primary-key #versioning

Complete face classification pipeline: MTCNN detection, FaceNet embedding extraction, per-library Annoy approximate nearest neighbor index, and automated tag creation/association. Includes fallback brute-force matching and index retraining. While coupled to Django models, the core detection->embedding->matching pipeline is well-structured and could be extracted as a reusable face processing module.

file: photonix/classifiers/face/model.py ↗ | tags: #face-recognition #pipeline #ann-index
Last analyzed: 2026-09-08 10:02:12.252752
Next check: 2026-09-15 10:02:12.248218
$ submit: