A production-quality, portfolio-ready WPF desktop application for managing customers and invoices β built with strict MVVM architecture, JSON file persistence, and professional PDF export. No database required.
- Total revenue, this month's revenue, paid/pending/overdue/draft counts
- 6-month revenue bar chart
- Customer and invoice summary stats
- Add, edit, delete customers with confirmation dialog
- Auto-incrementing unique IDs (never duplicated, even after deletion)
- Search by name, email, or phone
- Fields: Name, Phone, Email, Address, GST Number
- Form validation with
IDataErrorInfo
- Auto-generated invoice numbers in
INV-YYYY-0001format (yearly reset) - Select customer, add/remove line items with live total calculation
- Tax percentage input with real-time subtotal, tax, and grand total
- Status tracking: Draft β Pending β Paid β Overdue
- Notes field, date picker, full edit and delete support
- Filter by status, date range, and customer search
- Professional invoice PDF via QuestPDF
- Company header, customer details, itemized table, totals section
- Saved as
Invoice_<InvoiceNumber>.pdfand auto-opened on export
InvoiceApp/
β
βββ Models/
β βββ Customer.cs
β βββ Invoice.cs
β βββ InvoiceItem.cs
β βββ AppSettings.cs
β
βββ ViewModels/
β βββ MainViewModel.cs
β βββ CustomerViewModel.cs
β βββ InvoiceViewModel.cs
β βββ DashboardViewModel.cs
β
βββ Views/
β βββ MainWindow.xaml
β βββ DashboardView.xaml
β βββ CustomersView.xaml
β βββ InvoiceListView.xaml
β βββ InvoiceEditorView.xaml
β
βββ Services/
β βββ JsonDataService.cs
β βββ InvoiceNumberService.cs
β βββ PdfExportService.cs
β
βββ Helpers/
β βββ RelayCommand.cs
β βββ ViewModelBase.cs
β βββ Converters.cs
β
βββ Resources/
β βββ Styles.xaml
β
βββ Data/
βββ customers.json
βββ invoices.json
βββ settings.json
| Layer | Technology |
|---|---|
| Framework | .NET Framework 4.8 |
| Language | C# 7.3 |
| UI | WPF (Windows Presentation Foundation) |
| Pattern | MVVM (strict β no business logic in code-behind) |
| Persistence | JSON via Newtonsoft.Json |
| PDF Export | QuestPDF (Community License) |
| Threading | async/await for all file I/O |
- Windows 10 / 11
- Visual Studio 2019 or later (Community edition is free)
- .NET Framework 4.8 β pre-installed on most modern Windows machines
# Clone the repository
git clone https://github.com/gowtham2401/InvoiceApp.git
# Open in Visual Studio
start InvoiceApp.csproj- Open
InvoiceApp.csprojin Visual Studio - NuGet packages restore automatically on first build
- Press F5 to build and run
dotnet restore
dotnet build
dotnet runAll data is stored as human-readable JSON files in the Data/ folder alongside the executable:
| File | Contents |
|---|---|
customers.json |
All customer records |
invoices.json |
All invoice records with line items |
settings.json |
Invoice number sequence + company settings |
PDF exports are saved to an Exports/ folder next to the executable.
Invoices follow the format INV-YYYY-0001:
- Auto-increments on each new invoice
- Sequence resets to
0001each calendar year - Persisted across app restarts via
settings.json - Generated in the service layer β never in the UI
- Customer name is required
- Email format is validated
- Invoice must have at least one line item
- Quantity must be greater than 0
- Unit price cannot be negative
- Duplicate invoice numbers are prevented
bin/
βββ Debug/
βββ InvoiceApp.exe
βββ Data/
β βββ customers.json
β βββ invoices.json
β βββ settings.json
βββ Exports/
βββ Invoice_INV-2025-0001.pdf
Note:
bin/andobj/are generated on build and are excluded from source control. Theruntimes/folder insidebin/is placed there by QuestPDF and is required for PDF generation.
In Visual Studio: Build β Clean Solution
Manually: Delete bin/ and obj/ folders β they are safe to remove and will regenerate on the next build.
.gitignore (recommended):
bin/
obj/
Exports/
Dashboard
Customers
Invoice Editor
- Dark / Light theme toggle
- Company logo on PDF invoices
- Auto backup on exit
- Import / export JSON
- Print support
- Recent activity panel
Pull requests are welcome. For major changes, please open an issue first to discuss what you'd like to change.
This project is licensed under the MIT License.