# Wingbox report: immich-server

Generated on 2026-11-16 by wingbox 0.2.3 from the code graph of this project.
Open `map.html` in this folder for the interactive map.

## Key findings

- A change to `src/enum.ts` reaches 545 of 707 modules (77%) within 2 hops; 339 modules depend on it directly.
- 0 boundary violations between layers that are set by folders. 2 more candidates rest on a guessed layer and are not counted.
- The layer rules place 702 of 707 modules (99%): 689 by folder, 13 by the role of the file. The boundary rules say nothing about the rest.

## Summary

| | |
|---|---|
| Modules | 707 |
| Dependencies between modules | 3,795 |
| Functions, constants, classes and types | 2,856 |
| Languages | ts 695, tsx 9, js 3 |
| Boundary violations | 0 |

## Architecture layers

Each module is assigned to a layer from its folders; when no folder rule applies, from the role of the file, which is a guess. `other` holds the modules no rule applies to.

| Layer | Modules | Share |
|---|---:|---:|
| ui | 9 | 1% |
| api | 62 | 9% |
| service | 59 | 8% |
| domain | 134 | 19% |
| infra | 168 | 24% |
| shared | 38 | 5% |
| test | 232 | 33% |
| other | 5 | 1% |

## Most depended-on modules

A change in one of these files reaches the most code (test files are left out). "Within 2 hops" counts the modules that depend on it directly or through one other module.

| File | Layer | Direct dependents | Within 2 hops |
|---|---|---:|---:|
| `src/enum.ts` | shared | 339 | 545 |
| `src/decorators.ts` | shared | 183 | 457 |
| `src/schema/index.ts` | domain | 113 | 247 |
| `src/repositories/logging.repository.ts` | infra | 103 | 337 |
| `src/dtos/auth.dto.ts` | domain | 92 | 352 |
| `src/types.ts` | shared | 81 | 405 |
| `src/database.ts` | shared | 69 | 378 |
| `src/services/base.service.ts` | service | 65 | 281 |
| `src/middleware/auth.guard.ts` | api | 57 | 231 |
| `src/validation.ts` | domain | 57 | 201 |
| `src/zod.ts` | other | 56 | 392 |
| `src/utils/misc.ts` | shared | 51 | 190 |
| `src/repositories/event.repository.ts` | infra | 45 | 384 |
| `src/dtos/config.dto.ts` | domain | 43 | 252 |
| `src/constants.ts` | shared | 40 | 232 |

## Boundary violations

None found by the layer rules, which place 99% of the modules.

2 more candidates where a layer is only guessed from the role of a file: `wingbox boundaries all` lists them.

6 imports of types only cross a layer boundary. The compiler erases such an import, so it is not counted as a violation; a change of the type still reaches the importing file.

| From | To |
|---|---|
| `src/dtos/asset.dto.ts` (domain) | `src/repositories/asset.repository.ts` (infra) |
| `src/emails/album-invite.email.tsx` (ui) | `src/repositories/email.repository.ts` (infra) |
| `src/emails/album-update.email.tsx` (ui) | `src/repositories/email.repository.ts` (infra) |
| `src/emails/test.email.tsx` (ui) | `src/repositories/email.repository.ts` (infra) |
| `src/emails/welcome.email.tsx` (ui) | `src/repositories/email.repository.ts` (infra) |
| `src/services/asset-media.service.ts` (service) | `src/middleware/auth.guard.ts` (api) |

## Where to start reading

Files that nothing else depends on and that pull in the most modules:

- `src/bin/sync-sql.ts` (other), depends on 9 modules
- `src/workers/microservices.ts` (api), depends on 8 modules
- `src/main.ts` (infra), depends on 6 modules
- `src/workers/api.ts` (api), depends on 5 modules
- `src/workers/maintenance.ts` (other), depends on 5 modules
- `src/schema/migrations/1744910873969-InitialMigration.ts` (infra), depends on 4 modules
- `src/bin/sync-open-api.ts` (infra), depends on 2 modules
- `src/emails/license.email.tsx` (ui), depends on 2 modules
- `src/schema/migrations/1749067526135-UserOnboardingDefault.ts` (infra), depends on 1 module
- `src/schema/migrations/1752759108283-ConvertToAbsolutePaths.ts` (infra), depends on 1 module

## Next steps

Check what a change will reach before you make it:

```
wingbox impact src/enum.ts
```

Rebuild after the code changes with `wingbox build`. This report and the map are rewritten on every build.

## Limits

The graph comes from static parsing. Dependencies created at run time (dependency injection, reflection, generated code) are not visible here.
