voyvodka/DietManagementSystem
A .NET 8 backend API for managing diet plans, clients, and meals with role-based authentication
README Snapshot
Diet Management System
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.
Features
- 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.
Technologies Used
- 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
Project Structure
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
Getting Started
Prerequisites
Installation
Clone the repository:
git clone https://github.com/Voyvodka/DietManagementSystem.git cd DietManagementSystemSet 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.InfrastructureRun the application:
dotnet run --project DietManagementSystem.ApiAccess the API at
https://localhost:7171.
Running Tests
To run the unit tests, execute the following command:
dotnet test
API Documentation
The API documentation is available via Swagger. Once the application is running, navigate to:
https://localhost:7171/swagger
License
This project is licensed under the MIT License.
Contact
For any inquiries, please contact Samet Özkan.
Changelog
No CHANGELOG file or release notes found for this repository.
Releases
No releases found for this repository.