Skip to content

Latest commit

 

History

History
147 lines (113 loc) · 3.97 KB

File metadata and controls

147 lines (113 loc) · 3.97 KB

MidnightLibrary-Back

A modern library management system backend built with ASP.NET Core using Minimal APIs.

Links Usefull

Project Overview

The MidnightLibrary-Back is a comprehensive backend solution providing APIs for library management, including:

  • User account management and authentication
  • Book catalog management
  • Category organization
  • Admin dashboard and analytics
  • User borrowing system

Technologies Used

  • ASP.NET Core (.NET 8.0/9.0)
  • Entity Framework Core
  • SQL Server
  • JWT Authentication
  • Minimal APIs architecture

Project Structure

MidnightLibrary-Back/
├── TeamLibrary.API/              # Main API project
│   ├── Data/                     # Data layer
│   │   ├── Configure/           # Entity configurations
│   │   ├── Context/             # EF Core DbContext
│   │   ├── Models/              # Domain entities
│   │   └── Repository/          # Data access layer
│   ├── Features/                # Feature-based endpoints
│   │   ├── Account/             # User authentication
│   │   ├── Admin/               # Admin features
│   │   ├── Book/               # Book management
│   │   └── Category/           # Category management
│   ├── Shared/                  # Shared components
│   │   ├── Contracts/          # Interfaces
│   │   ├── Middleware/         # Custom middleware
│   │   ├── Models/             # Shared models
│   │   └── Service/           # Common services
│   └── wwwroot/                # Static files
└── TeamLibrary.sln             # Solution file

Prerequisites

  1. Development Tools:

    • Visual Studio 2022/2023 or VS Code
    • .NET SDK 8.0 or later
    • SQL Server (LocalDB or higher)
  2. Required NuGet Packages:

    • Microsoft.EntityFrameworkCore
    • Microsoft.EntityFrameworkCore.SqlServer
    • Microsoft.AspNetCore.Authentication.JwtBearer

Getting Started

  1. Clone the repository:
git clone https://github.com/CsharpGalexy/MidnightLibrary-Back.git
cd MidnightLibrary-Back
  1. Configure the database:

    • Open TeamLibrary.API/appsettings.json
    • Update the connection string for your SQL Server instance
  2. Apply database migrations:

cd TeamLibrary.API
dotnet ef database update
  1. Build and run:
dotnet build
dotnet run --project TeamLibrary.API

API Features

Account Management

  • User registration and login
  • Password reset functionality
  • User profile management
  • JWT token authentication

Book Management

  • Create, read, update, and delete books
  • Search and filter books
  • Get new arrivals and top-rated books
  • Category-based book browsing

Admin Features

  • Dashboard with analytics
  • User management
  • Book inventory control
  • Category management
  • System statistics

Category System

  • Hierarchical category management
  • Category-based navigation
  • Category statistics

Development Guidelines

  1. Architecture

    • Follow minimal API patterns
    • Use repository pattern for data access
    • Implement proper separation of concerns
  2. Code Style

    • Follow C# coding conventions
    • Use async/await for asynchronous operations
    • Implement proper error handling
  3. Database

    • Use migrations for schema changes
    • Follow EF Core best practices
    • Maintain data consistency

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

See the LICENSE file for details.

Support

For support, please open an issue in the repository's issue tracker.