Skip to content

Anshul-soni-dev/node_Hotel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏨 Node Hotel Management API

A backend REST API for managing hotel operations such as rooms, bookings, and users. Built using Node.js and Express with a scalable architecture.


🚀 Features

  • Add, update, delete hotel rooms
  • Manage bookings/reservations
  • User management system
  • RESTful API design
  • Middleware-based architecture
  • Error handling

🛠 Tech Stack

  • Node.js
  • Express.js
  • MongoDB (Mongoose) (if used)
  • Postman (API testing)
  • dotenv

📂 Folder Structure

node_Hotel/ │── controllers/ │── models/ │── routes/ │── middleware/ │── config/ │── .env │── server.js


⚙️ Installation & Setup

  1. Clone the repository:
git clone https://github.com/Anshul-soni-dev/node_Hotel.git
cd node_Hotel
  1. Install dependencies:
npm install
  1. Create a .env file:
PORT=5000
MONGO_URI=your_mongodb_uri
  1. Run the server:
npm start

🔐 API Endpoints

🧑 User Routes

  • POST /api/users/register
  • POST /api/users/login

🏨 Room Routes

  • GET /api/rooms
  • POST /api/rooms
  • PUT /api/rooms/:id
  • DELETE /api/rooms/:id

📅 Booking Routes

  • POST /api/bookings
  • GET /api/bookings
  • DELETE /api/bookings/:id

🔄 Workflow

  1. Admin adds hotel rooms
  2. Users register/login
  3. Users book available rooms
  4. Booking data stored in database
  5. API returns booking & room details

📸 Screenshots

(Add Postman screenshots here)


🚀 Future Improvements

  • Payment integration (Razorpay/Stripe)
  • Admin dashboard
  • Room availability tracking
  • JWT authentication
  • Role-based access (Admin/User)

👨‍💻 Author

Anshul Soni GitHub: https://github.com/Anshul-soni-dev

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors