Skip to content

A lightweight Expense Tracker API built with .NET 10. Showcases Vertical Slice Architecture, MediatR, and Clean Coding practices.

Notifications You must be signed in to change notification settings

larkliy/ExpenseTracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Expense Tracker API

A simple, functional REST API for tracking personal expenses and incomes. This project was built as a pet project to explore modern .NET development patterns and is not intended for production use.

⚠️ Important Disclaimer

This application uses EF Core In-Memory Database.

  • Data is not persistent and will be cleared every time the application restarts.
  • It is designed for easy local testing without the need to set up a real SQL Server.
  • This project is for educational/demonstration purposes only.

πŸš€ Features

  • User Authentication: Register and login using ASP.NET Core Identity API.
  • Category Management: Create, update, and delete personal transaction categories.
  • Transaction Tracking: Log incomes and expenses with dates, amounts, and comments.
  • Statistics: Get monthly summaries including total balance, income/expense totals, and percentage breakdowns by category.
  • Validation: Automatic input validation using FluentValidation and MediatR behaviors.
  • Global Exception Handling: Consistent API responses for errors and business logic exceptions.

πŸ›  Tech Stack

  • Framework: .NET 10
  • Architecture: Vertical Slice Architecture
  • Patterns: MediatR (CQRS), Pipeline Behaviors
  • Database: Entity Framework Core (In-Memory provider)
  • Validation: FluentValidation
  • Documentation: Swagger/OpenAPI
  • Testing: xUnit, FluentAssertions (Unit Tests)

🚦 Getting Started

Prerequisites

Installation & Run

  1. Clone the repository:
    git clone https://github.com/larkliy/ExpenseTracker.git
  2. Navigate to the project folder:
    cd ExpenseTracker/ExpenseTracker
  3. Run the application:
    dotnet run
  4. Open your browser and navigate to http://localhost:5000 (or the port specified in the console) to view the Swagger UI.

πŸ§ͺ Running Tests

The project includes a suite of unit tests for handlers and validators. To run them:

dotnet test

πŸ“ License

This project is open-source and available under the MIT License.

About

A lightweight Expense Tracker API built with .NET 10. Showcases Vertical Slice Architecture, MediatR, and Clean Coding practices.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages