Welcome to the Responsive Web App for Room Booking Management! This project aims to streamline the process of managing room bookings for property managers, providing real-time updates and notifications. The app is built with a modern tech stack to ensure efficiency, scalability, and ease of use.
- Real-Time Booking Management: Track and manage room bookings with real-time updates.
- WhatsApp Notifications: Automatically send booking confirmations and updates via WhatsApp using Twilio.
- Interactive UI: User-friendly interface for adding, viewing, and managing bookings.
- Error Handling: Robust error handling to ensure smooth operation even during connectivity issues.
- Frontend: HTML, CSS, JavaScript
- Backend: Node.js, Express.js
- Database: MongoDB
- Messaging: Twilio for WhatsApp integration
-
Clone the repository:
git clone https://github.com/yourusername/room-booking-management.git cd room-booking-management
-
Install dependencies:
npm install
-
Set up environment variables: Create a
.env
file in the root directory and add your MongoDB URI, Twilio Account SID, Auth Token, and WhatsApp number:PORT=3000 MONGODB_URI=your_mongodb_uri TWILIO_ACCOUNT_SID=your_twilio_account_sid TWILIO_AUTH_TOKEN=your_twilio_auth_token TWILIO_WHATSAPP_NUMBER=your_twilio_whatsapp_number
-
Run the application:
node app.js
The server should be running on http://localhost:3000.
- Access the application: Open http://localhost:3000 in your web browser.
- Add a booking: Fill out the booking form and submit to add a new booking.
- View bookings: Navigate to the bookings section to view all bookings.
- Receive WhatsApp notifications: Booking confirmations will be sent automatically via WhatsApp to the provided phone number.
room-booking-management/
├── public/
│ ├── index.html
│ ├── style.css
│ └── script.js
├── .env
├── app.js
├── package.json
└── README.md
-
POST /api/bookings: Create a new booking.
- Request Body:
{ "room": "101", "checkIn": "2024-07-20T14:00:00.000Z", "checkOut": "2024-07-22T11:00:00.000Z", "guestName": "John Doe", "roomType": "double", "checkInMeter": 100, "checkOutMeter": 150, "phoneNumber": "+1234567890" }
- Response:
{ "message": "Booking created and WhatsApp message sent", "booking": { ...bookingDetails } }
- Request Body:
-
GET /api/bookings: Fetch all bookings.
- Response:
[ { ...bookingDetails }, { ...bookingDetails } ]
- Response:
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Commit your changes with descriptive messages.
- Push to the branch.
- Create a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.
- Thanks to the developers and maintainers of the open-source libraries and tools used in this project.
- Special thanks to Twilio for their excellent API and documentation.