-
-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture Overview
Section: Architecture · Getting-Started · Home · Layered-Dependency-Rules
Trackdub is a .NET 10 local-first AI dubbing workstation: ingest, transcribe, translate, synthesize, mix, and export with ONNX Runtime. Privacy, hardware acceleration, and manifest-gated model governance are first-class.
The architecture follows Domain-Driven Design with a strict layered dependency model. Business logic sits in Domain, which depends on nothing. The Avalonia UI and Sdk/Cli hosts sit above Application.
flowchart TD
App[Trackdub.App.Avalonia] --> AppLayer[Trackdub.Application]
App --> Composition[Trackdub.Composition]
App --> Domain[Trackdub.Domain]
App --> Playback[Trackdub.Media.Playback]
App --> Sdk[Trackdub.Sdk]
App --> Licensing[Trackdub.Licensing]
Cli[Trackdub.Cli] --> Sdk
Sdk --> Composition
Sdk --> AppLayer
Composition --> AppLayer
Composition --> Inference[Trackdub.Inference]
Composition --> InferenceONNX[Trackdub.Inference.Onnx]
Composition --> Infra[Trackdub.Infrastructure]
Composition --> Media[Trackdub.Media]
Composition --> Playback
Composition --> Licensing
AppLayer --> Contracts[Trackdub.Contracts]
AppLayer --> Domain
AppLayer --> Licensing
Infra --> AppLayer
Infra --> Contracts
Infra --> Domain
Inference --> Contracts
Inference --> Domain
InferenceONNX --> Inference
Contracts --> Domain
Domain --> NONE[No Dependencies]
| Project | Responsibility |
|---|---|
Trackdub.App.Avalonia |
Cross-platform desktop UI shell (ReactiveUI + CommunityToolkit.Mvvm). |
Trackdub.Domain |
Entities, value objects, invariants. Zero external dependencies. |
Trackdub.Contracts |
DTOs and shared service contracts. |
Trackdub.Application |
Pipeline orchestration, stage planning, execution snapshots, project services. |
Trackdub.Infrastructure |
Persistence (SQLite/Dapper), filesystem, logging. |
Trackdub.Inference |
Model abstractions, manifests, execution-provider selection. |
Trackdub.Inference.Onnx |
ONNX Runtime and Windows ML implementations. |
Trackdub.Media |
FFmpeg extraction, normalization, muxing. |
Trackdub.Media.Playback |
libmpv (primary) / LibVLC (fallback) backends. |
Trackdub.Composition |
DI wiring for runnable hosts. |
Trackdub.Sdk / Trackdub.Cli
|
Headless session API and CLI. |
Trackdub.Licensing |
Licensing hooks used by the desktop host. |
Trackdub.Analyzers |
Roslyn analyzers (compile-time only). |
In the app checkout, Application/Inference/Media and related projects resolve from external/Trackdub/src/. UI code lives under src/Trackdub.App.Avalonia/. See Desktop-UI-Architecture.
The pipeline is explicit, ordered, and resumable. Each run uses an immutable execution snapshot so UI or settings changes cannot mutate in-flight work.
Typical stages: optional separation → VAD → diarization → ASR → translation → TTS → mix/export.
- Manifest presence ≠ downloaded ≠ ran ≠ succeeded
- Skip/failure must log structured reasons and preserve usable prior artifacts
- No fake readiness in UI surfaces
Manifest-gated models only. Key fields include model_id, task, commercial flags, expected_runtime, and sha256. Shipping lane is commercial-safe ONNX only.
Inventory path: src/Trackdub.Inference/Runtime/ModelManifest/bundled-models.manifest.json.
Cross-platform portable .NET and Avalonia APIs by default. Inference uses ONNX Runtime with platform EPs.
On Windows: TensorRT RTX as a standalone EP ABI plugin when available; Windows ML for catalog/device-policy routes; DirectML as legacy GPU fallback. Provider registration is never treated as model readiness. See ONNX-Execution-Providers.
One SQLite database per project. Artifact binaries live on the filesystem relative to the project. Persistence stays in Infrastructure; ViewModels must not run SQL. See Local-Project-Persistence.
- Layered-Dependency-Rules — full dependency direction
- Pipeline-Orchestration — stage contracts
- Cloud-API-and-Job-Management — account portal API (optional cloud surface)
Trackdub Engineering Wiki · Trackdub-gated · Trackdub · Contributing
Overview
Architecture
Pipeline
- Pipeline-Orchestration
- Media-Ingest-and-Preparation
- Transcription-and-VAD
- Diarization-and-Speaker-Management
- Translation-Engine
- Text-to-Speech
- Lip-Sync-and-Synthesis
- Mixing-and-Export
Desktop App
AI & Inference
- Inference-Routing-and-Planning
- ONNX-Execution-Providers
- Model-Manifests-and-Governance
- Hardware-Starter-Packs
Media & Audio
Data
Cloud & SaaS
- Cloud-API-and-Job-Management
- Web-Dashboard
- Billing-and-Quota-Management
- Webhook-Delivery-System
- Cloud-Infrastructure-Deployment
Development
Links