Repo X-Ray · 05 December 2026, 05:38 · read in 7.9s · nothing was executed

immich

/srv/xela/workspace/.envxray-oss/immich

How to run itWhat the code isWhere the risk isWhat the tests cannot seeDead weightDependenciesSecretsMethod and limits
356,550
lines of code
2023
source files
671
test files
71%
modules a test can reach
50
commits read
today
last commit

How to run it

npm scripts

and 86 more.

dockers

CI steps

cli binarys

runnable scripts

What the code is

LanguageFilesLines
TypeScript1,256196,607
Dart86196,255
Svelte41540,943
SQL3910,846
Python396,609
Rust376,003

What to read first

The fewest files that are the only import route into 62% of the code — 779 of 1,263 files. This is not a ranking, it is a cover: nothing in those 779 files can be reached by an import without passing through one of the entrances below. Each row also names the files the rest of that region depends on most, which is the vocabulary you will be reading it in.

Read this, then what it leads toFiles it opensLines in that regionA test reaches it
1. server/src/controllers/index.ts
where the program starts
  server/src/enum.ts ← 200 files, 1,379 lines
  server/src/decorators.ts ← 156 files, 363 lines
  server/src/dtos/auth.dto.ts ← 84 files, 217 lines
32152,584no
2. web/src/routes/(user)/tags/[[photos=photos]]/[[assetId=id]]/+page.svelte
nothing imports it
  packages/plugin-sdk/src/sdk.ts ← 129 files, 107 lines
  web/src/lib/queries/client.ts ← 97 files, 181 lines
  web/src/lib/managers/auth-manager.svelte.ts ← 51 files, 138 lines
29732,468yes
3. web/src/routes/(user)/user-settings/+page.svelte
nothing imports it
  web/src/lib/queries/api-key.query.ts ← 4 files, 34 lines
  web/src/lib/components/shared-components/settings/SettingAccordion.svelte ← 3 files, 118 lines
  web/src/lib/queries/passkey.query.ts ← 3 files, 72 lines
534,412yes
4. web/src/routes/admin/system-settings/+page.svelte
nothing imports it
  web/src/lib/components/shared-components/settings/SystemConfigButtonRow.svelte ← 19 files, 78 lines
  web/src/routes/admin/system-settings/SettingSelect.svelte ← 8 files, 92 lines
  web/src/routes/admin/system-settings/SettingTextarea.svelte ← 2 files, 76 lines
353,855yes
5. server/src/schema/index.ts
where the program starts
  server/src/schema/tables/asset-edit.table.ts ← 1 files, 55 lines
  server/src/schema/tables/user-metadata.table.ts ← 1 files, 46 lines
  server/src/schema/tables/memory-asset.table.ts ← 1 files, 38 lines
24790no
6. web/src/routes/(user)/workflows/[workflowId]/+page.svelte
nothing imports it
  web/src/lib/queries/workflow.query.ts ← 6 files, 75 lines
  web/src/lib/utils/workflow.ts ← 5 files, 98 lines
  web/src/lib/managers/plugin-manager.svelte.ts ← 5 files, 96 lines
212,229yes
7. server/src/services/index.ts
where the program starts
  server/src/services/metadata.service.ts ← 1 files, 1,186 lines
  server/src/services/media.service.ts ← 1 files, 910 lines
  server/src/services/workflow-execution.service.ts ← 1 files, 518 lines
144,047no
8. machine-learning/conftest.py
where the program starts
  machine-learning/immich_ml/models/transforms.py ← 8 files, 101 lines
  machine-learning/immich_ml/models/facial_recognition/_ops.py ← 2 files, 73 lines
  machine-learning/immich_ml/main.py ← 1 files, 260 lines
141,598no

The modules everything else leans on

Imported by the most files: the load-bearing walls, where a change reaches furthest.

ModuleImported byLinesA test reaches it
packages/plugin-sdk/src/sdk.ts382107yes
server/src/enum.ts3531,379yes
web/src/lib/queries/client.ts308181yes
web/src/lib/route.ts205175yes
server/src/decorators.ts186363yes
mobile/test/utils.dart17223no
server/src/repositories/logging.repository.ts109201yes
server/test/small.factory.ts108229no
web/src/lib/managers/auth-manager.svelte.ts107138yes
server/src/dtos/auth.dto.ts92217yes
mobile/packages/ui/lib/src/types.dart915yes
web/src/lib/constants.ts87315yes

