final year report 1
final year report 1
A Project Report Submitted in Partial Fulfilment of the Requirements for the Degree of
BACHELOR OF TECHNOLOGY
by
NIRANJAN NAYAK
PRASHANT NAYAK
Session: 2024–2025
CERTIFICATE
This is to certify that the project entitled "AIRBNB – Hotel Booking and Listing Management
System" submitted by Sagar Kumar Jena (Roll No: 2101297142), Niranjan Nayak, and
Prashant Nayak, students of B.Tech in Computer Science and Engineering, Nalanda Institute
of Technology, is a record of their original work carried out under my supervision. This
project has not been submitted to any other university or institution for the award of any
degree or diploma.
Project Coordinator:
[Signature]
Name: Mr. Rashmi Ranjan Rout
Designation: Assistant Professor
Head of the Department:
[Signature]
Name: Mr. Arun Kumar Nayak
External Examiner:
[Signature]
Name: ______________________
ACKNOWLEDGMENT
We take this opportunity to express our sincere gratitude to our respected guide Mr. Rashmi
Ranjan Rout, Assistant Professor, Department of Computer Science and Engineering, for his
invaluable guidance and constant encouragement throughout the project work.
We are also grateful to the Head of Department, Mr. Arun Kumar Nayak, and all the faculty
members of the CSE department for their support and motivation.
Finally, we would like to thank our families and friends for their continuous support and
encouragement throughout the project.
INDEX
In traditional hotel booking systems, users have to rely on centralized, often expensive
platforms that don't provide opportunities for local hosts or travelers with limited budgets.
These platforms typically:
The problem our project aims to solve is to develop a decentralized platform where:
This system must support role-based features, secure transactions, and a fully functional
dashboard that is scalable.
A feasibility study helps determine whether the project is viable in terms of economic,
technical, and operational perspectives.
Economic Feasibility:
The application uses open-source tools like Node.js, MongoDB, and Express.js, reducing cost.
Hosting can be done on affordable cloud services like Render or Vercel.
Technical Feasibility:
The tech stack used is modern and proven. The integration of Cloudinary, Passport.js, and
Razorpay is feasible with ample documentation and community support.
Operational Feasibility:
The end users (admins, hosts, guests) can use the platform with minimal training. The
intuitive UI and clear navigation help with adoption.
A comprehensive system specification outlines the needs of the application and the
expectations from it.
System Overview:
Use Cases:
Register/Login (user/admin)
Software:
Node.js (v18+)
MongoDB Atlas
Express.js
EJS Template Engine
Cloudinary SDK
Hardware:
To ensure timely project completion, the project was divided into phases:
We used Trello for task management and GitHub for version control.
Version Control: GitHub repositories were maintained throughout the project cycle
with proper commit history.
Communication Tools: WhatsApp and Google Meet were used for collaboration and
coordination.
Risk management is crucial in handling unexpected challenges. The following risks and
mitigation strategies were identified:
Technical Risk: Mitigated by using familiar and well-documented technologies.
Scalability Planning:
The backend is designed to be modular with separate routes for user, admin, and hotel
operations. MongoDB's document-oriented structure supports large-scale data management
efficiently.
Security Planning:
Authentication is handled using Passport.js with session cookies stored securely using
connect-mongo. Routes are role-protected to ensure only admins can access sensitive
approval panels.
Responsiveness:
Frontend views are built using EJS templating with Bootstrap CSS ensuring responsiveness
across devices.
Continuous Integration:
GitHub was used in sync with GitHub Actions for CI. Pre-deployment checks and linting
ensured minimal bugs.
Model: Handles database schema, business logic, and data validation using
Mongoose for MongoDB.
View: Uses EJS templates for dynamic HTML rendering with Bootstrap and custom
CSS for styling.
Controller: Manages user inputs, routes, and communication between models and
views.
Key Components:
User Authentication Module: Passport.js based login/register for both admin and
users.
MongoDB Atlas is used as the cloud-based database, with the following collections:
1. Users Collection
_id: ObjectId,
name: String,
email: String,
password: String,
createdAt: Date
2. Hotels Collection
_id: ObjectId,
title: String,
description: String,
price: Number,
location: String,
images: [String],
hostId: ObjectId,
status: { type: String, enum: ['pending', 'approved'] },
createdAt: Date
3. Bookings Collection
_id: ObjectId,
userId: ObjectId,
hotelId: ObjectId,
checkIn: Date,
checkOut: Date,
amount: Number,
createdAt: Date
The platform prioritizes ease of use and visual appeal. Key UI/UX considerations include:
Forms: Clean and validated forms for registration, login, listing creation, and booking.
3.4 Diagrams
Use Cases: Register, Login, List Hotel, Approve Listing, Book Hotel, View Bookings
Shows one-to-many relationships between users and hotels, users and bookings.
3. Flow Diagram:
4. Component Diagram:
The backend follows RESTful API principles for consistent data flow. All endpoints return
JSON responses and are secured using middleware.
Sample Endpoints:
User Registration/Login
o POST /register
o POST /login
Hotel Listings
o GET /hotels
Bookings
o POST /bookings
o GET /bookings/user/:userId
Middleware Usage:
B. Backend Controllers:
C. Services/Helpers:
All images are uploaded to Cloudinary through the multer and cloudinaryStorage
configuration. This ensures:
Code Example:
js
CopyEdit
MongoDB was selected for its flexibility with dynamic data schemas (hotel listings
vary in content).
Passport.js was chosen due to simple integration with Express and session-based
authentication.
Cloudinary handles image hosting and transformation without burdening our server.
MVC Pattern ensures that the logic, structure, and rendering responsibilities are
separated cleanly.
Razorpay was chosen for payment integration as it supports Indian and international
payments with ease.
Description:
Clicking a card leads to a detailed view where users see more hotel information, owner
details, and can proceed to book. This UI was built using modular EJS templates with
conditional rendering for authenticated users.
CHAPTER 4: IMPLEMENTATION
The backend is built using Node.js and Express.js. It provides RESTful API endpoints and
manages user sessions, hotel listings, bookings, and payment integration.
/project-root
Authentication (passport.js)
The frontend is developed using EJS templates, integrated with Bootstrap and vanilla
JavaScript.
const options = {
receipt: `receipt_${Date.now()}`,
};
const options = {
key: RAZORPAY_KEY,
amount: amount,
currency: "INR",
order_id: order.id,
// Handle success
};
rzp.open();
Code Example:
Custom Middleware:
Description: This page displays all approved hotel listings. Each card includes the
hotel name, image, price, and a link to view details. Responsive design ensures
compatibility with mobile devices.
Screenshot: Hotel Detail
Description: On selecting a hotel, users are directed to a detailed page showing all
information including amenities, price per night, available dates, and a booking form.
Logged-in users can initiate the booking directly.
Screenshot: Admin Approval Panel
Description: The admin panel provides a tabular view of all pending hotel listings.
Each entry contains details like title, location, and price with action buttons to
approve or reject the listing. Only admin users can access this panel, ensuring
moderation before listings go live.
Screenshot: Booking Confirmation Page
Description: After successful booking and payment, the user is directed to a booking
confirmation page. This includes the booking ID, hotel details, check-in/check-out
dates, and payment receipt. This enhances trust and confirms that the transaction was
successful.
User Dashboard
Description: The user dashboard presents personal bookings, options to manage
listed hotels, and account settings. This module enhances usability by offering an
overview of the user’s interactions with the platform in one place.
Testing is a critical phase in the software development lifecycle to ensure that the
application meets the desired quality standards and performs correctly under various
scenarios. The objective is to identify bugs and inconsistencies before deployment. Our
Airbnb-style hotel booking system underwent multiple levels of testing, including unit
testing, integration testing, and user acceptance testing.
Unit tests were conducted for individual functions and modules using tools like Mocha and
Chai in the backend. Each function, such as user registration, hotel creation, and booking,
was tested independently.
Manual testing was performed extensively to verify UI behavior and correct routing.
Bugs were tracked manually using GitHub Issues. Common bugs included:
Used Joi schema validation to ensure required fields are present and correctly formatted.
title: Joi.string().required(),
price: Joi.number().min(100).required(),
description: Joi.string().required()
});
Hotel Listing Creation Passed Creates a new hotel with image upload
Admin Approval of Hotels Passed Admin approves and hotel becomes public
Payment Failure Handling Passed Booking not saved without successful payment
Description: When a user attempts to book without selecting valid check-in/check-out dates
or while not logged in, the application shows a clear error message via flash.
A group of 10 users were asked to test the website in a real-world simulation. Feedback
collected included:
Tool Purpose
5.10 Summary
Testing and validation helped refine the system, ensuring every feature works as expected.
The use of both automated and manual testing uncovered bugs and performance issues
early in development. Through thorough validation on both frontend and backend, we
ensured that only clean, structured data enters the system, and the user experience remains
seamless and secure.
6.1 Conclusion
The Airbnb – Hotel Booking and Listing Management System was envisioned and developed
as a modern, efficient, and user-centric platform to simplify the way individuals discover, list,
and book temporary accommodations. Throughout the development cycle, we focused on
implementing a system that is not only functional and secure but also scalable and
maintainable.
Robust Role Management: Users are categorized into roles like admin, host, and
guest. Each role has clearly defined permissions ensuring security and integrity.
Listing Management: Hosts can add, edit, and delete property listings, while guests
can browse and book approved listings only—ensuring moderation and quality
control via admin approval.
Cloud-based Media Handling: All property images are uploaded and served via
Cloudinary, ensuring optimized delivery and secure storage.
RESTful API Architecture: Backend APIs follow modern design principles, making the
system adaptable for future frontend platforms, including mobile apps.
On the frontend, the use of EJS templates combined with Bootstrap 5 helped deliver a
clean, responsive, and user-friendly interface that ensures cross-device compatibility. The
backend follows the MVC architecture, which separates logic, presentation, and data
handling—making the code easier to understand, debug, and extend.
The testing phase proved the application to be stable, with end-to-end validation ensuring
that critical flows like booking, listing, and payment worked seamlessly. Manual and
automated testing strategies helped in identifying and fixing issues early.
The project not only fulfilled its technical objectives but also served as a comprehensive
learning experience, exposing the team to real-world development workflows including Git
version control, API integration, deployment pipelines, and agile task management using
tools like Trello.
Despite fulfilling its functional requirements, the system has enormous potential for
enhancement. Here are several areas for improvement and future development:
🔧 Functional Enhancements
o A real-time availability calendar for each listing will improve transparency and
avoid double bookings.
o Hosts can mark listings as unavailable for specific dates and seasons.
📱 Platform Expansion
6. PWA Support
o Convert the web app into a Progressive Web App (PWA) for offline access and
better performance on mobile browsers.
7. Multi-language Support
o Auto-detect user location and display prices in local currency with automatic
exchange rate updates.
💬 Communication Features
Send transactional emails and booking alerts through services like SendGrid or Twilio
for enhanced communication.
Track active listings, completed bookings, user signups, peak booking hours, and
revenue trends.
🧩 AI and Automation
Suggest properties to users based on past behavior, location, and price preferences.
14. Automated Fraud Detection
Identify unusual patterns (e.g., multiple bookings from the same IP) and flag them for
admin review.
🛡️ Security Enhancements
Allow sign-in with Google, Facebook, or GitHub for easier onboarding and better
security.
Add optional 2FA using email or SMS for extra protection during login.
Automate deployment with tools like GitHub Actions or Jenkins for faster testing and
release cycles.
19. Dockerization
Containerize the application using Docker and deploy via Kubernetes or Docker
Swarm for scalable deployments.
Schedule automated backups and add monitoring tools like Prometheus or New
Relic.
In essence, the current application is a strong MVP (Minimum Viable Product). With the
above enhancements, it can evolve into a feature-rich, enterprise-level SaaS platform. By
addressing user convenience, performance, security, and business needs, the platform can
scale to accommodate thousands of users and transactions seamlessly.
This project was built using a wide range of online resources, tools, libraries, and
frameworks. Each component of the system—from backend to frontend to deployment—
was guided and inspired by the following references:
🔗 Official Documentation
1. Node.js – https://nodejs.org/en/docs/
2. Express.js – https://expressjs.com/
3. MongoDB – https://www.mongodb.com/docs/
4. Mongoose – https://mongoosejs.com/
5. Cloudinary – https://cloudinary.com/documentation
7. Passport.js – http://www.passportjs.org/docs/
8. Bootstrap 5 – https://getbootstrap.com/
7.2 Appendix
This appendix provides visual support, code illustrations, and real-world artifacts that were
part of the development process.
o Full description, booking calendar, amenities list, and action button for
booking.
3. 📥 Booking Confirmation
4. 🛠️ Admin Dashboard
o Interface for listing review, with approve/reject buttons and status filters.
5. 👤 User Dashboard
o Displays all personal bookings, listings hosted by the user, and account
settings.
User Collection:
json
CopyEdit
"_id": "ObjectId",
"email": "[email protected]",
"password": "hashed",
"role": "user",
"createdAt": "2025-03-10"
Hotel Collection:
json
CopyEdit
"location": "Goa",
"price": 4500,
"status": "approved"
Booking Collection:
json
CopyEdit
"userId": "ObjectId",
"hotelId": "ObjectId",
"checkIn": "2025-04-20",
"checkOut": "2025-04-22",
"amount": 9000,
"paymentStatus": "paid"
js
CopyEdit
const order = await razorpay.orders.create({ amount: amount * 100, currency: "INR" });
const booking = new Booking({ hotelId, userId: req.user._id, checkIn, checkOut, amount,
paymentStatus: "paid" });
await booking.save();
res.redirect("/dashboard");
});
✅ Conclusion of Appendix
The appendix not only supports the report with evidence of development but also
showcases the team’s commitment to building a polished, secure, and feature-rich product.
It gives future developers, instructors, or reviewers the ability to understand the internal
structure, logic, and visual flow of the platform.