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
