An intelligent image analysis application leveraging Azure AI services to analyze images, generate enhanced descriptions, and create new images. Built with .NET 10 Unified Blazor Web App architecture and .NET Aspire for orchestration.
Production URL: TBD after deployment
PoImageGc demonstrates the power of AI-driven image analysis and generation. Users can upload images to receive detailed AI-generated descriptions and see new images created based on those descriptions.
- π Image Analysis: Azure Computer Vision powered analysis
- π Enhanced Descriptions: Azure OpenAI GPT-4 generated descriptions
- π¨ Image Regeneration: DALL-E powered image creation
- π Meme Generation: AI-generated captions with image overlay
- π Performance Metrics: Real-time processing time tracking
- π₯ Health Monitoring: Aspire health endpoints with OpenTelemetry
The application follows .NET 10 Unified Blazor Web App architecture with Vertical Slice organization:
src/
βββ PoImageGc.Web/ # Main Blazor Web App (Server)
β βββ Components/ # Blazor components (SSR default)
β βββ Features/ # Vertical slices
β βββ ImageAnalysis/ # Image analysis feature
β βββ ComputerVisionService.cs
β βββ OpenAIService.cs
β βββ MemeGeneratorService.cs
β βββ ImageAnalysisEndpoints.cs # Minimal APIs
βββ PoImageGc.Web.Client/ # Blazor WASM (Interactive)
βββ PoImageGc.AppHost/ # Aspire orchestration
βββ PoImageGc.ServiceDefaults/ # OpenTelemetry, health checks
βββ PoImageGc.Shared/ # DTOs and contracts
tests/
βββ PoImageGc.Tests.Unit/ # Unit tests
βββ PoImageGc.Tests.Integration/ # Integration tests
- Unified Blazor: Single project for both server-rendered and WASM components
- InteractiveAuto: SSR by default, interactive components where needed
- Vertical Slice: Feature-based organization, not layer-based
- Minimal APIs: No controllers, endpoints defined with
MapGroup - Aspire: Service orchestration, OpenTelemetry, health checks
- .NET 10.0 - Latest .NET with modern C# features
- Blazor Web App - Unified rendering (SSR + WASM)
- .NET Aspire 9.3 - Service orchestration and observability
- Central Package Management - Directory.Packages.props
- Azure Key Vault - Secret management (Production)
- Azure Computer Vision - Image analysis
- Azure OpenAI Service - GPT-4 descriptions, DALL-E generation
- Application Insights - Telemetry and monitoring
- OpenTelemetry - Traces, metrics, logs
- Serilog - Structured logging
- Application Insights - Azure integration
- xUnit - Test framework
- Moq - Mocking
- WebApplicationFactory - Integration testing
- .NET 10.0 SDK (10.0.100+)
- Azure Subscription with Computer Vision and OpenAI services
- VS Code with C# Dev Kit extension
git clone https://github.com/punkouter26/PoRedoImage.git
cd PoRedoImage
dotnet restore PoRedoImage.slnxCreate or update src/PoImageGc.Web/appsettings.Development.json:
{
"AzureOpenAI": {
"ApiKey": "your-key",
"Endpoint": "https://your-resource.openai.azure.com/",
"DeploymentName": "gpt-4",
"DalleDeploymentName": "dall-e-3"
},
"ComputerVision": {
"Key": "your-key",
"Endpoint": "https://your-resource.cognitiveservices.azure.com/"
}
}Option A: Direct (Web only)
cd src/PoImageGc.Web
dotnet runOption B: With Aspire AppHost
cd src/PoImageGc.AppHost
dotnet runOption C: VS Code F5
- Select "Launch Web (Direct)" or "Launch AppHost (Aspire)"
# All tests
dotnet test PoRedoImage.slnx
# Unit tests only
dotnet test tests/PoImageGc.Tests.Unit
# Integration tests only
dotnet test tests/PoImageGc.Tests.Integration
# With coverage
dotnet test PoRedoImage.slnx --collect:"XPlat Code Coverage"GET /health- Full health checkGET /alive- Liveness probe
GET /api/images/status- Service statusPOST /api/images/analyze- Analyze image
GET /openapi/v1.json- OpenAPI specGET /scalar/v1- Interactive API docs
| Project | Purpose |
|---|---|
PoImageGc.Web |
Main Blazor Web App, hosts API and UI |
PoImageGc.Web.Client |
WASM client for interactive components |
PoImageGc.AppHost |
Aspire orchestration host |
PoImageGc.ServiceDefaults |
Shared Aspire config (OpenTelemetry, health) |
PoImageGc.Shared |
DTOs shared between Web and Client |
PoImageGc.Tests.Unit |
Unit tests with xUnit |
PoImageGc.Tests.Integration |
Integration tests with WebApplicationFactory |
ASPNETCORE_ENVIRONMENT- Development/ProductionAZURE_KEY_VAULT_ENDPOINT- Key Vault URI (Production)
{
"Logging": { ... },
"AzureOpenAI": {
"ApiKey": "",
"Endpoint": "",
"DeploymentName": "gpt-4",
"DalleDeploymentName": "dall-e-3"
},
"ComputerVision": {
"Key": "",
"Endpoint": ""
},
"ApplicationInsights": {
"ConnectionString": ""
}
}Following copilot-instructions.md:
- Vertical Slice Architecture - Features in
/Features/{FeatureName}/ - Minimal APIs - No controllers, use
MapGroup - Central Package Management - All versions in Directory.Packages.props
- Test Naming -
MethodName_StateUnderTest_ExpectedBehavior - TDD Workflow - Red β Green β Refactor
- 80% Code Coverage - Target for business logic
MIT License - See LICENSE file for details.