The Diet Management System is a comprehensive application designed to help dietitians and clients manage diet plans, meals, and related data efficiently. This project is built using ASP.NET Core and follows a modular architecture.
- User Management: Role-based authentication and authorization for Admins, Dietitians, and Clients.
- Diet Plans: Create, update, delete, and retrieve diet plans.
- Meal Management: Manage meals associated with diet plans.
- API Versioning: Supports multiple API versions.
- Validation: Implements FluentValidation for input validation.
- Error Handling: Centralized error handling and logging using Sentry.
- Unit Testing: Comprehensive unit tests for controllers, repositories, and services.
- Backend: ASP.NET Core 9.0
- Database: MySQL with Entity Framework Core
- Authentication: ASP.NET Identity with JWT
- Logging: Sentry
- Mapping: AutoMapper
- Validation: FluentValidation
- Testing: xUnit, Moq, FluentAssertions
DietManagementSystem/
├── DietManagementSystem.Api # API project
├── DietManagementSystem.Application # Application layer
├── DietManagementSystem.Common # Shared utilities and constants
├── DietManagementSystem.Domain # Domain entities
├── DietManagementSystem.Infrastructure # Data access and services
├── DietManagementSystem.Tests # Unit tests
└── .vscode/ # VS Code settings
-
Clone the repository:
git clone https://github.com/Voyvodka/DietManagementSystem.git cd DietManagementSystem -
Set up the database:
- Update the connection string in
appsettings.jsonlocated inDietManagementSystem.Api/.
- Update the connection string in
-
Apply migrations:
dotnet ef database update --project DietManagementSystem.Infrastructure
-
Run the application:
dotnet run --project DietManagementSystem.Api
-
Access the API at
https://localhost:7171.
To run the unit tests, execute the following command:
dotnet testThe API documentation is available via Swagger. Once the application is running, navigate to:
https://localhost:7171/swagger
This project is licensed under the MIT License.
For any inquiries, please contact Samet Özkan.