structuring-avalonia-projects
π―Skillfrom christian289/dotnet-with-claudecode
Structures AvaloniaUI solutions with clear project naming conventions, layer separation, and dependency management for scalable .NET applications.
Installation
npx skills add https://github.com/christian289/dotnet-with-claudecode --skill structuring-avalonia-projectsSkill Details
"Guides the design of AvaloniaUI solution and project structures. Use when creating new AvaloniaUI solutions or organizing projects following naming conventions and layer separation."
Overview
# 6.2 AvaloniaUI Solution and Project Structure
#### 6.2.1 Project Naming Conventions
```
SolutionName/
βββ SolutionName.Abstractions // .NET Class Library (Interface, abstract class, and other abstract types)
βββ SolutionName.Core // .NET Class Library (Business logic, pure C#)
βββ SolutionName.Core.Tests // xUnit Test Project
βββ SolutionName.ViewModels // .NET Class Library (MVVM ViewModel)
βββ SolutionName.AvaloniaServices // Avalonia Class Library (Avalonia-related services)
βββ SolutionName.AvaloniaLib // Avalonia Class Library (Reusable components)
βββ SolutionName.AvaloniaApp // Avalonia Application Project (Entry point)
βββ SolutionName.UI // Avalonia Custom Control Library (Custom controls)
βββ [Solution Folders]
βββ SolutionName/ // Main project group
βββ Common/ // Common project group
```
Naming by Project Type:
.Abstractions: .NET Class Library - Defines abstract types like Interface, abstract class (Inversion of Control).Core: .NET Class Library - Business logic, data models, services (UI framework independent).Core.Tests: xUnit/NUnit/MSTest Test Project.ViewModels: .NET Class Library - MVVM ViewModel (UI framework independent).AvaloniaServices: Avalonia Class Library - Avalonia-related services (DialogService, NavigationService, etc.).AvaloniaLib: Avalonia Class Library - Reusable UserControl, Window, Converter, Behavior, AttachedProperty.AvaloniaApp: Avalonia Application Project - Entry point, App.axaml.UI: Avalonia Custom Control Library - ControlTheme-based custom controls
Project Dependency Hierarchy:
```
SolutionName.AvaloniaApp
β references
SolutionName.Abstractions (Top layer - does not depend on other projects)
β references
SolutionName.Core
```
Role of the Abstractions Layer:
- Houses all Interfaces and abstract classes
- Dependency inversion through abstract types instead of direct references to concrete types (Dependency Inversion Principle)
- Actual implementations injected via DI container at runtime
- Can be replaced with Mock objects during testing
More from this repository7
.NET development plugins for Claude Code - WPF, AvaloniaUI, and more
Enhances WPF development by providing a comprehensive Claude Code extension with 57 skills, 11 specialized agents, and 5 commands for MVVM patterns, custom control design, and performance optimizat...
converting-html-css-to-wpf-xaml skill from christian289/dotnet-with-claudecode
Resolves AvaloniaUI RadialGradientBrush compatibility by ensuring GradientOrigin and Center values are identical during WPF to AvaloniaUI conversion.
Guides developers in designing robust, modular, and reusable custom control architectures for AvaloniaUI applications with best practices and architectural patterns.
Enables advanced collection management in AvaloniaUI by providing filtering, sorting, and grouping capabilities using DataGridCollectionView and ReactiveUI.
Configures dependency injection and GenericHost setup for AvaloniaUI applications, enabling service registration and IoC patterns.