Skip to content

Expense Tracking application implementing DDD, Clean Arch. CQRS and best practices in DevOps lifecycle.

Notifications You must be signed in to change notification settings

sverdejot/expense-tracker

Repository files navigation

Expense Tracker

License: MIT example workflow

Description

Expense Tracker is a .NET WebAPI project built on Clean Architecture and Domain-Driven Design (DDD) principles. It provides a platform for managing expenses, allowing users to track their spending efficiently.

Introduction

Expense Tracker is built on top of DDD principles. Thus, it is divided into bounded-contexts, aggregates, entities and value objects.

Currently, only one bounded context is explored, which covers the end-user modeling and use cases. It can be modeled as:

Expense Tracker C4 diagram

Currently, it covers:

  • Expense: creating new expenses to track spending.
  • Budgets: create budget to track maximum spendings, being able to attach multiple types of alerts to this budgets. Expenses will automatically be included into every active Budget.
  • Groups: track shared spendings with multiple dividing options like percentages, equally and multi-currency.

Technologies

  • .NET 8.0
  • EntityFramework 8.0
  • CQRS:
    • MediatR
    • FluentValidations
    • Mapster
  • Testing
    • xUnit
    • FluentAssertions
    • Moq
    • AutoMock
  • CI/CD:
    • Docker
    • GitHub Actions

Installation

To set up the project, make sure you have .NET 8.0 SDK installed. Also, install Makefile by:

# Windows
choco install make

# macOS
brew install make

# Linux
apt install make

Then, run the following commands:

make install

Usage

Expense Tracker can be easily set up using Docker Compose. Follow these steps:

  1. Make sure you have Docker installed on your system.

  2. In the root directory of the project, run the following command to build and start the containers:

make start

Now you can access the OpenAPI Specification on http://localhost:5001/swagger

You can take a look at all the available commands by running make or make help at the root directory.

Contributing

This project uses conventional-commits as contributing standard. It enables ease of tracking changes as well as automatic SemVer and CHANGELOG.md generation. For all this purposes, it is using Versionize .NET Tool.

To enable automatic CHANGELOG and versioning generation, follow the following format:

<type>(<scope>): <message>

Where <type> can be one of the following:

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation changes
  • style: Code style changes (e.g., formatting)
  • refactor: Code refactoring
  • test: Adding or modifying tests
  • chore: Routine tasks, maintenance, etc.

Type any breaking change by adding a ! after (<scope>) and before semicolon:

<type>(<scope>)!: <message>

Author:

About

Expense Tracking application implementing DDD, Clean Arch. CQRS and best practices in DevOps lifecycle.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages