voyvodka/DietManagementSystem

A .NET 8 backend API for managing diet plans, clients, and meals with role-based authentication

0stars
0forks
0watchers
0open issues
status: CORElanguage: C#branch: mainlicense: MIT Licenseupdated: 6/15/2025, 4:02:10 PMlast push: 4/13/2025, 5:27:22 PM

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.

Quality Gate Status Coverage Bugs Code Smells Vulnerabilities Security Rating Maintainability Rating Duplicated Lines (%)

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

  1. Clone the repository:

    git clone https://github.com/Voyvodka/DietManagementSystem.git
    cd DietManagementSystem
    
  2. Set up the database:

    • Update the connection string in appsettings.json located in DietManagementSystem.Api/.
  3. Apply migrations:

    dotnet ef database update --project DietManagementSystem.Infrastructure
    
  4. Run the application:

    dotnet run --project DietManagementSystem.Api
    
  5. Access 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.