A modern .NET 9 application with Aspire orchestration, Blazor Server-side rendering, and Central Package Management.
CodeUI/
βββ CodeUI.slnx # Modern XML-based solution file (.NET 9+)
βββ Directory.Packages.props # Central Package Management configuration
βββ global.json # .NET 9 SDK enforcement
βββ CodeUI.AppHost/ # Aspire orchestration project
βββ CodeUI.Web/ # Blazor Server application
βββ CodeUI.Core/ # Core business logic and data models
βββ CodeUI.Orleans/ # Orleans grain definitions
βββ CodeUI.Tests/ # Unit tests using xUnit
βββ CodeUI.AspireTests/ # Integration tests using Aspire testing framework
βββ README.md # This file
- .NET 9.0 - Latest version of .NET with C# 13 language features
- Aspire 9.4.1 - Latest .NET Aspire for cloud-native orchestration
- Central Package Management - Unified dependency management across solution
- Blazor Server - Server-side rendering with real-time updates
- ASP.NET Core Identity - Built-in authentication and authorization
- Entity Framework Core - Data access with SQLite database
- Orleans - Virtual Actor Model for distributed applications
Before running this application, ensure you have:
- .NET 9.0 SDK - REQUIRED
- Docker (for Aspire orchestration)
- Visual Studio 2022 or VS Code (recommended)
git clone https://github.com/managedcode/CodeUI.git
cd CodeUI
# Verify .NET 9 is installed dotnet --version # Should show 9.0.x or higher # List installed SDKs dotnet --list-sdks # Should include 9.0.x
dotnet workload update dotnet workload install aspire
# Use .slnx solution format for .NET 9
dotnet restore CodeUI.slnx
# Use .slnx solution format for .NET 9
dotnet build CodeUI.slnx
dotnet run --project CodeUI.AppHost
This will:
- Start the Aspire dashboard at
http://localhost:18888
- Launch the Blazor Server app
- Provide monitoring and observability features
dotnet run --project CodeUI.Web
The application will be available at http://localhost:5225
(or the port shown in the console).
The application includes basic ASP.NET Core Identity authentication with:
- Registration - Create new user accounts
- Login/Logout - User authentication
- In-Memory Database - For development (switch to SQLite/SQL Server/PostgreSQL for production)
- Relaxed Password Policy - For development convenience
- Minimum password length: 6 characters
- No special character requirements
- No email confirmation required
- Purpose: Aspire orchestration host
- Features: Service discovery, monitoring, distributed tracing
- Dependencies: Aspire.Hosting
- Purpose: Blazor Server application
- Features: Interactive server-side rendering, authentication, responsive UI
- Dependencies: ASP.NET Core Identity, Entity Framework Core
- Purpose: Shared business logic and data models
- Features: Entity Framework DbContext, Identity models
- Dependencies: Entity Framework Core, ASP.NET Core Identity
- Purpose: Orleans grain definitions for distributed computing
- Features: Virtual Actor Model interfaces
- Dependencies: Microsoft.Orleans.Abstractions
# Build entire solution using .slnx format dotnet build CodeUI.slnx # Build specific project dotnet build CodeUI.Web
# Run all tests using .slnx format dotnet test CodeUI.slnx # Run tests with coverage dotnet test CodeUI.slnx --collect:"XPlat Code Coverage"
# Add migration dotnet ef migrations add InitialCreate --project CodeUI.Core --startup-project CodeUI.Web # Update database dotnet ef database update --project CodeUI.Core --startup-project CodeUI.Web
CodeUI.slnx
- Modern XML-based solution file for .NET 9Directory.Packages.props
- Central Package Management configurationglobal.json
- .NET 9 SDK enforcementCodeUI.AppHost/Program.cs
- Aspire orchestration configurationCodeUI.Web/Program.cs
- Web application startup and services configurationCodeUI.Core/Data/ApplicationDbContext.cs
- Entity Framework database contextCodeUI.Core/Data/ApplicationUser.cs
- Identity user modelCodeUI.Orleans/Grains/IHelloGrain.cs
- Sample Orleans grain interface
CodeUI supports self-contained deployment for production environments without requiring Docker or external dependencies.
# Build for all platforms ./deployment/scripts/build-all.sh # Manual build commands dotnet publish CodeUI.Web -c Release -r win-x64 --self-contained -p:PublishSingleFile=true dotnet publish CodeUI.Web -c Release -r linux-x64 --self-contained -p:PublishSingleFile=true dotnet publish CodeUI.Web -c Release -r osx-x64 --self-contained -p:PublishSingleFile=true
- Windows: Run
install-windows.ps1
as Administrator - Linux: Run
sudo ./install-unix.sh
- macOS: Run
sudo ./install-unix.sh
- β Single executable (~150MB per platform)
- β SQLite database for data persistence
- β Windows Service / systemd / LaunchDaemon auto-start
- β No external dependencies required
- β Production-ready configuration
See deployment/README.md for detailed instructions.
For development or containerized environments:
- Update Database Provider: Change from In-Memory to SQL Server/PostgreSQL in
Program.cs
- Configure Connection Strings: Update
appsettings.json
with production database - Security Settings: Review and harden authentication settings
- Environment Variables: Configure for production environment
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin feature/your-feature-name
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For questions and support:
- Create an issue in the GitHub repository
- Check existing documentation and README
- Review the .NET Aspire documentation
Happy Coding! π