Invoicing App
AI-Powered .NET Aspire Invoice Management System AI Production Ready
📋 Project Overview
A complete, production-ready invoicing and customer management application built with .NET 10 Aspire. This project demonstrates a full-stack implementation combining:
- Backend API - Minimal APIs with JSON persistence
- Frontend - Interactive Blazor Web App with responsive UI
- Cloud-Native - .NET Aspire orchestration for modern app hosting
- AI Integration - MCP server for seamless LLM tool use
- PDF Generation - Professional invoice PDFs via QuestPDF
The entire application is AI-aware with a Model Context Protocol (MCP) server, enabling management through Claude, ChatGPT, or any LLM supporting MCP clients.
🎯 Key Features
-
👥
Customer Management - Create, read, update, delete customers with EU VAT ID validation
-
📄
Invoice Generation - Dynamic invoice creation with line items, tax calculations, and automatic numbering
-
📊
Data Persistence - JSON-based file storage with concurrent access handling via SemaphoreSlim
-
🖨️
PDF Export - Professional invoice PDFs generated server-side using QuestPDF library
-
🔐
Validation & Error Handling - Comprehensive input validation and graceful error responses
-
🤖
MCP Server - Model Context Protocol integration for AI-driven operations and complete LLM tool support
🏗️ Architecture
Project Structure
Built with three core projects in a single .NET Aspire solution:
.NET Aspire orchestration layer for service discovery and coordination
RESTful Minimal APIs with business logic and JSON data access
Interactive Blazor Web App for user-facing UI
Model Context Protocol server for LLM integration
Data Model
Customer- Company/individual information with EU VAT IDInvoice- Header with customer reference, dates, and totalsInvoiceLine- Line items with project reference, category, date range, amount, and tax rateSenderInfo- Configurable company details for invoice header (logo, address, bank info)
API Endpoints
GET/POST /api/customers- Customer CRUD operationsGET/POST /api/invoices- Invoice CRUD operationsGET /api/invoices/{id}/pdf- Generate and download invoice PDFGET /api/config/sender-info- Retrieve sender configuration
💡 Technology Stack
.NET Stack
.NET 10 ASP.NET Core Blazor Web App Minimal APIs
Infrastructure
.NET Aspire Service Discovery JSON Storage SemaphoreSlim
Libraries
QuestPDF System.Text.Json Data Annotations MCP Protocol
Integration
Claude/ChatGPT LLM Tools MCP Server REST API
🚀 Implementation Highlights
Cloud-Native with .NET Aspire
- Service discovery for seamless API-to-Web communication
- Modern distributed application patterns
- Ready for Azure Container Apps deployment
- Built-in observability and monitoring hooks
Data Persistence Strategy
- JSON files as single source of truth
- Organized structure:
db/customers.jsonanddb/invoices/ - Concurrent access protection using SemaphoreSlim
- Automatic backup-friendly file format
- No external database dependencies
PDF Generation
- QuestPDF library for professional invoice layouts
- Server-side rendering ensures consistency
- Configurable sender information in JSON
- Logo and branding integration support
- Real-time PDF generation on demand
AI Integration via MCP
- Complete Model Context Protocol server implementation
- Enable Claude, ChatGPT, and other LLMs to manage invoices
- Natural language commands for business operations
- Example: "Create invoice for Acme Corp with 3 line items totaling €1500"
- Seamless tool integration in AI conversations
Interactive Blazor UI
- Responsive design for mobile and desktop
- Real-time form validation
- Interactive Server render mode for optimal performance
- Customer and Invoice CRUD interfaces
- One-click PDF export functionality
🔄 Development Process
This project demonstrates a complete, real-world development workflow:
📐 Architecture First
Comprehensive planning document defining all layers, endpoints, and data models before implementation
🏗️ Modular Design
Clean separation of concerns: AppHost → API → Web, each with independent responsibility
✔️ Validation Ready
Built-in data validation, error handling, and graceful failure modes throughout
🔧 Production Patterns
Implements industry best practices for concurrency, persistence, and configuration management
💼 Use Cases
Freelancer/Small Business
- Manage client list with EU tax compliance
- Generate professional invoices quickly
- Export PDFs for email or printing
- JSON files for easy backup/archiving
AI-Powered Assistant
- Delegate invoicing to Claude via MCP
- Natural language commands: "Generate monthly invoices for all active customers"
- Automate routine tasks without manual UI interaction
- Keep conversations in context with LLM
Enterprise Integration
- REST API for third-party integration
- Deploy on Azure Container Apps with Aspire
- Scale microservices as needed
- Integrate with larger business systems
Learning & Demonstration
- Complete example of .NET 10 & Aspire best practices
- Blazor interactive component patterns
- JSON persistence strategy implementation
- MCP server development reference
🎓 What This Project Demonstrates
This invoicing application is a production-grade portofolio piece showcasing:
- ✅ Full-Stack Development - Backend, Frontend, and Infrastructure
- ✅ Modern .NET Skills - Aspire, Blazor, Minimal APIs, .NET 10
- ✅ Cloud-Native Architecture - Service-oriented design patterns
- ✅ AI Integration - MCP protocol and LLM tool development
- ✅ Business Logic - Real domain problems (tax, invoicing, customer management)
- ✅ Data Persistence - Strategic file management with concurrency
- ✅ Professional UI - Responsive, interactive Blazor interfaces
- ✅ Code Quality - Clean architecture, validation, error handling
📚 Project Status
This is a complete, production-ready application that has been architected, implemented, and refined. The codebase serves as an excellent reference for:
- How to structure a .NET 10 Aspire application
- Building MCP servers for LLM integration
- Creating professional business applications
- Implementing JSON-based persistence patterns
- Building interactive Blazor interfaces