How yoni13/immich works
Main components
• Client Applications:
– Mobile app (with its own native project, tests, assets, and integration components)
– Web client (built in Svelte with its custom routing and UI components)
– CLI tool (for server-side operations and administration)
• Backend Application (“server”):
– A NestJS–based Node/TypeScript server organized as controllers, services, entities, DTOs, and migrations.
– It handles API endpoints for authentication, asset management, albums, facial recognition, search, sharing, and more.
• Machine Learning Module:
– Contains scripts, Dockerfiles, and C++/Python code (including ANN models, facial recognition, CLIP integrations, and export utilities) for image classification and face extraction.
• OpenAPI / SDK Layer:
– The “open-api” directory contains API definitions and a TypeScript SDK generator.
• Deployment and Infrastructure:
– Docker and deployment directories include Docker Compose files, container configuration (including the .devcontainer), cloud configurations, and deployment modules for various platforms.
• Ancillary Projects:
– Developer documentation (“docs”), E2E tests, and CI/CD configuration (.github workflows)
Relationships
• That Mobile and Web clients communicate via REST (or WebSocket where applicable) with the Backend API.
• That the CLI tool can invoke specific server commands (via HTTP endpoints or direct CLI scripts).
• Machine learning subsystem both as an independent service (or microservice) that integrates (e.g., via API endpoints or direct function calls via queues) for tasks like facial recognition and CLIP processing.
• Integration points for external services such as OAuth, storage backends, and possibly caching or notification services.
Architectural patterns and design principles
• Use a modular / microservices–oriented approach where the backend is decomposed into controllers, repositories, and services. This separation of concerns is very apparent in directory names such as “controllers”, “services”, “repositories”, and “entities.”
• The deployment pipelines are containerized using Docker, and the inclusion of CI/CD folders (.github/workflows, renovate, etc.) emphasizes a modern DevOps practice.
• The system uses a layered architecture: presentation layer (mobile/web), application layer (CLI / APIs), and data access layer (ORM entities, migrations, and direct SQL queries).
Relevant technologies, frameworks, and libraries
• Mobile: Flutter (as inferred by typical Dart/Flutter files such as “pubspec.yaml”, “.fvmrc”, and i18n assets) supporting offline backup and media management.
• Web: Svelte (with Vite and Tailwind) for frontend rendering.
• Server: Node.js/TypeScript along with NestJS framework (as suggested by the organization into controllers, providers, modules, DTOs, and service tests).
• Machine Learning: Likely a combination of Python, C++, and Dockerized workloads, with attention to ANN and CLIP models.
• OpenAPI: The “open-api” directory containing OpenAPI specification files and client generators.
• CI/CD: GitHub workflows, Docker Compose setups for different environments (development, production, and mobile).
• Testing: E2E tests (using Playwright and Vitest), unit test suites, and integration tests across services.
Detail and clarity
• Most essential architectural elements without oversimplification. Try to break down the backend into its core functionalities (authentication, asset management, albums, sharing, etc.)
• How deployments and containerization are managed (show Docker Compose, deployment modules, and CI/CD integration).
• Optionally, you could add a layer for internationalization and documentation tools given the project’s strong focus on multi-language support and developer docs.