Skip to content

amrnabih113/Bookify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

36 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏨 Bookify - Hotel Room Booking System

DEPI Graduation Project .NET 8.0 ASP.NET Core Entity Framework

Bookify is a comprehensive hotel room booking management system developed as a graduation project for the Digital Egypt Pioneers Initiative (DEPI) program. This web application provides a seamless experience for users to browse, book, and manage hotel room reservations, while offering administrators powerful tools to manage the entire booking ecosystem.


πŸ“‹ Table of Contents


✨ Features

πŸ” User Management

  • User Registration & Authentication: Secure user registration and login system with ASP.NET Core Identity
  • Google OAuth Integration: Quick sign-in with Google accounts
  • Role-Based Access Control: Admin and User roles with different permissions
  • Profile Management: Users can manage their profiles and preferences

🏨 Room Management

  • Room Browsing: Browse available rooms with detailed information
  • Room Types: Multiple room types (Single, Double, Suite, Deluxe, etc.)
  • Room Amenities: View and filter rooms by amenities (WiFi, TV, AC, etc.)
  • Room Images: Multiple images per room with gallery view
  • Price Management: Dynamic pricing with discount support
  • Room Availability: Real-time availability checking

πŸ“… Booking System

  • Online Booking: Easy-to-use booking interface with date selection
  • Booking Management: Users can view, manage, and cancel their bookings
  • Payment Integration: Multiple payment methods support
  • Payment Status Tracking: Track payment status (Pending, Confirmed, Cancelled)
  • Booking History: Complete booking history for users
  • Date Validation: Prevents double bookings and validates date ranges

⭐ Reviews & Ratings

  • Room Reviews: Users can leave reviews and ratings for rooms
  • Review Management: View and manage all reviews

❀️ Favorites System

  • Wishlist: Users can add rooms to their favorites for easy access
  • Favorite Management: View and manage favorite rooms

πŸ‘¨β€πŸ’Ό Admin Panel

  • Dashboard: Comprehensive admin dashboard with statistics
  • Room Management: Add, edit, and delete rooms
  • Booking Management: View and manage all bookings
  • User Management: Manage user accounts and roles
  • Amenity Management: Manage room amenities
  • Room Type Management: Create and manage room types

πŸ“± Additional Features

  • Responsive Design: Mobile-friendly interface
  • Contact Form: Contact page for user inquiries
  • About Page: Information about the hotel
  • Static File Caching: Optimized performance with browser caching
  • Email Notifications: Email sender service for notifications
  • Database Seeding: Automatic data seeding for quick setup

πŸ›  Technology Stack

Backend

  • Framework: ASP.NET Core 8.0 (MVC)
  • Language: C# 12
  • ORM: Entity Framework Core 8.0
  • Database: SQL Server
  • Authentication: ASP.NET Core Identity
  • OAuth: Google OAuth 2.0

Frontend

  • UI Framework: Bootstrap 5
  • JavaScript: jQuery
  • Validation: jQuery Validation
  • Icons: Font Awesome / Bootstrap Icons
  • CSS: Custom CSS with Bootstrap

Architecture & Patterns

  • Pattern: Repository Pattern
  • Dependency Injection: Built-in ASP.NET Core DI
  • Service Layer: Separation of business logic
  • View Models: Data transfer objects for views
  • Custom Validation: Attribute-based validation

Development Tools

  • IDE: Visual Studio 2022 / Visual Studio Code
  • Version Control: Git & GitHub
  • Package Manager: NuGet

πŸ“¦ Prerequisites

Before you begin, ensure you have the following installed:


πŸš€ Installation

1. Clone the Repository

git clone https://github.com/amrnabih113/Bookify.git
cd Bookify

2. Navigate to Project Directory

cd Bookify/Bookify

3. Restore NuGet Packages

dotnet restore

βš™οΈ Configuration

1. Update Connection String

Open appsettings.json and update the connection string to point to your SQL Server instance:

{
  "ConnectionStrings": {
    "DefaultConnection": "Server=.;Database=Bookify_DB;Integrated Security=True;Connect Timeout=30;Encrypt=False;Trust Server Certificate=True;"
  }
}

Connection String Options:

  • LocalDB: Server=(localdb)\\mssqllocaldb;Database=Bookify_DB;Trusted_Connection=True;
  • SQL Server Express: Server=.\\SQLEXPRESS;Database=Bookify_DB;Integrated Security=True;
  • SQL Server: Server=localhost;Database=Bookify_DB;Integrated Security=True;

2. Configure Google OAuth (Optional)

If you want to enable Google authentication, update the following section in appsettings.json:

{
  "Authentication": {
    "Google": {
      "ClientId": "your-google-client-id",
      "ClientSecret": "your-google-client-secret"
    }
  }
}

How to get Google OAuth credentials:

  1. Go to Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable Google Identity Services (OAuth 2.0)
  4. Create OAuth 2.0 credentials (OAuth client ID)
  5. Add authorized redirect URI: https://localhost:5001/signin-google

πŸ’Ύ Database Setup

Automatic Setup (Recommended)

The application automatically creates and seeds the database on first run. Simply run the application:

dotnet run

The application will:

  1. Create the database if it doesn't exist
  2. Apply all migrations
  3. Seed initial data (roles, admin account, room types, rooms, amenities)

Manual Setup (Optional)

If you prefer manual setup or need to reset the database:

# Create a new migration
dotnet ef migrations add InitialCreate

# Update the database
dotnet ef database update

Database Seeding

