API developed using .NET 8, follows the principles of Domain-Driven Design (DDD) to provide a structured and efficient 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. Additionally, it includes Swagger documentation, offering an interactive graphical interface for developers to explore and test the endpoints easily.
Among the NuGet packages used, AutoMapper handles the mapping between domain and request/response objects, 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. Finally, EntityFramework acts as an ORM (Object-Relational Mapper) that simplifies database interactions, allowing the use of .NET objects to manipulate data directly without having to deal with raw SQL queries.
- Domain-Driven Design (DDD): Modular structure that makes the application's domain easier to understand and maintain.
- Unit Testing: Comprehensive tests using FluentAssertions to ensure functionality and quality.
- Report Generation: Ability to export detailed reports to PDF and Excel, providing effective visual analysis of expenses.
- RESTful API with Swagger Documentation: Documented interface that simplifies integration and testing for developers.
- Windows, Linux or macOS with the .NET SDK installed
- Visual Studio 2022+, Visual Studio Code or JetBrains Rider
- MySQL
-
Clone the repository:
git clone https://github.com/matheushfp/cashflow.git
-
Fill in the necessary details in the
appsettings.Development.jsonfile. -
Run the API and start testing it out! :)