A comprehensive .NET 9 system for monitoring order status changes in Supabase, generating professional PDFs with Arabic support, uploading to cloud storage, and sending WhatsApp notifications with PDF attachments.
A production-ready system built with clean architecture principles
Zero Warnings
Clean compilation
Latest Features
Modern syntax
Full DI Container
Service lifetimes
Docker Ready
Production deployment
Clean architecture with dependency injection and separation of concerns
Domain layer - No external dependencies
Models/ Interfaces/ Enums/ Configuration/
Application layer - Business logic implementation
BackgroundServices/ PdfGeneration/ Integration/
Presentation layer - Blazor Server UI
Pages/ Components/ Services/ Hubs/
Infrastructure layer - Composition root & DI setup
Program.cs appsettings.json wwwroot/
// Core Services builder.Services.AddSingleton<ISupabaseService, SupabaseService>(); builder.Services.AddSingleton<INotificationQueue, NotificationQueue>(); builder.Services.AddSingleton<IMetricsCollector, MetricsCollector>(); // Background Services builder.Services.AddHostedService<OrderMonitoringService>(); builder.Services.AddHostedService<NotificationProcessorService>(); // Integration Services builder.Services.AddScoped<IPdfGenerationService, PdfGenerationService>(); builder.Services.AddScoped<IWhatsAppService, WhatsAppService>(); // Blazor Dashboard builder.Services.AddRazorPages(); builder.Services.AddServerSideBlazor(); builder.Services.AddSignalR();
ISupabaseService - Database operationsIPdfGenerationService - PDF document creationIWhatsAppService - WhatsApp messagingINotificationQueue - Queue managementIMetricsCollector - Performance metricsIOrderTaskProcessor - Order processing logicOrderMonitoringService - Watches for order changesNotificationProcessorService - Processes notification queueIHostedService patternCancellationTokenSupabase Trigger
Real-time subscription
Task Processing
Status-based routing
PDF Generation
QuestPDF + Storage
Notification
WhatsApp + Retry
Everything you need for complete order automation
Monitors order status changes instantly using Supabase Realtime subscriptions.
Generates beautiful PDFs with QuestPDF, including full Arabic/RTL support.
Sends notifications via WAHA API with PDF attachments to all stakeholders.
Automatically uploads documents to Supabase Storage for secure access.
Real-time Blazor dashboard for monitoring, configuration, and queue management.
Docker deployment, health checks, structured logging, and resilient error handling.
Cutting-edge technologies powering a robust .NET ecosystem
Core Framework
Web UI
Real-time
Database
PDF Generation
Deployment
Resilience
Logging
UI Framework
API Docs
Monitoring
public class OrderMonitoringService : BackgroundService { protected override async Task ExecuteAsync(CancellationToken stoppingToken) { // Setup realtime subscription await SetupRealtimeSubscription(); // Process existing orders on startup await ProcessMissedOrders(); // Periodic check every 5 minutes using var timer = new PeriodicTimer(TimeSpan.FromMinutes(5)); } }
public void Compose(IDocumentContainer container) { container.Page(page => { page.DefaultTextStyle(x => x.FontFamily("Noto Sans Arabic")); page.ContentFromRightToLeft(); page.Header().Element(ComposeHeader); page.Content().Element(ComposeContent); page.Footer().Element(ComposeFooter); }); }
Domain models and business interfaces
Business logic and service implementations
User interface and admin controls
Application entry point and configuration
Experience the real-time dashboard and see the system in action
| Order # | Type | Status | Created | Actions |
|---|---|---|---|---|
|
No items in queue |
||||
Get up and running in minutes
# Clone the repository git clone https://github.com/ahmedalsamaani/daftar-dotnet.git cd daftar-dotnet/docker # Configure environment cp .env.example .env nano .env # Start services docker-compose up -d # View logs docker-compose logs -f daftar-order-processor
# Install .NET 9 SDK # https://dotnet.microsoft.com/download # Build the solution dotnet build # Run with dashboard dotnet run --project src/DaftarOrderProcessor.Host # Run tests dotnet test
Admin Dashboard
http://localhost:5000
Health Check
http://localhost:5000/health
WhatsApp API
http://localhost:3000
API Docs
http://localhost:5000/swagger
Areas for technical discussion and potential improvements
Order Detection
Real-time trigger
PDF Generation
Complex documents
Uptime Target
With retry logic
Orders/Hour
Scalable design
Let's collaborate to make this system even better
docker-compose up -d
dotnet test
localhost:8080