A production-ready .NET Aspire template featuring:
- React 19 frontend with TanStack Router and React Query
- Backend-For-Frontend (BFF) pattern using Duende BFF
- Configurable authentication (Keycloak, FusionAuth, or Duende Demo)
- Multi-tenant architecture with data isolation
- OpenTelemetry observability built-in
- .NET 10 with Aspire 13.1
dotnet new install FullstackTemplatedotnet new fullstack-aspire -n MyProjectdotnet new fullstack-aspire -n MyProject --AuthProvider Keycloakdotnet new fullstack-aspire -n MyProject --AuthProvider FusionAuth| Parameter | Default | Description |
|---|---|---|
--name / -n |
(required) | Project name |
--AuthProvider |
DuendeDemo |
Auth provider: DuendeDemo, Keycloak, or FusionAuth |
MyProject/
βββ MyProject.AppHost/ # Aspire orchestration (start here)
βββ MyProject.Server/ # Backend API (.NET 10, CQRS, MediatR)
βββ MyProject.Bff/ # BFF proxy (Duende BFF + YARP)
βββ frontend/ # React SPA (React 19, TanStack, Tailwind)
βββ tests/ # Test projects
βββ CLAUDE.md # Development guide & patterns
- CQRS with MediatR - Vertical slice architecture
- Rich Domain Entities - DDD patterns with value objects
- Multi-tenancy - Automatic tenant isolation
- Soft Delete - Audit fields and soft delete built-in
- API Versioning - URL segment versioning (
/api/v1/...) - OpenTelemetry - Distributed tracing and metrics
- PostgreSQL - With EF Core and migrations
- TanStack Router - File-based routing with type safety
- TanStack Query - Server state management
- TanStack Table - Data tables with sorting/filtering
- 40+ UI Components - Based on shadcn/ui and Base UI
- Filter Builder - Advanced filtering with QueryKit integration
- Theme System - Light/dark/system mode
- React Hook Form + Zod - Form handling with validation
cd MyProject.AppHost
dotnet runOr use the Aspire CLI:
cd MyProject.AppHost
aspire runThis starts:
- Aspire Dashboard - View logs, traces, and metrics
- Backend API - .NET API server
- BFF Proxy - Handles auth and proxies to API
- React Dev Server - Vite with hot reload
- Auth Provider - Keycloak/FusionAuth (Docker) or Duende Demo (external)
| Password | Roles | |
|---|---|---|
| admin@example.com | password123! | admin, user |
| user@example.com | password123! | user |
| Username | Password |
|---|---|
| bob | bob |
| alice | alice |
ββββββββββββ βββββββββββ βββββββββββββββββββββ
β React ββββββΊβ BFF ββββββΊβ Auth Provider β
β App βββββββ (OIDC) βββββββ (e.g. Keycloak) β
ββββββββββββ βββββββββββ βββββββββββββββββββββ
β β
β Cookie β JWT Token
β βΌ
β βββββββββββ
βββββββββββΊβ API β
via BFF β Server β
βββββββββββ
- User clicks Login β navigates to
/bff/login - BFF redirects to identity provider
- User authenticates with provider
- Provider redirects back to
/signin-oidc - BFF creates secure
__Host-bffcookie - React app calls
/bff/userto get claims - API calls go through BFF at
/api/v1/*
After creating your project:
- Run the app to see everything working
- Read
CLAUDE.mdfor development patterns and guides - Add your first entity using the patterns in
.claude/rules/ - Build your features with the included CQRS patterns
This template includes comprehensive Claude Code integration:
CLAUDE.md- Main development guide with architecture and patterns.claude/rules/- Detailed guides for backend patterns:controllers.md- API controller patternsfeatures-and-cqrs.md- CQRS command/query patternsworking-with-domain-entities.md- Rich domain entity patternsdtos-and-mappings.md- DTO and Mapperly patternsentity-configurations.md- EF Core configuration patternsdomain-events.md- Domain event patterns
.claude/skills/- Automated scaffolding skills
MIT