July 2024
PortionWise Backend
Tech stacks
.NET Core, C#, Entity Framework, SQLite, Xunit
Project Overview
This project is for the backend of PortionWise, an app that manages cooking receipe ingredient portions. It contains CRUD API endpoints for both recipes and ingredients, and integrated with a nutrition API to fetch and display nutritional information for each recipe based on ingredient portions.
Project structure
The project demonstrates a clean architecture implementation for a C# .NET backend with embedded Sqlite. The main components of this architecture are Controllers, Services, Repositories, Data Access Objects (DAOs), API, and different data models such as DTO, BO, Entity, and DL.
Unit test
The project reaches more than 80% testing coverage by using Xunit as the testing framework to perform unit tests on each method across the 4 component layers of the application, ensuring that both happy and unhappy pathes are validated.
Through this project, I learned how to ensure the separation of concerns and enhance the maintainability of the codebase, as well as how to implement auto-mapping to efficiently transfer data between models and layers.
Project link
View source code