🏗️ Build Real · Enterprise Project

ERP RFQ Module — Green Concrete Ltd.

Full ERP Request for Quotation module. Blazor WASM frontend, .NET 8 Clean Architecture API, Azure OpenAI mixture validation, QuestPDF output, role-based approval workflow.

Blazor WASM .NET 8 Azure OpenAI SQL Server QuestPDF MediatR Clean Architecture JWT Auth
8Steps
5Layers
40+Files
⬇ Download Project ZIP
BlazorClient WASM MudBlazor · TypedHttpClient · AuthStateProvider HTTP/REST + JWT WebApi · .NET 8 Thin Controllers · JWT Middleware · Swagger · Rate Limiting IMediator.Send() Application Layer MediatR · FluentValidation · DTOs · IRepository interfaces depends on implements Domain Entities · Enums · Value Objects State Machine · ZERO dependencies Infrastructure EF Core · Azure OpenAI · QuestPDF MailKit · Repository implementations Dependency Rule: all arrows point inward → Domain has no outbound dependencies
5-Layer Clean Architecture

Domain → Application → Infrastructure/WebApi → BlazorClient. Dependency rule enforced by project references. BlazorClient cannot reference Infrastructure — the compiler prevents it.

AI Integration

Azure OpenAI validates concrete mixture at submission. Returns structured JSON. Soft warnings + hard blocks based on OPC % ratio. temperature=0 for deterministic output.

Quotation State Machine

Draft → PendingApproval → Approved/Rejected → Cancelled. Invalid transitions throw InvalidOperationException. One place to read, one place to change.

1
Prerequisites

VS 2022 17.8+, .NET 8 SDK, SQL Server LocalDB, Azure OpenAI key.

dotnet --version dotnet tool install --global dotnet-ef

Expect: 8.0.x — if older, download .NET 8 SDK from dot.net

2
Clone & Restore

Download the ZIP, extract, and restore NuGet packages.

dotnet restore GreenConcrete.ERP.sln

All 5 projects restored. ~120 packages including MudBlazor, MediatR, QuestPDF, Azure.AI.OpenAI.

3
Configure appsettings

Add your Azure OpenAI credentials and DB connection string.

{ "AzureOpenAI": { "Endpoint": "https://YOUR.openai.azure.com/", "ApiKey": "YOUR_KEY_HERE", "DeploymentName": "gpt-4o" }, "ConnectionStrings": { "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=GreenConcreteERP;Trusted_Connection=True" } }
4
Run Migrations

Create and seed the database with 3 users, 15 companies, 30 quotations.

cd GreenConcrete.Infrastructure dotnet ef database update \ --startup-project ../GreenConcrete.WebApi

Creates 9 tables and seeds realistic Saudi construction data.

5
Start the API

Launch the WebApi project from its directory.

cd GreenConcrete.WebApi dotnet run

Swagger available at https://localhost:7001/swagger — test all endpoints with JWT auth.

6
Start Blazor Client

Open a second terminal and launch the WASM frontend.

cd GreenConcrete.BlazorClient dotnet run

App at https://localhost:7002 — Login: ahmed / ahmed123 (Salesperson) · khalid / khalid123 (Manager) · admin / admin123

8-Part Blog Series: ERP RFQ Module