Here is the translation in English:
This is a RESTful API built with ASP.NET Core and Entity Framework Core that provides a set of endpoints to manage your income, expenses, and get a monthly summary of your finances.
- Authentication: Supports user authentication using ASP.NET Core Identity with custom entities (
PersonWithAccessandAccessProfile). - Income Management:
- Create, list, search, update, and delete income.
- List income by a specific month/year.
- Expense Management:
- Create, list, search, update, and delete expenses.
- Categorize expenses (with a predefined default category).
- List expenses by a specific month/year.
- Monthly Summary:
- Get a complete financial summary for a specific month, including:
- Total income.
- Total expenses.
- Final balance.
- Spending by category.
- Get a complete financial summary for a specific month, including:
- Swagger Documentation: The API has complete interactive documentation using Swagger, available at
/swaggeron the project's root.
- Backend:
- C#
- ASP.NET Core 8
- Entity Framework Core
- Microsoft.AspNetCore.Identity
- Swashbuckle (for Swagger documentation)
- Database:
- SQL Server (with configuration via
appsettings.jsonor a direct connection string).
- SQL Server (with configuration via
- Tools:
- Visual Studio (or your preferred IDE).
- Git (for code versioning).
-
Clone the repository:
git clone https://github.com/Matchiga/MyMoney.git
-
Restore NuGet packages:
- Open the project in Visual Studio or use the
dotnet restorecommand in the project folder.
- Open the project in Visual Studio or use the
-
Configure the database:
- Update the connection string in the
appsettings.jsonfile or within theMDContextclass to point to your SQL Server instance. - Run the Entity Framework migrations to create the database:
dotnet ef database update
- Update the connection string in the
-
Run the application:
- Use the
dotnet runcommand or run the project from Visual Studio. - Access the Swagger documentation at:
https://localhost:7168/swagger(check the correct port inlaunchSettings.json).
- Use the
DAO<T>: A generic Data Access Object (DAO) class that provides basic CRUD methods to interact with the database.- Endpoints: Implemented using ASP.NET Core's Minimal APIs for better readability and conciseness.
- Authentication: The
/authendpoint (configured withMapIdentityApi) provides endpoints for user registration, login, and management. - Error Handling: Custom middleware to return more user-friendly error messages (status codes 401 and 403).
- Implement unit and integration tests.
- Add more robust data validation to the endpoints.
- Create a user interface (frontend) to interact with the API.
Contributions are welcome! Feel free to open issues to report bugs, request new features, or submit pull requests.