The application seeds the following data automatically:

  • Roles: Admin, User
  • Admin Account: [email protected] / Admin@123
  • Room Types: Single, Double, Suite, Deluxe, etc.
  • Amenities: WiFi, TV, AC, Mini Bar, etc.
  • Sample Rooms: Multiple rooms with images and amenities

🎯 Usage

Running the Application

  1. Using Visual Studio:

    • Open Bookify.sln
    • Press F5 or click the "Run" button
  2. Using .NET CLI:

    dotnet run
  3. Using Visual Studio Code:

    dotnet watch run

The application will start on:

First Steps

  1. Access the Application: Navigate to https://localhost:5001
  2. Register a User: Create a new user account or use Google sign-in
  3. Browse Rooms: Explore available rooms and their details
  4. Make a Booking: Select dates and book a room
  5. Admin Access: Login with admin credentials to access the admin panel

πŸ“ Project Structure

Bookify/
β”œβ”€β”€ Controllers/           # MVC Controllers
β”‚   β”œβ”€β”€ AccountController.cs      # Authentication & user management
β”‚   β”œβ”€β”€ AdminController.cs        # Admin panel operations
β”‚   β”œβ”€β”€ BookingController.cs      # Booking management
β”‚   β”œβ”€β”€ FavoriteController.cs     # Favorites management
β”‚   β”œβ”€β”€ HomeController.cs         # Home, About, Contact pages
β”‚   β”œβ”€β”€ ReviewController.cs       # Review management
β”‚   └── RoomController.cs         # Room browsing & details
β”œβ”€β”€ Models/                # Data Models
β”‚   β”œβ”€β”€ Amenity.cs
β”‚   β”œβ”€β”€ ApplicationUser.cs
β”‚   β”œβ”€β”€ Booking.cs
β”‚   β”œβ”€β”€ Favorite.cs
β”‚   β”œβ”€β”€ Review.cs
β”‚   β”œβ”€β”€ Room.cs
β”‚   β”œβ”€β”€ RoomAmenity.cs
β”‚   β”œβ”€β”€ RoomImage.cs
β”‚   β”œβ”€β”€ RoomType.cs
β”‚   └── ViewModels/        # View Models for data transfer
β”œβ”€β”€ Views/                 # Razor Views
β”‚   β”œβ”€β”€ Account/           # Login, Register, Profile views
β”‚   β”œβ”€β”€ Admin/             # Admin panel views
β”‚   β”œβ”€β”€ Booking/           # Booking views
β”‚   β”œβ”€β”€ Home/              # Home, About, Contact views
β”‚   β”œβ”€β”€ Room/              # Room listing & details views
β”‚   └── Shared/            # Shared layouts & partials
β”œβ”€β”€ Data/                  # Database Context & Seeders
β”‚   β”œβ”€β”€ ApplicationDbContext.cs
β”‚   └── IdentitySeeder.cs
β”œβ”€β”€ Repository/            # Repository Pattern Implementation
β”‚   β”œβ”€β”€ IGenericRepository.cs
β”‚   β”œβ”€β”€ GenericRepository.cs
β”‚   β”œβ”€β”€ IRoomRepository.cs
β”‚   β”œβ”€β”€ RoomRepository.cs
β”‚   β”œβ”€β”€ IFavoriteRepository.cs
β”‚   └── FavoriteRepository.cs
β”œβ”€β”€ services/              # Business Logic Layer
β”‚   β”œβ”€β”€ IServices/         # Service interfaces
β”‚   β”œβ”€β”€ BookingService.cs
β”‚   β”œβ”€β”€ AmenityService.cs
β”‚   β”œβ”€β”€ RoomService.cs
β”‚   β”œβ”€β”€ RoomTypeService.cs
β”‚   └── FavoriteService.cs
β”œβ”€β”€ Custom Validation/     # Custom validation attributes
β”œβ”€β”€ wwwroot/               # Static files
β”‚   β”œβ”€β”€ css/               # Stylesheets
β”‚   β”œβ”€β”€ js/                # JavaScript files
β”‚   β”œβ”€β”€ images/            # Images & room photos
β”‚   └── lib/               # Client-side libraries
β”œβ”€β”€ Migrations/            # EF Core Migrations
β”œβ”€β”€ SQL_Scripts/           # SQL scripts for database
β”œβ”€β”€ appsettings.json       # Application configuration
└── Program.cs             # Application entry point

πŸ”‘ Default Credentials

Admin Account

Note: Please change the default admin password after first login for security reasons.


πŸ‘₯ Team Members

This project was developed as part of the DEPI (Digital Egypt Pioneers Initiative) graduation project.

Development Team:

Project Supervisor: DEPI Program

Institution: Digital Egypt Pioneers Initiative (DEPI)


🀝 Contributing

We welcome contributions to improve Bookify! Here's how you can help:

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

Code Standards

  • Follow C# coding conventions
  • Write meaningful commit messages
  • Add comments for complex logic
  • Ensure all tests pass before submitting
  • Update documentation as needed

πŸ“„ License

This project is developed as part of the DEPI graduation requirements. All rights reserved to the development team and DEPI program.


πŸ“§ Contact & Support

For questions, feedback, or support:


πŸ™ Acknowledgments

  • Digital Egypt Pioneers Initiative (DEPI) for providing the opportunity and support
  • ASP.NET Core Community for excellent documentation and resources
  • All contributors who helped make this project possible

πŸ“Έ Screenshots

Coming soon - Screenshots of the application will be added here


Made with ❀️ by the Bookify Team

Β© 2024 Bookify - DEPI Graduation Project

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5