Where the risk is

Churn multiplied by size. A big file that never changes is usually fine; a big file that changes constantly is where the bugs and the arguments live.

FileCommitsLinesMostly written byTested
packages/sdk/src/fetch-client.ts59,063Author G 20%no
server/src/enum.ts51,379Author B 60%yes
server/src/dtos/config.dto.ts4895Author B 75%yes
server/src/utils/config.ts5275Author B 80%yes
server/src/utils/database.ts21,185Author H 50%yes
server/src/services/sync.service.ts21,051Author G 50%yes
server/src/repositories/config.repository.ts3462Author E 33%yes
mobile/lib/infrastructure/repositories/sync_stream.repository.dart21,023Author G 50%no
server/src/repositories/person.repository.ts21,020Author I 50%yes
web/src/lib/services/asset.service.ts2896Author P 50%yes
server/src/repositories/sync.repository.ts2871Author G 50%yes
mobile/lib/presentation/widgets/album/album_selector.widget.dart2852Author G 50%no

The busiest test file is server/src/services/system-config.service.spec.ts (5 commits) - kept out of the table above so the code that ships comes first.

Bus factor. 1 of the files above were written almost entirely by one person (80% or more of the commits that touched them). If that person is not available, these are the files that will hurt.

Active in the last 90 days: Author A (18), Author B (5), Author C (4), Author D (4), Author E (3), Author F (3)

History read: 50 commits, 4 days ago to today. Top committer overall: Author A 36%.

What the tests cannot see

The import graph covers Python and JavaScript/TypeScript only. 861 Dart, 37 Kotlin, 30 Swift, 1 C++, 1 C files in this repository were inventoried, and counted in the languages, churn, ownership, secrets and TODO findings - but they are left out of the reach figure and the dead-code list, because this tool did not read their imports and will not guess.

901 of 1,263 shipped modules are reachable from a test file by import (71%).

7 further files under examples, docs, scripts or benchmarks are not test-reachable either. They are counted apart from the number above, because demo code dragging a healthy repository down tells you nothing.

Reachable means a test imports it, directly or through another module. It is the floor, not coverage: a module can be reachable and still have none of its behaviour exercised. The modules below are the other case - nothing a test loads can even see them, so a green suite says nothing about them.

and 163 more in 135 other places.

Dead weight

The import graph covers Python and JavaScript/TypeScript only. 861 Dart, 37 Kotlin, 30 Swift, 1 C++, 1 C files in this repository were inventoried, and counted in the languages, churn, ownership, secrets and TODO findings - but they are left out of the reach figure and the dead-code list, because this tool did not read their imports and will not guess.
Read this list with care. This repository loads code at runtime in 6 places where the target is a variable, so a reader like this one cannot know what they load. 1 files were rescued from the list below by resolving the literal globs and module paths that could be resolved.

Nothing imports these, and no entry point, script or resolved runtime load reaches them. Biggest first.

and 4 more in 4 other places.

Longest functions

FunctionFileLines
_predictmachine-learning/immich_ml/models/ocr/recognition.py:5658
test_recognitionmachine-learning/test_main.py:173041

179 TODO / FIXME / HACK markers

FileCount
packages/scripts/src/commands/notes.spec.ts14
i18n/gl.json8
server/src/services/workflow-execution.service.ts7
server/src/dtos/album.dto.ts6
packages/cli/src/queue.ts4
server/src/dtos/person.dto.ts4

Dependencies

Read from package.json, docs/package.json, e2e/package.json, machine-learning/pyproject.toml, native/Cargo.toml, cli/package.json, e2e-auth-server/package.json, plugin-core/package.json, plugin-sdk/package.json, scripts/package.json, sdk/package.json, server/package.json, web/package.json.

Imported but not declared

These work on a machine where the package happens to be installed, and fail in a clean checkout or in CI.

PackageImported by
torchmachine-learning/ann/export/run.py
open_clipmachine-learning/ann/export/run.py
onnx2torchmachine-learning/ann/export/run.py
tinynnmachine-learning/ann/export/run.py
starlettemachine-learning/immich_ml/main.py
typing_extensionsmachine-learning/immich_ml/models/ocr/schemas.py
machine-learning/immich_ml/schemas.py
googlemachine-learning/immich_ml/sessions/prepare.py

