Skip to content

gowtham2401/InvoiceApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧾 Invoice Generator Pro

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.

.NET Framework WPF MVVM License


✨ Features

πŸ“Š Dashboard

  • Total revenue, this month's revenue, paid/pending/overdue/draft counts
  • 6-month revenue bar chart
  • Customer and invoice summary stats

πŸ‘₯ Customer Management

  • 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

🧾 Invoice Management

  • Auto-generated invoice numbers in INV-YYYY-0001 format (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

πŸ“„ PDF Export

  • Professional invoice PDF via QuestPDF
  • Company header, customer details, itemized table, totals section
  • Saved as Invoice_<InvoiceNumber>.pdf and auto-opened on export

πŸ—οΈ Architecture

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

πŸ› οΈ Tech Stack

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

πŸš€ Getting Started

Prerequisites

Installation

# Clone the repository
git clone https://github.com/gowtham2401/InvoiceApp.git

# Open in Visual Studio
start InvoiceApp.csproj
  1. Open InvoiceApp.csproj in Visual Studio
  2. NuGet packages restore automatically on first build
  3. Press F5 to build and run

Build via CLI

dotnet restore
dotnet build
dotnet run

πŸ’Ύ Data Storage

All 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.


πŸ”’ Invoice Numbering

Invoices follow the format INV-YYYY-0001:

  • Auto-increments on each new invoice
  • Sequence resets to 0001 each calendar year
  • Persisted across app restarts via settings.json
  • Generated in the service layer β€” never in the UI

πŸ”’ Validation

  • 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

πŸ“ Output Folders

bin/
└── Debug/
    β”œβ”€β”€ InvoiceApp.exe
    β”œβ”€β”€ Data/
    β”‚   β”œβ”€β”€ customers.json
    β”‚   β”œβ”€β”€ invoices.json
    β”‚   └── settings.json
    └── Exports/
        └── Invoice_INV-2025-0001.pdf

Note: bin/ and obj/ are generated on build and are excluded from source control. The runtimes/ folder inside bin/ is placed there by QuestPDF and is required for PDF generation.


🧹 Cleaning the Project

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/

πŸ“Έ Screenshots

Dashboard

image

Customers

image

Invoice Editor

image

πŸ—ΊοΈ Roadmap / Bonus Features

  • Dark / Light theme toggle
  • Company logo on PDF invoices
  • Auto backup on exit
  • Import / export JSON
  • Print support
  • Recent activity panel

🀝 Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you'd like to change.


πŸ“„ License

This project is licensed under the MIT License.


About

A WPF Invoice Generation Application is a desktop tool for creating and managing professional invoices with automatic tax and total calculations.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages