A comprehensive full-stack application built with .NET Aspire, React.js, and Azure Container Apps, demonstrating modern cloud-native architecture with Dapr orchestration.
This project showcases how to build a modern, cloud-native application using:
- .NET Aspire for orchestration and service discovery
- React.js + TypeScript for the frontend
- ASP.NET Core Web API for the backend
- Azure Container Apps for deployment
- Dapr for microservices integration
- Azure Services (App Configuration, Key Vault, Blob Storage, SQL Database)
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β React.js β β .NET Web API β β Azure Services β
β Frontend βββββΊβ Backend βββββΊβ β
β β β β β β’ App Config β
β β’ TypeScript β β β’ Entity FW β β β’ Key Vault β
β β’ Modern UI β β β’ Swagger β β β’ Blob Storage β
β β’ CRUD Ops β β β’ Health Checks β β β’ SQL Database β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β β
ββββββββββββββββββββββββββΌβββββββββββββββββββββββββ
β
βββββββββββββββββββ
β .NET Aspire β
β Orchestration β
β β
β β’ Service Disc. β
β β’ Configuration β
β β’ Observability β
βββββββββββββββββββ
β
βββββββββββββββββββ
β Azure Container β
β Apps + Dapr β
β β
β β’ Auto Scaling β
β β’ Load Balancer β
β β’ Ingress β
βββββββββββββββββββ
- β Create new Dragon Ball characters
- β Read character details and library
- β Update character information
- β Delete characters from library
- Name: Character's name (e.g., Goku, Vegeta)
- Race: Character's species (e.g., Saiyan, Namekian)
- Planet: Home planet (e.g., Earth, Vegeta)
- Transformation: Ultimate form (e.g., Ultra Instinct, Super Saiyan Blue)
- Technique: Signature attack (e.g., Kamehameha, Final Flash)
- π¨ Modern UI: Responsive design with Dragon Ball theme
- π Type Safety: Full TypeScript support
- π₯ Health Checks: Comprehensive monitoring
- π API Documentation: Swagger/OpenAPI integration
- π Real-time Updates: Live data synchronization
- π‘οΈ Error Handling: Robust error management
- π± Mobile Responsive: Works on all device sizes
- React.js 18 - UI Library
- TypeScript - Type Safety
- CSS3 - Modern Styling
- Axios - HTTP Client
- Create React App - Build Tool
- .NET 8.0 - Runtime
- ASP.NET Core - Web Framework
- Entity Framework Core - ORM
- Swagger - API Documentation
- .NET Aspire - Orchestration
- Azure Container Apps - Hosting
- Azure App Configuration - Configuration Management
- Azure Key Vault - Secrets Management
- Azure Blob Storage - File Storage
- Azure SQL Database - Data Storage
- Dapr - Microservices Runtime
- Docker - Containerization
- YAML - Configuration as Code
- .NET Aspire - Local Development
- .NET 8.0 SDK
- Node.js 18+ and npm
- Docker Desktop
- Visual Studio 2022 or VS Code
-
Clone the repository
git clone <repository-url> cd aspire
-
Restore .NET packages
dotnet restore
-
Install React dependencies
cd DragonBallLibrary.Web npm install cd ..
-
Run with Aspire
cd DragonBallLibrary.AppHost dotnet run -
Access the applications
- Aspire Dashboard: http://localhost:15888
- API: http://localhost:5304
- Frontend: http://localhost:3000
Terminal 1 - API Service:
cd DragonBallLibrary.ApiService
dotnet runTerminal 2 - React Frontend:
cd DragonBallLibrary.Web
npm start| Method | Endpoint | Description |
|---|---|---|
GET |
/api/characters |
Get all characters |
GET |
/api/characters/{id} |
Get character by ID |
POST |
/api/characters |
Create new character |
PUT |
/api/characters/{id} |
Update character |
DELETE |
/api/characters/{id} |
Delete character |
GET |
/health |
Health check |
GET |
/swagger |
API documentation |
{
"id": 1,
"name": "Goku",
"race": "Saiyan",
"planet": "Earth",
"transformation": "Ultra Instinct",
"technique": "Kamehameha"
}# API Service
docker build -f DragonBallLibrary.ApiService/Dockerfile -t dragonball-api .
# React Frontend
docker build -f DragonBallLibrary.Web/Dockerfile -t dragonball-web .# Tag images
docker tag dragonball-api dragonballregistry.azurecr.io/dragonball-api:latest
docker tag dragonball-web dragonballregistry.azurecr.io/dragonball-web:latest
# Push images
docker push dragonballregistry.azurecr.io/dragonball-api:latest
docker push dragonballregistry.azurecr.io/dragonball-web:latest# Create environment
az containerapp env create \
--name dragonball-env \
--resource-group dragonball-rg \
--location eastus \
--dapr-enabled
# Deploy API service
az containerapp create \
--name dragonball-api \
--resource-group dragonball-rg \
--environment dragonball-env \
--image dragonballregistry.azurecr.io/dragonball-api:latest \
--target-port 8080 \
--ingress external \
--enable-dapr \
--dapr-app-id apiservice
# Deploy Web frontend
az containerapp create \
--name dragonball-web \
--resource-group dragonball-rg \
--environment dragonball-env \
--image dragonballregistry.azurecr.io/dragonball-web:latest \
--target-port 3000 \
--ingress externalThe project includes Dapr components for:
- State Store: Azure SQL Database for character persistence
- Secret Store: Azure Key Vault for secure configuration
- Configuration: Azure App Configuration for dynamic settings
- Bindings: Azure Blob Storage for character images
dapr/components/azure-sql.yaml- SQL Database state storedapr/components/azure-keyvault.yaml- Key Vault secretsdapr/components/azure-appconfig.yaml- App Configurationdapr/components/azure-blob-storage.yaml- Blob Storage bindings
- Database Connectivity: Entity Framework health check
- Azure Services: Connection validation
- Application Health: Custom health endpoints
- Structured Logging: JSON formatted logs
- Azure Monitor: Application Insights integration
- Dapr Observability: Built-in metrics and tracing
The Aspire dashboard provides:
- Service discovery and status
- Distributed tracing
- Metrics and telemetry
- Configuration management
βββ DragonBallLibrary.sln # Solution file
βββ DragonBallLibrary.AppHost/ # Aspire orchestration
β βββ AppHost.cs # Service definitions
β βββ appsettings.json # Configuration
βββ DragonBallLibrary.ApiService/ # .NET Web API
β βββ Data/ # Entity Framework context
β βββ Services/ # Business services
β βββ Program.cs # API startup
β βββ Dockerfile # Container config
βββ DragonBallLibrary.Web/ # React frontend
β βββ src/
β β βββ components/ # React components
β β βββ services/ # API services
β β βββ types/ # TypeScript types
β β βββ App.tsx # Main component
β βββ package.json # Dependencies
β βββ Dockerfile # Container config
βββ DragonBallLibrary.ServiceDefaults/ # Shared configuration
βββ dapr/ # Dapr components
β βββ components/ # Component definitions
βββ deploy/ # Deployment configs
βββ azure-container-apps/ # Azure Container Apps YAML
- Fork the repository
- Create a feature branch (
git checkout -b feature/new-character) - Make your changes
- Run tests and ensure build passes
- Commit changes (
git commit -am 'Add new character feature') - Push to branch (
git push origin feature/new-character) - Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Dragon Ball franchise by Akira Toriyama
- Microsoft .NET Aspire team
- Azure Container Apps team
- Dapr community
- React.js community
Built with β€οΈ for the Dragon Ball community and modern cloud-native development
