Igbayesile

Summary

A hotel reservation platform that simplifies booking for guests, managers, and staff. Users can search and reserve rooms, leave reviews, and complete secure payments. Managers can assign dedicated staff to manage their hotels, improving communication and efficiency. Staff can manage multiple hotels through a user-friendly interface. Managers and staff have access to detailed analytics dashboards (on a subdomain) to track hotels and rooms performance.

Backstory

I deeply explored backend development after spending some years and having professional experience in front-end development. I learned Node.js and Express.js using Jonas Schmedtmann's course. I then followed the backend roadmap on roadmap.sh. I made sure I learned more than 65% of all important concepts.

Project Overview

Igabyesile is a hotel reservation website that simplifies hotels' booking process. It's designed for guests, hotel managers, and hotel staff. On the home page, users can:

  • Search for hotels by name.

  • See top-rated hotels.

  • Find hotels nearby.

To make the website faster, I used Redis and HTTP headers (Cache-Control) to save information about top-rated and nearby hotels.

Key Features

User Account And Security

  • Users can make an account with their email and password.

  • Users receive email notifications when a new device logs in to their account.

  • Users can reset or update their password.

  • JWT tokens are used for authentication and authorization.

  • Extra security checks take place for sensitive actions.

Key takeaway: Learned about how to use JWTs to authenticate and Authorize users. I also learnt about how to work with sending emails.

Hotels And Rooms

  • Only managers can add new hotels. They give details like its name, description, what it offers, and pictures.

  • Managers can optionally choose a staff member to run the hotel.

  • A potential staff receives an email to either approve or reject a manager's invitation to manage their hotel.

  • Staff can manage as many hotels as possible.

Booking a Room

  • Anyone (guests, staff, or managers) can book a room

  • Users can only review hotels and rooms they've actually stayed in

  • A room isn't reserved until the payment is successful.

  • Paystack is used to handle payment.

  • Users see their booking details on their dashboard, whether successful or not.

  • Users can retry to book the hotel room if it initially failed.

Key takeaway: Learned about how to work with payment services

User Dashboard

Users have two dashboards:

  1. Main Dashboard:

    • Shows bookings for all users.

    • Users can manage their account settings here.

    • Managers can also see their hotels here.

  2. Special Dashboard (for managers and staff only):

Key takeaway: Learned about how to communicate with domain and subdomains especially with cookies.

Tools and Technologies I Used

  • Next.js: to build the frontend.

  • TailwindCSS and Shadcn: to style the frontend.

  • Express.js: to manage server.

  • Redis: to cache data.

  • MongoDB: to store data.

  • Docker: to manage the backend.

What I Learned

By building this full-stack hotel booking website, I learned about:

  • Caching data to improve user experience.

  • Authenticating and authorizing users.

  • Working with payment and email services.

  • Building APIs.

  • Working with domains, subdomains, and cookies.

  • Making different parts of a website work together.