Declared but never imported

Dead weight in the install, or a tool that is run rather than imported (formatters, type stubs, test plugins). Check before removing.

prettier prettier-plugin-sort-json @docusaurus/core @docusaurus/theme-mermaid @mdi/react @mdx-js/react docusaurus-lunr-search lunr postcss raw-loader react-dom @docusaurus/module-type-aliases @docusaurus/tsconfig @docusaurus/types @typescript/native typescript @immich/cli @immich/sdk @types/luxon @types/node @types/pg @types/pngjs @types/supertest eslint

Missing, but only for tests, docs or examples

Nothing in the shipped code imports these, so an install will not break - but a fresh contributor running the tests or building the docs will hit them.

@docusaurus/plugin-content-docs @theme/NavbarItem requests

Optional by design

Imported only inside try: or a TYPE_CHECKING guard, so the code already handles their absence. Not counted as missing.

onnxruntime_ep_nv_tensorrt_rtx

Secrets

56 possible secrets committed outside a test folder. Values are masked here. Check each one, and treat any real key as compromised: it is in the history even if you delete the line.
WhatWhereValue
password in codee2e/src/fixtures.ts:9pass...rd' (20 chars)
password in codee2e/src/fixtures.ts:32pass...d1' (21 chars)
password in codee2e/src/fixtures.ts:37pass...12' (22 chars)
password in codee2e/src/fixtures.ts:42pass...23' (23 chars)
password in codee2e/src/fixtures.ts:47pass...23' (23 chars)
password in codee2e/src/fixtures.ts:52pass...ta' (26 chars)
password in codee2e/src/specs/server/api/oauth.e2e-spec.ts:53pass...rd' (20 chars)
password in codee2e/src/specs/server/api/oauth.e2e-spec.ts:365pass...rd' (20 chars)
password in codee2e/src/specs/server/api/user-admin.e2e-spec.ts:87pass...23' (23 chars)
password in codee2e/src/specs/server/api/user-admin.e2e-spec.ts:142pass...et' (24 chars)
password in codee2e/src/specs/server/api/user-admin.e2e-spec.ts:148pass...et' (24 chars)
private key blockpackages/e2e-auth-server/test-keys.ts:1----...--- (27 chars)
password in codeserver/src/controllers/auth.controller.spec.ts:27pass...rd' (21 chars)
password in codeserver/src/controllers/auth.controller.spec.ts:75pass...rd' (20 chars)
password in codeserver/src/controllers/auth.controller.spec.ts:83pass...rd' (20 chars)
password in codeserver/src/controllers/auth.controller.spec.ts:115pass...rd' (20 chars)
password in codeserver/src/controllers/auth.controller.spec.ts:137pass...rd' (20 chars)
password in codeserver/src/controllers/auth.controller.spec.ts:150pass...rd' (20 chars)
password in codeserver/src/controllers/auth.controller.spec.ts:164pass...rd' (20 chars)
password in codeserver/src/controllers/auth.controller.spec.ts:175pass...rd' (20 chars)

17 more in test or fixture folders

Test certificates and sample keys are committed on purpose, so these are listed rather than raised. Worth a glance only if one of these folders holds something real.

WhatWhere
password in codeserver/test/fixtures/shared-link.stub.ts:32
password in codeserver/test/fixtures/shared-link.stub.ts:83
password in codeserver/test/medium/specs/services/auth.service.spec.ts:55
password in codeserver/test/medium/specs/services/auth.service.spec.ts:71
password in codeserver/test/medium/specs/services/auth.service.spec.ts:74
password in codeserver/test/medium/specs/services/auth.service.spec.ts:81
password in codeserver/test/medium/specs/services/auth.service.spec.ts:131
password in codeserver/test/medium/specs/services/auth.service.spec.ts:152
password in codeserver/test/medium/specs/services/user.service.spec.ts:67
password in codeserver/test/medium/specs/services/user.service.spec.ts:68
password in codeserver/test/repositories/config.repository.mock.ts:33
password in codeweb/test/common/data.ts:1078

No committed credentials matched the patterns checked.

Patterns covered: AWS keys, private key blocks, GitHub, Slack, Stripe, Google, OpenAI and Anthropic keys, JSON web tokens, and passwords assigned in code. A secret in a format not listed here would not be found, and this does not read the git history.

Method and limits

More measured notes on coding agents: alexenabled.github.io