1.5 KiB
1.5 KiB
ClaudeDo.App
Desktop entry point for the ClaudeDo application. Configures DI, initializes the database, and launches the Avalonia window.
Responsibility
Program.cs— STA thread, DI container registration (repositories, services, viewmodels), schema init, Avalonia builderApp.axaml/App.axaml.cs— Avalonia application lifecycle, main window creation, staticServiceProvideraccessorViewLocator.cs— reflection-based IDataTemplate that maps ViewModels to Views by naming convention
Project references: ClaudeDo.Data, ClaudeDo.Ui. Package versions are in the .csproj — see
the root CLAUDE.md for the tech stack.
DI Registration Pattern
- Singletons —
IDbContextFactory, all repositories,GitService,WorkerClient,IReleaseClient,UpdateCheckService,IPrimeScheduleApi,INotesApi,InstallerLocator/WorkerLocator, the three island VMs, andIslandsShellViewModel(the window's DataContext) - Transients — modal VMs, several exposed as
Func<T>factories for on-demand dialog creation (e.g.Func<DiffViewerViewModel>).ConflictResolverViewModeluses aFunc<string, ConflictResolverViewModel>factory keyed by taskId (singleton factory, handed toIslandsShellViewModel.ConflictResolverFactory).
Notes
- This project owns the composition root — all wiring happens here
- ViewLocator resolves
FooViewModel->FooViewby replacing "ViewModel" with "View" in the type name - AvaloniaUI diagnostics are conditionally included (DEBUG only)