Skip to content

mahmoudgamal245/MVC.bookifyapp.aspdotnet

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

22 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š Bookify - Advanced Book Rental Management System

.NET Core EF Core Build Status Maintenance

Bookify Logo

graph TD
    A[Client] -->|HTTP| B(Web Application)
    B --> C{Authentication}
    C -->|Admin| D[Book Management ,Rental Management]
    C -->|Admin| E[Rental Management]
    C -->|User| F[View Books]
    C -->|User| G[Rent Books]
    B --> H[Hangfire Dashboard]
    H -->|Scheduled Jobs| I[Background Tasks]
    I --> J[Email Notifications]
    I --> K[WhatsApp Notifications]
    B --> L[Serilog Logging]
    M[(Database SQL)] --> B
    M --> H
    N[Role Management] --> C
Loading

πŸ“‹ Overview

Bookify is an enterprise-grade book rental management system designed to streamline library operations and enhance user experience. The system provides comprehensive solutions for book inventory management, subscriber handling, rental processing, and administrative operations.

Key Benefits

  • 🎯 Streamlined rental operations
  • πŸ“Š Advanced reporting and analytics
  • πŸ” Secure user authentication
  • πŸ“± Modern, responsive interface
  • πŸ”„ Real-time updates
  • πŸ“ˆ Scalable architecture

πŸ— System Architecture

Bookify is a robust ASP.NET Core web application designed for managing book rentals. It features user authentication, book management, and an automated rental system. With integrated Hangfire for background jobs, Serilog for logging, and support for WhatsApp and email notifications, Bookify offers a comprehensive solution for libraries or book rental services.

πŸ“š Core Features

Book Management

  • πŸ“– Inventory tracking
  • 🏷️ Categorization
  • πŸ“Έ Image management
  • πŸ“Š Stock monitoring

Rental System

  • πŸ”„ Rental processing
  • ⏰ Due date management
  • πŸ’° Fine calculation
  • πŸ“± SMS/WhatsApp notifications

User Management

  • πŸ‘₯ Role-based access
  • πŸ” Secure authentication
  • πŸ“§ Email verification
  • πŸ‘€ Profile management

πŸ”§ Technology Stack

  • Backend Framework: ASP.NET Core 8.0
  • ORM: Entity Framework Core
  • Database: SQL Server
  • Authentication: ASP.NET Core Identity
  • Frontend:
    • Bootstrap
    • jQuery
    • javascript for Ajax calls
    • DataTables "both client and server"
  • File Storage: Cloudinary ,
  • Background Jobs: Hangfire
  • Mapping: AutoMapper, manual mapping
  • WhatsApp API (via IWhatsAppClient)

πŸ” Security

Authentication

  • ASP.NET Core Identity
  • Custom claim providers
  • User Management: Complete user lifecycle management
  • Password Hashing: Secure password storage using industry-standard hashing
  • Account Confirmation: Email verification system
  • Password Recovery: Secure password reset functionality

Authorization

1. Role-Based Access Control (RBAC)

public static class AppRoles
{
    public const string Admin = "Admin";
    public const string Reception = "Reception";
    public const string Archive = "Archive";
    public const string User = "User";
}

// Controller-level authorization
[Authorize(Roles = AppRoles.Reception)]
public class RentalsController : Controller
{
    // Only the Reception role can access this controller
}

// Action-level authorization
[Authorize(Roles = $"{AppRoles.Admin},{AppRoles.Archive}")]
public IActionResult ManageBooks()
{
    // Only Admin and Archive roles can access this action
}

Data Protection

using Data protection that built in library .NET using extra package "hashids"

Security Best Practices

  • HTTPS Enforcement: All communications are encrypted using SSL/TLS
  • Anti-forgery Tokens: Protection against CSRF attacks
  • XSS Prevention: Content security policies and input sanitization
  • SQL Injection Prevention: Use of parameterized queries and EF Core
  • Secure Headers: Implementation of security headers (HSTS, X-Frame-Options, etc.)
  • Audit Logging: Tracking of security-relevant events

Getting Started

Prerequisites

  • .NET 8.0 SDK
  • SQL Server
  • Visual Studio 2022 (recommended) or VS Code

Installation

  1. Clone the repository

    git clone https://github.com/mohamedelsaid056/MVC.bookifyapp.aspdotnet
    
  2. Navigate to the project directory

    cd Bookify
    
  3. Restore dependencies

    dotnet restore
    
  4. Update the connection string in appsettings.json to point to your database

  json
{
"CloudinarySettings": {
"Cloud": "your_cloud_name",
"ApiKey": "your_api_key",
"ApiSecret": "your_api_secret"
},
"MailSettings": {
// Configure your email settings
}
}
  1. Apply migrations to create the database

    dotnet ef database update
    
  2. Run the application

    dotnet run
    

Configuration

  • The application uses appsettings.json for configuration. Make sure to update any necessary settings, such as connection strings, API keys, etc.
  • Serilog is configured to read from the configuration file.
  • Hangfire dashboard is accessible at /hangfire and is restricted to admin users only.

Glimpse of the working solution

Demo Link: -http://mohamedbookifyapp1.runasp.net/

username : [email protected]

password : P@ssword123

1

2

3

user

search

report

Made with ❀️ by the Bookify Team

About

πŸ“š Bookify - Advanced Book Rental Management System

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 44.5%
  • C# 44.5%
  • JavaScript 8.7%
  • CSS 1.2%
  • SCSS 1.1%