CodeVetter · Repo Unpack · Feature catalog
immich-app/immich
Feature surface is primarily ~45 Nest controllers registered in controllers/index.ts covering assets, albums, sharing, people/faces, search, libraries, jobs, sync, auth, and admin management. Background processing is expressed as JobName jobs on QueueName queues (thumbnails, metadata, video conversion, face detection/recognition, smart search, OCR, duplicates, library scan, backups, notifications, workflows). Auth supports password login, OAuth/OIDC with backchannel logout, API keys, sessions, PIN codes, and shared-link access. A WASM plugin system (extism) plus user-defined workflows are newer extension-oriented features.
- Asset upload/download/thumbnails: AssetMediaController exposes POST /assets (multipart, Permission.AssetUpload, sharedLink allowed, optional x-immich-checksum sha1 dedupe header), GET /assets/:id/original, and GET /assets/:id/thumbnail.
- Albums, partner sharing, shared links, stacks, and activities each have dedicated controllers and services (album, partner, shared-link, stack, activity) wired through controllers/index.ts.
- Search features split into metadata search and smart (CLIP) search via SearchController + SearchRepository backed by pgvector/VectorChord embeddings produced by the ML service.
- People/facial recognition is a job pipeline: JobName.AssetDetectFaces and FacialRecognition run on QueueName.FaceDetection/FacialRecognition and call the ML service's facial-recognition detection+recognition pipeline.
- Video features include transcoding (fluent-ffmpeg in media.repository.ts, transcoding.service.ts) and HLS session-based streaming coordinated through Hls* events in the EventMap and hls.service.ts.
- External libraries support filesystem watching via chokidar and scanning jobs (LibrarySyncAssets/LibrarySyncFiles/LibraryScanQueueAll); watching is locked to a single microservice instance via a database lock.
- Auth features: password login with bcrypt + constant-time dummy-hash compare, OAuth/OIDC with backchannel logout token validation, API keys, sessions with lock/invalidate, and PIN code setup/reset/change.
- Admin surface: user-admin.controller, system-config.controller, job.controller/queue.controller for pausing/resuming/cleaning BullMQ queues, database-backup.controller, integrity-admin.controller, and notification-admin.controller.
- Delta sync for offline-capable clients is implemented by sync.controller.ts + sync.service.ts + sync-checkpoint.repository.ts (SyncCheckpointRepository), which mobile uses to reconcile local drift DB state.
- Notifications and email: notification.service.ts + email.repository.ts render react-email templates from server/src/emails and send via nodemailer; jobs like NotifyUserSignup/NotifyAlbumInvite/NotifyAlbumUpdate run on the notifications queue.
- A WASM plugin system loads plugins through @extism/extism with a generic-pool of plugin instances in PluginRepository; exposure is gated by env vars IMMICH_PLUGINS_INSTALL_FOLDER and IMMICH_ALLOW_EXTERNAL_PLUGINS, with a @immich/plugin-sdk workspace package for authors.
- Workflows (user automation) exist end-to-end: workflow.controller.ts, workflow.repository.ts, utils/workflow.ts (isMethodCompatible for plugin methods), QueueName.Workflow, and a web /workflows route.
- Web routes cover photos, albums, favorites, archive, locked folder, map, memories, people, places, partners, search, sharing, shared-links, tags, trash, user-settings, utilities, workflows, plus admin and auth route groups.
- Memories, timeline buckets, map clustering, trash auto-empty, duplicate detection, and OCR are first-class jobs/controllers (memory.controller, timeline.controller, map.controller, trash.controller, duplicate.controller, ocr.service).