This API, developed using .NET 8, adopts the principles of Domain-Driven Design (DDD) to provide a structured and effective solution for managing personal expenses. The main goal is to allow users to record their expenses, detailing information such as title, date and time, description, amount, and payment type, with the data securely stored in a MySQL database.
The API architecture is based on REST, using standard HTTP methods for efficient and simplified communication. It also includes Swagger documentation, offering an interactive graphical interface so that developers can easily explore and test the endpoints.
Among the NuGet packages used, AutoMapper is responsible for mapping between domain objects and request/response models, reducing the need for repetitive and manual code. FluentAssertions is used in unit tests to make assertions more readable, helping to write clear and understandable tests. For validations, FluentValidation is used to implement rules in a simple and intuitive way within request classes, keeping the code clean and easy to maintain. Lastly, EntityFramework acts as an ORM (Object-Relational Mapper) that simplifies database interactions, allowing .NET objects to manipulate data directly without the need to write raw SQL queries.
- Domain-Driven Design (DDD): Modular structure that facilitates understanding and maintaining the application domain.
- Unit Testing: Comprehensive tests using FluentAssertions to ensure functionality and quality.
- Report Generation: Ability to export detailed reports to PDF and Excel, offering effective visual analysis of expenses.
- RESTful API with Swagger Documentation: Documented interface that makes integration and testing easier for developers.
To get a local copy up and running, follow these simple steps.
- Visual Studio version 2022+ or Visual Studio Code
- Windows 10+ or Linux/MacOS with .NET SDK installed
- MySQL Server
-
Clone the repository:
git clone https://github.com/DionardoMarques/cashflow.git
-
Fill in the information in the
appsettings.Development.json
. -
Run the API and enjoy your testing 🚀