Skip to content

Repository files navigation

.NET 9 Aspire Fullstack Starter

A modern fullstack starter built with .NET 9 Aspire as a distributed application. This project provides a complete foundation for building scalable web applications with clean architecture principles.

📋 Table of Contents

⚡ Quick Start

Want to try it immediately? Just run:

aspire run

That's it! 🎉 All services will start automatically.

Your apps will be available at:

Note: First run automatically sets up the database with sample data.

📋 Prerequisites

You need these installed first:

  1. .NET SDK 9.0 or later
  2. Docker Desktop or Podman
  3. Node.js (required for integration testing withPlaywright and browser automations)
  4. Aspire CLI: dotnet tool install -g Aspire.Cli

💡 Alternative Aspire install: Native installation available via official docs

🎯 Getting Started

Step-by-step setup:

  1. Clone this repository

    git clone <your-repo-url>
    cd dotnet-fullstack-starter
  2. Install prerequisites (see above)

  3. Start everything

    aspire run
  4. Explore your app

📚 Need more details? Check our Getting Started Guide for step-by-step instructions.

🏗️ What's Included

  • ✅ Authentication: ASP.NET Core Identity with cookie authentication
  • ✅ Database: MySQL with Entity Framework Core and automatic migrations
  • ✅ Modern UI: Blazor WebAssembly with MudBlazor components
  • ✅ API Docs: Scalar API documentation interface
  • ✅ Health Checks: Built-in service monitoring
  • ✅ Testing: Integration tests with Playwright and MCP support
  • ✅ Production Ready: Docker deployment with Aspire manifests

💻 Development

# Start development environment
aspire run

# Run all tests
dotnet test

# Run only integration tests
dotnet test test/Integration.Test

# Install Playwright browsers (first time only)
pwsh test/Integration.Test/bin/Debug/net9.0/playwright.ps1 install

# Create database migration
cd src/Api.Migrations
dotnet ef migrations add YourMigrationName

Services running after aspire run:

🚀 Production Deployment

# Generate deployment files
aspire publish --output-path ./publish

# Deploy with Docker Compose
cd ./publish
docker-compose up -d

📖 Detailed deployment instructions: Deployment Guide

🔧 Using This Project

  1. Use as Base: Clone this repository for new projects
  2. Rename Solution: Update DotnetFullstackStarter.slnx and namespaces
  3. Add Your Domain: Modify entities in src/Api/Domain/
  4. Customize UI: Build your pages in src/Frontend/
  5. Deploy: Use aspire publish for production

🏗️ Architecture details: Architecture Overview 💻 Development workflows: Development Guide

🚨 Troubleshooting

Common issues:

  • Aspire CLI not found: dotnet tool install -g Aspire.Cli
  • Docker not running: Start Docker Desktop
  • Port conflicts: Check what's using ports 5001, 5002, 17178
  • Database issues: Check DbGate via Aspire Dashboard

🔧 Complete troubleshooting guide: Troubleshooting

📖 Documentation

📚 Complete guides available in the /doc folder:

🌐 Learn More

Integration Testing with Playwright:

  • Tests use Playwright for browser automation
  • MCP (Model Context Protocol) support for AI-driven testing
  • Run pwsh test/Integration.Test/bin/Debug/net9.0/playwright.ps1 install to install browsers
  • Tests are located in test/Integration.Test/

Documentation:

About

Full-stack .NET starter with ASP.NET Core API, EF Core, Blazor WASM, authentication & authorization, CI/CD for GitHub & GitLab, DevContainer for VS Code, Aspire support, full test coverage, and deployment-ready setup for API, DB, and frontend.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages