Skip to content

(In progress) A .NET 8 application implementing CQRS with MediatR, featuring JWT authentication, ASP.NET Core Identity for user management, and Entity Framework Core with a generic repository pattern. Includes Swagger for API documentation.

Notifications You must be signed in to change notification settings

Bubbelbad/Library-Management-System

Repository files navigation

Library Management - Clean Architecture 📚

This is a backend .NET 8 project for a library management application that manages digital books. The user can borrow and reserve digital books in different formats. It will be hosted on Azure and have a React FE application in the future.


Featuring:

  • CQRS with MediatR: Implements the Command Query Responsibility Segregation (CQRS) pattern using MediatR.
  • GitHub Actions: Automates your CI/CD pipeline with GitHub Actions for building, testing, and deploying your application.
  • Test Coverage (NUnit & FCC): Ensures code quality and reliability with comprehensive test coverage using NUnit and FluentAssertions.
  • ValidationBehavior with FluentValidation: Integrates FluentValidation to provide a clean and extensible way to handle validation logic within your application.
  • OperationResult: Standardizes the way results are returned from operations, encapsulating success and failure states along with relevant messages.
  • According to SOLID with Clean Code
  • JWT Token Authentication

 


Get Started

Prerequisites


Step 1: Clone the Repository

Clone the repository to your local machine:

  git clone https://github.com/Bubbelbad/Library-Management-System.git

Step 2: Restore Dependencies

Restore the project dependencies using the .NET CLI:

  dotnet restore

Step 3: Configure the Database

  1. Create a new appsettings.Development.json in API layer:
{
  "ConnectionStrings": {
    "DefaultConnection": "Server=YourServer\\SQLEXPRESS; Database=YourDatabaseName; Trusted_Connection=true; TrustServerCertificate=true;"
  },
  "JwtSettings": {
    "SecretKey": "your_super_long_very_secret_key_etc"
  },
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "AllowedHosts": "*"
}

Step 4: Apply Migrations

Use the following commands in the Developer PowerShell to update the database to the latest migration:

  $env:ASPNETCORE_ENVIRONMENT = "Development"
  cd ./Infrastructure
  dotnet ef database update --startup-project ../API

About

(In progress) A .NET 8 application implementing CQRS with MediatR, featuring JWT authentication, ASP.NET Core Identity for user management, and Entity Framework Core with a generic repository pattern. Includes Swagger for API documentation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published