A modern Full Stack Accommodation Booking Platform built using React.js, Node.js, Express.js, and MySQL. EZStay allows users to explore accommodations across multiple cities while providing a secure admin dashboard for managing cities and stays.
EZStay is a full-stack accommodation booking platform designed to simulate a real-world hotel and stay booking experience.
Users can browse available cities, explore accommodations, and view stay details through an intuitive and responsive interface. Administrators have access to a secure dashboard where they can manage cities and accommodation listings.
The project demonstrates complete frontend-backend integration, RESTful API development, JWT-based authentication, role-based authorization, MySQL database management, and responsive UI development.
It serves as a practical implementation of modern full-stack web development concepts using the MERN-inspired architecture with a MySQL relational database.
- User Registration
- Secure Login using JWT Authentication
- Browse Available Cities
- Explore Available Stays
- View Stay Details
- Responsive User Interface
- Secure Admin Login
- Add New Cities
- Delete Cities
- Add New Accommodation Listings
- Delete Accommodation Listings
- Protected Admin Dashboard
- Role-Based Authorization
- JWT Authentication
- Password Hashing using BCrypt
- Protected Routes
- Role-Based Access Control
- Secure API Communication
- MySQL Relational Database
- City Management
- Accommodation Management
- User Management
- Foreign Key Relationships
- Persistent Data Storage
- Responsive Layout
- Modern Card Design
- Clean Navigation
- Mobile Friendly
- Bootstrap Components
- Elegant Yellow Theme
| Login | Register |
|---|---|
![]() |
![]() |
Frontend: (Deployment currently unavailable due to expired cloud database service. The project runs completely in a local development environment.)
React Frontend
β¬
Node.js + Express Backend
β¬
MySQL Database
- π Full Stack Web Application
- π JWT Authentication
- π¨βπΌ Role-Based Authorization
- π¨ Accommodation Management
- π City Management
- π MySQL Database Integration
- β‘ RESTful APIs
- π± Responsive Design
- π¨ Modern User Interface
- π Production-Ready Architecture
| Technology | Purpose |
|---|---|
| React.js | Frontend Development |
| React Router DOM | Client-side Routing |
| Bootstrap | Responsive UI Components |
| Axios | API Communication |
| Technology | Purpose |
|---|---|
| Node.js | Runtime Environment |
| Express.js | REST API Development |
| JWT | Authentication & Authorization |
| BCrypt | Password Hashing |
| Technology | Purpose |
|---|---|
| MySQL | Relational Database |
| mysql2 | Database Connectivity |
| Tool | Purpose |
|---|---|
| VS Code | Code Editor |
| Git | Version Control |
| GitHub | Repository Hosting |
| Postman | API Testing |
ββββββββββββββββββββββββ
β React Client β
β (Frontend UI) β
ββββββββββββ¬βββββββββββββ
β
HTTP Requests
β
βΌ
ββββββββββββββββββββββββ
β Express.js REST API β
β Node.js β
ββββββββββββ¬βββββββββββββ
β
JWT Authentication Layer
β
βΌ
ββββββββββββββββββββββββ
β MySQL Database β
ββββββββββββββββββββββββ
EZStay
β
βββ assets
β βββ banner
β β βββ banner.png
β β
β βββ screenshots
β βββ home.png
β βββ loginWindow.png
β βββ signupWindow.png
β βββ userInterface.png
β βββ adminDashboard.png
β βββ addStayAdmin.png
β βββ stays.png
β βββ stayDetails.png
β
βββ client
β βββ public
β βββ src
β β βββ components
β β βββ pages
β β βββ services
β β βββ styles
β β βββ App.js
β βββ package.json
β
βββ server
β βββ controllers
β βββ db
β βββ middleware
β βββ routes
β βββ index.js
β βββ package.json
β βββ .env.example
β
βββ database
β βββ ezstay.sql
β
βββ README.md
βββ .gitignore
The project uses a MySQL relational database consisting of three primary tables.
| Table | Purpose |
|---|---|
| users | Stores user accounts, roles, and authentication credentials |
| cities | Stores city information displayed on the homepage |
| stays | Stores accommodation details linked to individual cities |
Cities (1)
β
β
ββββββββββββββββΊ Stays (Many)
Users
β
βββ User
βββ Admin
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register |
Register a new user |
| POST | /api/auth/login |
Login user |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/cities |
Fetch all cities |
| POST | /api/cities |
Add new city (Admin) |
| DELETE | /api/cities/:id |
Delete city (Admin) |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/stays |
Fetch all stays |
| GET | /api/stays/city/:cityId |
Fetch stays by city |
| GET | /api/stays/:id |
Fetch stay details |
| POST | /api/stays |
Add new stay (Admin) |
| DELETE | /api/stays/:id |
Delete stay (Admin) |
User Login
β
βΌ
Server verifies credentials
β
βΌ
Password verified using BCrypt
β
βΌ
JWT Token Generated
β
βΌ
Token sent to Client
β
βΌ
Protected Routes Accessible
β User Authentication
β JWT Authorization
β Role-Based Access
β RESTful APIs
β CRUD Operations
β Responsive Interface
β MySQL Integration
β Protected Admin Dashboard
β Secure Password Storage
β Dynamic City & Stay Management
Before running the project, ensure you have the following installed:
- Node.js (v18 or above)
- npm
- MySQL Server
- Git
- VS Code (Recommended)
git clone https://github.com/TanmayT134/EZStay.gitcd EZStaycd client
npm installcd ../server
npm installCreate a .env file inside the server directory.
PORT=5000
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=your_password
DB_NAME=EZStay
DB_PORT=3306
JWT_SECRET=your_secret_keyAlternatively, you can use the provided:
server/.env.example
-
Open MySQL Workbench.
-
Create a new database (if it doesn't already exist).
CREATE DATABASE EZStay;- Import the SQL script located in:
database/ezstay.sql
This script will automatically:
- Create all required tables
- Insert a demo admin account
- Insert sample cities
- Insert sample accommodation listings
cd server
npm startBackend runs on:
http://localhost:5000
cd client
npm startFrontend runs on:
http://localhost:3000
| Password | |
|---|---|
| tanmay@test.com | Admin@123 |
Note: These credentials are provided only for demonstration purposes and can be modified after importing the database.
Some planned improvements include:
- Hotel Search Functionality
- Advanced Filters (Price, Rating, Amenities)
- Image Upload using Cloudinary
- Booking & Reservation System
- Payment Gateway Integration
- User Profile Management
- Booking History
- Wishlist / Favorites
- Email Notifications
- Google Maps Integration
- Reviews & Ratings
- Responsive Admin Dashboard
- Cloud Deployment with CI/CD
- Docker Support
Contributions are welcome!
If you'd like to improve EZStay:
-
Fork the repository.
-
Create a new feature branch.
git checkout -b feature/your-feature- Commit your changes.
git commit -m "Add new feature"- Push your branch.
git push origin feature/your-feature- Open a Pull Request.
Tanmay Tawade
If you enjoyed this project, consider giving it a β on GitHub.








