Skip to content

Antwa-sensei253/WebBooks

Repository files navigation

WebBooks

A .NET web application for book management built using ASP.NET MVC architecture and design patterns.

Overview

WebBooks is a comprehensive book management system developed with ASP.NET. The application implements various design patterns including Model-View-Controller (MVC), Repository Pattern, and Dependency Injection to create a maintainable and scalable codebase.

Features

  • Book Management: Add, edit, delete, and view book entries
  • Category Organization: Organize books by categories and genres
  • User Authentication: Secure login and registration system
  • Role-based Authorization: Different access levels for users and administrators
  • Search Functionality: Find books by title, author, ISBN, or other parameters
  • Responsive UI: Bootstrap-based interface that works on multiple devices

Technologies Used

  • Backend:

    • ASP.NET Core MVC
    • Entity Framework Core
    • C#
    • LINQ
  • Frontend:

    • Razor Views
    • Bootstrap
    • JavaScript/jQuery
    • CSS3
  • Database:

    • SQL Server/SQL Server Express
  • Design Patterns:

    • Repository Pattern
    • Dependency Injection
    • MVC Architecture

Project Structure

The solution follows a clean architecture approach:

WebBooks/
├── WebBooks/              # Main ASP.NET project
│   ├── Controllers/       # MVC Controllers
│   ├── Models/            # Domain models
│   ├── Views/             # Razor views
│   ├── Data/              # Database context and migrations
│   ├── Repositories/      # Repository implementation
│   ├── Services/          # Business logic services
│   └── wwwroot/           # Static files (CSS, JS, images)
│
├── WebBooks.Core/         # Core domain project
│   ├── Entities/          # Domain entities
│   ├── Interfaces/        # Repository interfaces
│   └── Services/          # Service interfaces
│
├── WebBooks.Infrastructure/  # Infrastructure concerns
│   ├── Data/              # Data access implementation
│   ├── Repositories/      # Repository implementations
│   └── Services/          # Service implementations
│
└── WebBooks.Tests/        # Unit and integration tests

Prerequisites

  • .NET 6.0 SDK or later
  • SQL Server/SQL Server Express
  • Visual Studio 2022 or Visual Studio Code

Installation

  1. Clone the repository:
git clone https://github.com/Antwa-sensei253/WebBooks.git
cd WebBooks
  1. Restore dependencies:
dotnet restore
  1. Update the database connection string in appsettings.json

  2. Apply database migrations:

dotnet ef database update
  1. Run the application:
dotnet run --project WebBooks

Configuration

Update the appsettings.json file with your specific configurations:

  • Database connection string
  • Authentication settings
  • Logging preferences
  • Any custom application settings

Development

  1. Open the solution in Visual Studio or Visual Studio Code

  2. For Visual Studio:

    • Right-click on the WebBooks project
    • Select "Set as Startup Project"
    • Press F5 to start debugging
  3. For Visual Studio Code:

    • Open the WebBooks folder
    • Use the .NET Core launch configuration
    • Start debugging with F5

Database Migrations

To create a new migration after model changes:

dotnet ef migrations add MigrationName
dotnet ef database update

Testing

Run the tests with:

dotnet test

Deployment

  1. Publish the application:
dotnet publish -c Release
  1. Deploy to your preferred hosting platform:
    • Azure App Service
    • IIS on Windows Server
    • Docker container

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/new-feature
  3. Commit your changes: git commit -m 'Add new feature'
  4. Push to the branch: git push origin feature/new-feature
  5. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

Project created and maintained by Antwa-sensei253

For questions or support, please open an issue on the GitHub repository.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors