Skip to content

prashant1177/hotelbooking

Repository files navigation

Hotel Booking Platform - A Full-Stack Project

Introduction

This project is a hotel booking platform where users can search for hotels, make bookings, and view booking details. Hotel owners can list, edit, and manage their properties while ensuring that already booked dates are blocked. The platform provides a seamless experience for both users and hotel owners, making it a practical and fully usable web application.


Technologies and Tools Used

Backend Development

  • Node.js - JavaScript runtime that powers the backend.
  • Express - A minimal web framework for Node.js to handle routing and middleware.
  • Express Sessions - Used for session management, allowing users to remain logged in.
  • Mongoose - An ODM (Object Data Modeling) library for MongoDB that simplifies database interactions.
  • MongoDB - A NoSQL database used for storing application data.
  • REST API - Implemented for smooth communication between frontend and backend.

Authentication & File Handling

  • Passport.js - Handles user authentication efficiently.
  • Multer - Used for uploading images (e.g., hotel images) to the server.

Frontend Development

  • EJS (Embedded JavaScript) - A templating engine that dynamically renders HTML pages.
  • Bootstrap - A frontend framework used for styling and responsive design.
  • Google Fonts - Enhances typography and visual appeal.

Deployment & Version Control

  • GitHub - Used for version control and project collaboration.
  • Vercel - A deployment platform used to host the project.

Project Structure - Model-View-Controller (MVC)

The project follows the Model-View-Controller (MVC) design pattern, ensuring a well-structured and maintainable codebase:

  • Model: Manages data and business logic.
  • View: Handles the user interface and presentation.
  • Controller: Processes user input and connects the Model and View.

Purpose of This Project

I wanted to demonstrate my ability to build a complete, fully functional website from scratch. This project showcases:

  • My backend and frontend development skills.
  • Effective database management and structuring.
  • The importance of a well-organized file structure.

Beyond being a portfolio piece, I wanted this to be a real, usable website with just a few modifications like proper server hosting.


What Makes This Project Unique?

Many portfolio projects are mere demonstrations, but I ensured that this platform is fully usable.

  • Users can book hotels, and booked dates are automatically blocked to prevent double bookings.
  • A confirmation details section provides users and hotel owners with booking information.
  • The site includes fully functional features like hotel listings, editing, and real-time availability updates.

Lessons Learned

Since this is one of my early projects, I gained valuable insights into:

  • The importance of small details in app development and design.
  • Working with new technologies like Multer, Vercel deployment, and .env file management.
  • How crucial file structuring is for maintaining a scalable project.
  • Strengthening my existing skills by applying them in a real-world project.

Key Features

User Features:

✅ Sign Up & Login
✅ Search hotels by location & price
✅ Book hotels
✅ View booking details

Owner Features:

✅ Add, edit, and remove hotel listings
✅ View booked hotels and booking details
✅ Manage hotel availability

Admin Features:

✅ Manage users and hotel listings
✅ Oversee overall bookings


Future Improvements

This is just the beginning! I plan to improve and expand its features in future iterations by:

  • Enhancing UI/UX design for better user experience.
  • Implementing real-time notifications for booking updates.
  • Improving performance and scalability with optimized queries and cloud hosting.

This project is not just a showcase—it's a real, functional application that can be expanded into a fully-fledged booking system!

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors