Backend of a personal finance management web application built with Microsoft .NET SDK targeting .NET 6.0. Ensuring security through JSON Web Tokens (JWT) for user authentication and data protection.
See the frontend PersonalFinances-frontend
Clone the repository to your local machine:
git clone https://github.com/pedrojosawczuk/PersonalFinances-backend.gitNavigate to the local repository folder:
cd PersonalFinancesTo initialize a MariaDB instance, use the following command:
docker-compose upThe database is located in db.sql.
To compile and run the code, use the following command:
dotnet run --project PersonalFinances/PersonalFinances.csprojTo secure API endpoints, token-based authorization is employed. The authentication token must be included in the header of the JSON request. This token serves as proof of the user's identity and authorization to access protected resources. It is typically passed in the Authorization header of the HTTP request.
Here's an example of how to include the token in the request header:
POST {{URL}}/Transaction/
Content-Type: application/json
Authorization: {{JWT}}{
"description": "Electric Bill",
"value": 5.0,
"type": "I",
"date": "2023-04-10",
"fkCategory": 3
}More examples in the project's test folder.