IT - B - 54 - Priyanshu - Industry Report - 2
IT - B - 54 - Priyanshu - Industry Report - 2
Submitted in
partial fulfillment of requirement for the award of degree of
Bachelor of Technology
in
Information Technology
By
Mr. Priyanshu
June 2023
INDUSTRY INTERNSHIP REPORT
Submitted in
partial fulfillment of requirement for the award of degree of
Bachelor of Technology
In
Information Technology
By
Mr. Priyanshu
June 2023
© G H Raisoni College of Engineering, Nagpur, Year 2023
Declaration
I hereby declare that the Industry Internship report submitted herein has been carried
out by me in Park Me Safe towards partial fulfillment of requirement for the award of Degree
of Bachelor of Technology in Information Technology. The work is original and has not been
submitted earlier as a whole or in part for the award of any degree / diploma at this or any
other Institution / University.
I also hereby assign to G H Raisoni College of Engineering, Nagpur all rights under copyright
that may exist in and to the above work and any revised or expanded derivatives works based
on the work as mentioned. Other work copied from references, manuals etc. are disclaimed.
Place Nagpur
Date
Certificate
This is to certify that Mr. Priyanshu student of Information Technology from G H Raisoni
College of Engineering, Nagpur has completed Internship successfully from 14/12/2022 to
14/06/2023. During this period they have shown good interest in the assignment/works given
to them and worked hard. During their tenure of internship, they were hard working and
focused on activities assigned to them.
Student have worked during internship period on following project under the guidance of Mr.
Pawan Pakhale
1. Travel Planner Website – QtripDynamic
Regards, Date:
Mr.Pawan Pakhale
Supervisor
Park Me Safe
HOUSE NO. 2307,
PATHROT
Amravati - 444803
Maharashtra – India
Certificate
Ref.No. PMSI/OPG/2022-23/T-001 Date:
This is to certify that Mr. Priyanshu student of Information Technology from G H Raisoni
College of Engineering, Nagpur has completed Internship successfully from 14/12/2022 to
14/06/2023. During this period they have shown good interest in the assignment/works given
to them and worked hard.
Students have worked during internship period on following project/industrial problem under
the guidance of Mr. Pawan Pakhale(Supervisor).
Travel Planner Website – QtripDynamic
Industry has spent Rs. NIL amount on their ideas/industries problem, which they have
successfully implemented.
Regards,
Students have worked during internship period on following project/industrial problem under
the guidance of Mr. Pawan Pakhale (Supervisor).
Travel Planner Website – QtripDynamic
Project work submitted by them has the potential to save cost up to Rs. NIL Lakh/year. Also
they were entitled for stipend of Rs. NIL /- per month along with canteen, transportation &
accommodation facilities.
Regards,
Finally, I would like to express my gratitude to our family members who supported and
encouraged me all the time
Place: Nagpur
Date:
ABSTRACT
This project report focuses on implementing dynamic functionality for the QTrip website's
frontend using JavaScript. The goal is to enhance the site's interactivity by utilizing REST
APIs to fetch data from the backend and send data for storage. Without the backend
component, QTrip would be limited to static pages that cannot retrieve or store data. To make
the site publicly accessible, the frontend will be deployed using Netlify, while the backend
will be deployed using Render.
The main objective of QTrip Dynamic is to transform the existing static travel site, built with
HTML/CSS, into a dynamic site using JavaScript. The website will feature four key pages:
1. Landing Page: This serves as the starting page and showcases a list of cities where
users can explore adventures.
2. Adventures Page: Accessed by clicking on one of the city cards on the Landing Page,
this page presents the available adventures for the selected city.
3. Adventure Details Page: Users can access this page by clicking on a specific adventure
on the Adventures Page. It provides detailed information about the chosen adventure.
4. Reservations Page: Once users make reservations on the Adventure Details Pages, they
can use this page to view all their reservations.
To achieve these dynamic functionalities, JavaScript will be employed to build upon the
provided HTML and CSS files for QTrip. The JavaScript code will utilize REST APIs to fetch
data related to cities, adventures, adventure details, and reservations from the backend server.
Subsequently, this information will be dynamically manipulated in the HTML page's
Document Object Model (DOM), resulting in an interactive and user-friendly website." QTrip
website is ready with all the necessary content. backend running on the VM and were viewing
the frontend (website) using the Live Server and your VM’s IP address. But this cannot be
shared with others since the VM will be shut down after a while. To be able to share this
website with others and to be able to access it publicly, it needs to be deployed. So to do this
using render and netlify. Render is the platform where the deployment of the backend and
netlify is the platform where frontend will be deployed.
i
LIST OF FIGURES
1. Architecture of QtripDynamic 9
5. Backend Data 15
ii
INDEX
Sr. No. CONTENTS Page No.
1.2 Location 3
1.3 Services 3
2.3 Objective 10
References 43-44
iii
CHAPTER 1
INTRODUCTION TO COMPANY
1
1.1 About the Company:
Park me safe was implemented on the problems that consumers faced during car Parking. To
provide a fluid experience in Car-Parking.It recognizes the importance of knowledge sharing
and learning in the entrepreneurial journey. The platform offers a wide range of educational
resources,including webinars, workshops, and online courses, delivered by experienced
professionals and thought leaders. These resources cover essential topics such as business
strategy, marketing, fundraising, and product development, equipping entrepreneurs with the
knowledge and skills needed to navigate the challenges of building and scaling a successful
startup.
In today's rapidly evolving business landscape, aspiring entrepreneurs, startups, and is the
investors encounter significant obstacles when it comes to finding the right connections and
resources to support their entrepreneurial endeavors. Existing platforms and networks often
fall short in providing the necessary features, accessibility, and community of the engagement
required for meaningful collaboration and growth. As a result, entrepreneurs struggle to
establish valuable connections, startups face challenges in gaining visibility is and traction,
and investors encounter difficulties in identifying and evaluating promising investment
opportunities. This prevailing gap in the ecosystem hampers the progress and success of
startups, restricts the flow of capital, and stifles innovation.
One of the key problems that entrepreneurs encounter is the difficulty of establishing Valuable
connections with like-minded individuals, industry experts, and potential Collaborators.
Existing networking platforms may lack the necessary focus, structure, or Critical mass to
provide meaningful networking opportunities. As a result, entrepreneurs Struggle to find
mentors, advisors, and partners who can provide guidance, expertise, and Support. By
providing a robust networking infrastructure and facilitating interactive discussions, virtual
meetups, and networking events, the proposed platform can bridge this gap and enable
entrepreneurs to build valuable relationships that propel their Entrepreneurial journey
forward.
2
1.2 Location:
HOUSE NO. 2307,
PATHROT
PATHROT
Amravati - 444803
Maharashtra – India
Hassle-Free Booking Reserve a space with a few taps and skip the parking hunt.
No-Surprise Pricing Compare prices, see your total cost up-front and choose your
parking.
Lightning-Fast Parking Park your car in seconds.
Saves Time Traditional parking takes a lot of time. In today’s new age, there is much
lesser space left, pre-book your parking and save time
Park me safe was implemented on the problems that consumers faced during car
Parking. To provide a fluid experience in Car-Parking.
Hassle-Free Booking Reserve a space with a few taps and skip the parking hunt.
No-Surprise Pricing Compare prices, see your total cost up-front and choose your
parking.
Lightning-Fast Parking Park your car in seconds.
Saves Time Traditional parking takes a lot of time. In today’s new age, there is
much lesser space left, pre-book your parking and save time
3
1.5 Operational Structure:
4
CHAPTER 2
CASE STUDY
5
2.1 Introduction
Travel planner websites have become essential tools for modern-day travelers. These
platforms offer a range of services, from flight and hotel bookings to itinerary planning and
destination recommendations.This project report focuses on implementing dynamic
functionality for the QTrip website's frontend using JavaScript. The goal is to enhance the
site's interactivity by utilizing REST APIs to fetch data from the backend and send data for
storage. Without the backend component, QTrip would be limited to static pages that cannot
retrieve or store data. To make the site publicly accessible, the frontend will be deployed using
Netlify, while the backend will be deployed using Render.
The main objective of QTrip Dynamic is to transform the existing static travel site, built with
HTML/CSS, into a dynamic site using JavaScript. The website will feature four key pages:
1. Landing Page: This serves as the starting page and showcases a list of cities where
users can explore adventures.
2. Adventures Page: Accessed by clicking on one of the city cards on the Landing Page,
this page presents the available adventures for the selected city.
3. Adventure Details Page: Users can access this page by clicking on a specific adventure
on the Adventures Page. It provides detailed information about the chosen adventure.
4. Reservations Page: Once users make reservations on the Adventure Details Pages, they
can use this page to view all their reservations.
To achieve these dynamic functionalities, JavaScript will be employed to build upon the
provided HTML and CSS files for QTrip. The JavaScript code will utilize REST APIs to fetch
data related to cities, adventures, adventure details, and reservations from the backend server.
Subsequently, this information will be dynamically manipulated in the HTML page's
Document Object Model (DOM), resulting in an interactive and user-friendly website."
6
Introduction to the important files
backend/db.json - local database file used by the backend, to store all the data sent
from the frontend
We make use of a library called lowDb to perform reads/writes to the database file
backend/server.js - backend server in NodeJS and Express, with all necessary API
endpoints
frontend/__tests__ - contains files related to the unit tests which helps to understand if
you got the requirements implemented correctly.
The test files will be present in frontend/__tests__/modules
frontend/conf/index.js - configuration file which specifies the Backend API endpoint
URL where the Frontend needs to connect to.
Backend URL is the workspace IP along with its port - <workspace-ip>:8082
This file will need to be updated every time the workspace is opened since you get a
new workspace IP every time
frontend/css/styles.css - contains all the styles for the QTrip webpages
frontend/modules - contains Javascript module files for the different QTrip
pages. These are the files you will be working with in this ME.
frontend/index.html - HTML file for the QTrip Landing page
the entry point HTML file that can be accessed at the default route "/"
the HTML files for other pages within a frontend/pages folder as and when it’s get to
their respective modules
7
2.2 Problem Identfication:
Travel planner websites have become essential tools for modern-day travelers. These
platforms offer a range of services, from flight and hotel bookings to itinerary planning and
destination recommendations. However, like any technological solution, travel planner
websites are not without their flaws. In this article, we will explore some of the key problem
areas that users may encounter while using a travel planner website.
One common issue with travel planner websites is the lack of a user-friendly interface. Many
platforms overwhelm users with excessive information, making it difficult to navigate and
find relevant details. Cluttered layouts, complicated menus, and confusing search functions
can frustrate users and deter them from using the site. A streamlined, intuitive interface is
crucial to ensuring a positive user experience.
Another significant problem is the limited destination coverage of some travel planner
websites. Users often find that these platforms focus on popular tourist destinations and
overlook lesser-known or offbeat locations. This limitation restricts the options available to
travelers who seek unique experiences. Expanding the destination database to include a wider
range of locations would greatly enhance the website's appeal and usefulness.
Travel planner websites heavily rely on accurate and up-to-date information to provide
valuable recommendations to users. However, maintaining such information can be
challenging, resulting in inaccuracies and outdated data. This can lead to users making
incorrect bookings or encountering unexpected issues during their trips. Regularly verifying
and updating information is vital to ensure users can trust the website's recommendations.
8
4. Inadequate Customization Options:
Many travel planner websites offer pre-defined itineraries and packages, but they often lack
sufficient customization options. Travelers have diverse preferences and requirements, and
they may want to tailor their itineraries according to their specific needs. Limited
customization can leave users feeling dissatisfied and unable to create personalized travel
plans. Providing more flexibility and customization features would greatly enhance the
website's appeal.
While travel planner websites often include user reviews and recommendations, they may not
always be comprehensive or reliable. Users may encounter a limited number of reviews,
biased opinions, or irrelevant recommendations. A robust review system that includes a wide
range of experiences and filters out fake or biased reviews would greatly enhance the
credibility and usefulness of the platform.
With the increasing use of smartphones and tablets, it is crucial for travel planner websites to
have a seamless mobile experience. However, some platforms fail to optimize their websites
for mobile devices, leading to slow loading times, unresponsive design, and difficulties in
accessing essential features. Given the growing number of travelers who rely on mobile
devices, improving the mobile experience is essential to attract and retain users.
When using a travel planner website, users may encounter various issues or require assistance
during their travel planning process. However, some platforms lack efficient customer support
channels, making it challenging for users to seek help or resolve their problems promptly.
Providing responsive customer support through multiple channels, such as live chat or email,
is crucial for ensuring user satisfaction.
9
2.3 Objective:
1. Design a visually appealing and user-friendly static travel website that showcases
various travel destinations and provides essential information to users.
2. Present clear and concise content about destinations, including descriptions,
attractions, accommodation options, and transportation details.
3. Create an intuitive navigation system with a well-structured layout to ensure easy
access to different sections of the website.
4. Implement responsive design principles to ensure the website is accessible and
visually appealing across different devices and screen sizes.
5. Optimize the website for search engines by utilizing appropriate HTML tags, meta
descriptions, and keyword-rich content.
6. Ensure fast loading times by optimizing images, minimizing code, and utilizing
browser caching techniques.
7. Validate HTML and CSS code to ensure compliance with web standards and cross-
browser compatibility.
8. Incorporate effective use of typography, color schemes, and imagery to create an
engaging and visually appealing user experience.
9. Integrate social media sharing buttons to encourage users to share their favorite travel
destinations with their networks.
10. Provide a contact form or email address to enable users to inquire about travel-related
information or seek assistance.
1. Enhance user interactivity by incorporating dynamic elements into the website, such
as interactive maps, image sliders, and dropdown menus.
10
2. Implement a search functionality that allows users to search for specific destinations,
activities, or accommodations, providing instant results as they type.
3. Integrate a booking system that enables users to check availability, compare prices,
and make reservations directly through the website.
4. Create dynamic image galleries or slideshows to showcase destination photos and
attract users' attention.
5. Develop a user review and rating system, allowing travelers to share their experiences
and recommendations for specific destinations or services.
6. Implement real-time weather updates for each destination, providing users with
current weather conditions and forecasts.
7. Incorporate a currency converter to help users easily convert prices and currencies for
different destinations.
8. Enable users to create and save personalized itineraries by adding destinations,
activities, and accommodations, and allow them to share or print their itineraries.
9. Implement a newsletter subscription feature to keep users updated with the latest travel
deals, news, and destination recommendations.
10. Utilize JavaScript to add dynamic form validations, ensuring that user-submitted data
is accurate and complete.
11
2.4 Work Carried Out
The project aims to transform a static travel website built using HTML/CSS into a
dynamic and interactive platform by incorporating JavaScript. The objective is to
enhance user experience, improve functionality, and provide real-time information to
users, thereby making the website more engaging and useful for travelers.
Hardware/Software Implementation:
1. Hardware Requirements:
The project primarily focuses on the software implementation and does not
require specific hardware components. Any computer or device capable of
running a web browser will be sufficient.
2. Software Requirements:
Text Editor: A text editor such as Sublime Text, Visual Studio Code, or
Atom will be required to write and edit the HTML, CSS, and JavaScript
code.
Web Browser: Any modern web browser like Google Chrome, Mozilla
Firefox, or Safari will be needed to test and view the website during
development.
Web Server: While not mandatory for development, a web server may be
required for hosting the dynamic website in a production environment.
Version Control Systems: Git
Live Server: For viewing the dynamic Effects while creation of the website.
12
2.4 Solution Provided
Solution Implementation:
1. JavaScript Integration:
The existing static travel website, built using HTML/CSS, will be enhanced by
integrating JavaScript code.
JavaScript will enable dynamic functionality by adding interactivity, real-time
updates, and data manipulation to the website.
2. Navigation and User Interaction:
JavaScript will be used to implement interactive menus, dropdowns, and
navigation elements, enhancing user experience and ease of navigation.
Event listeners will be added to handle user interactions, such as clicks, hover
effects, and form submissions.
3. Real-time Data Display:
JavaScript will be utilized to fetch and display real-time data such as weather
information, currency exchange rates, or flight availability from relevant APIs.
API integration will be implemented to retrieve data and dynamically update
the website content based on user queries or preferences.
4. Form Validation and Error Handling:
JavaScript will be employed to validate user inputs in forms, ensuring that the
data submitted is accurate, complete, and meets specific criteria.
Error handling mechanisms will be implemented to display meaningful error
messages and guide users in correcting their inputs.
5. Interactive Content and Media:
JavaScript will enable the creation of interactive image sliders, carousels, and
galleries to showcase travel destinations and attract user attention.
Users will be able to interact with images, zoom in/out, view captions, or
navigate through a collection of photos.
6. Booking and Reservation Functionality:
JavaScript will be utilized to implement a booking system that allows users to
check availability, select dates, compare prices, and make reservations.
13
Real-time updates will be provided on room availability, pricing, and confirmation
messages upon successful bookings.
7. User Reviews and Ratings:
JavaScript will enable the integration of a user review and rating system, allowing
travelers to share their experiences and recommendations.
Users will be able to submit ratings, write reviews, and view the average ratings
and comments for specific destinations or services.
8. Personalized Itineraries and User Accounts:
JavaScript will facilitate the creation of user accounts or profiles, allowing users
to save and manage personalized itineraries.
Users will be able to add destinations, activities, and accommodations to their itineraries,
view or edit them, and share or print their plans.
14
2.5 Designing the Website:
15
2.5.1 Crafting the Landing Page
1. Right click on the index.html file at and click the “Open with Live Server” option.
2. see the “Go Live” option at the bottom of the page change to “Port: 8081”.
3. can find your workspace IP address at the top of the workspace window (your
workspace IP will be different from the one in the image shown below)
4. Open a new browser tab and visit <your-workspace-ip>:8081/frontend to see the
rendered content of index.html
16
2.5.2 Start the Frontend application using Live Server
Now that you have the overview of the code, let’s get started by viewing the Landing Page.
Follow the instructions below to do that.
1. Right click on the index.html file at /home/workspace/priyanshurocky5-
ME_QTRIPDYNAMIC/frontend and click the “Open with Live Server” option.
2. see the “Go Live” option at the bottom of the page.
3. workspace IP address at the top of the workspace window (your workspace IP will be
different from the one in the image shown below)
4. Open a new browser tab and visit workspace-ip/frontend to see the rendered content
of index.html
As our application continues to grow, we have decided to organize our code into multiple files
known as "modules." Each module will contain either a class or a library of functions that
serve a specific purpose.
17
In the earlier days of JavaScript, there was no built-in module syntax at the language level.
This wasn't a problem initially because scripts were small and uncomplicated. However, as
scripts became more complex, the need for organizing code into modules arose, leading to the
development of various module systems and libraries to load modules on demand.
Some notable module systems, rooted in history, include:
AMD: An ancient module system initially implemented by the library require.js.
CommonJS: A module system created specifically for Node.js server.
UMD: Another module system suggested as a universal solution, compatible with both
AMD and CommonJS.
Although these module systems have gradually become less prevalent, they can still be found
in older scripts.
Since 2015, a language-level module system was introduced into the JavaScript standard. It
has evolved over time and is now supported by all major browsers and Node.js. Therefore, we
will focus on studying the modern JavaScript modules.
So, what exactly is a module? In simple terms, a module is just a file. Each script is considered
a module.
Modules have the ability to load other modules and utilize special directives such as "export"
and "import" to exchange functionality and call functions between modules:
The "export" keyword is used to label variables and functions that should be accessible
from outside the current module.
The "import" keyword allows us to import functionality from other modules.
The Landing Page for QTrip is now ready. We’ll address the Adventures Page in this module.
Clicking on a particular city card on Landing Page will bring the users to this Adventure Page
which lists adventures for that city.
The city id will be extracted from the URL and adventures for that city will be fetched
with a REST API request to the backend server
The adventure cards will be populated and displayed from the contents of the API
response
Clicking on an adventure card will take users to the Adventure Details page
18
There are also filters on the Adventures Page which can be used to filter the adventures based
on category or duration. These filters will be addressed in the next module.
19
8. The HTML file also has methods of its own. Check where these are being invoked. A
couple of these methods will be written by you in the next module.
o selectDuration()
o clearDuration()
o selectCategory()
o clearCategory()
Fetching the list of adventures for a particular city can be achieved by making a REST API
call to the Backend Server. You will have to modify the fetch Adventures() method to do this.
Some observations Populate the fetch Adventures () method to invoke the Backend’s REST
API using the configured backend Endpoint and the /adventures?city=<city_name> API
endpoint, where city name is the result from getCityFromURL() .Get the json data from the
Backbend’s response Understand the fields in the response, you’ll need to extract and use
them in the next milestone. There are multiple ways to view the response contents. You can
run the curl command from another terminal to check the server Response to this API Request.
You could do the same from the browser with your workspace’s ip address and correct API
endpoint. You can also check the response in the Network tab on Chrome Dev Tools when
your page makes this request. Return this json data.
20
2.5.4 Iterate over Adventures and insert into HTML DOM
The method that needs to be filled in is addAdventureToDOM()
This method has to take a list of adventures as input and insert the adventure cards into the
DOM. Key things to note:
1. we have to loop through the list of adventures passed and for each adventure, create a
card
2. Use these fields from the adventure information to create the card
- id, category, image (URL), name, costPerHead and duration
3. Provide a link to the adventure cards such that users can click on a card to get to the
Adventure Details pages for that adventure. The link should be in this format
- detail/?adventure=<adventure_id> where adventure_id is extracted from the input.
4. Using these classes from the provided frontend/css/styles.css file
o category-banner
o activity-card
o activity-card img
5. Use divs, justification and flex as needed to create the cards shown below
6. The end result look like this and it is responsive
21
DOM manipulation is a key aspect that JavaScript is good at. This makes pages dynamic and
capable of user interaction. With these modules you are now capable of making DOM changes
to the HTML pages. You will continue to explore some more capabilities of JavaScript in a
web application in the upcoming modules.
The QTrip site now has the first two pages, namely, Landing Page and Adventures Page
populated. With the visual aspects of these two pages, you have become familiar with some
of the key design elements used in today’s web pages.
The Adventures Page still has the filtering functionality to be implemented. You will address
that in the next module.
The Adventures Page now has the Adventure cards listed but the filters aren’t working yet. In
this module you’ll implement the filter functionality.
There are two filters - Category and Duration - which can either be specified individually or
together. The Category filter allows for multiple selection. Only Adventures that satisfy the
filters should be displayed. The selected filters should be displayed so the users know which
filters are selected. An option to clear the filters should also be provided.
The other functionality that needs to be supported is to persist the filters in the browser’s local
storage. This will ensure that the filters are retained even if the page is refreshed or opened in
another tab.
the method filterFunction() and filterByCategory(). filterFunction() is invoked
by frontend/pages/adventures/index.html before populating the adventure cards in the DOM,
so that only the adventures that satisfy the filter get displayed. Take a look at the different
places where the filter method gets invoked.
Some observations:
23
There is a global variable called filters in the html file which is used across different
sections of the page. Refer to this html file to see the format of contents of this variable.
filterFunction() is invoked for all filters. It could be a Category filter or Duration filter
or both. You have to check the filters provided as input and based on the type of filter,
invoke either filterByCategory() or filterByDuration() or both, from filterFunction()
In this milestone you will only handle Category filter by invoking filterByCategory()
The inputs provided to filterFunction() are filters and the list of adventures.
If the category filter is present in the filters, extract the category list from it and pass
the list of adventures and category list to filterByCategory() which should return the
filtered adventures that belong to any of the categories in the category list.
Finally, return the filtered list of adventures from filterFunction()
If the filters provided as input is empty, return the entire list of adventures that was
provided as input.
24
2.5.7 Data Persistence
When users visit the QTrip website and specify filters for adventures, they should be able to
retain their filter selection even if the page is refreshed or the website is opened in a different
tab. The way to achieve this is through data persistence. The filter selection needs to be stored
in the browser’s memory. Read through the references provided below to understand the
various options available for data persistence, before you proceed further.We will be using
local storage to persist the filter selection.
Use JSON.stringify() while it is being stored in LocalStorage. The consistency of storing
filter data into localStorage in saveFiltersToLocalStorage() since local storage can only
store string data.
Use JSON.parse() to convert the string data from localStorage back to JSON format
in getFiltersFromLocalStorage() and return the data
Providing filters using a drop down is a common requirement on web pages. You have learnt
how to visually present filters and allow users to select them. Further, the user selection has
to be visible so user knows what’s been filtered. The next thing is to apply these filters every
time the selection changes using HTML and JavaScript to achieve the necessary result.
25
Several types of data persistence are available to choose from - session storage, local storage
and cookies. Each one varies in the purpose it serves. You have used local storage and its
methods to store and retrieve data, so that user experience is better.
The Adventures page is now complete, along with the Landing page. It can list all adventures
related to a city and provide filter functions for users to select adventures based on Category
and/or Duration. Further, clicking on a particular adventure card will take the user to the
Adventure Details page, which we’ll address in the next module.
The first two pages of QTrip are complete, namely, Landing Page and Adventures Page. Now,
it's time to address the Adventure Details Page. Users can get to this page by clicking on a
particular adventure card on the Adventures Page.
The Adventure Details Page contains details about the adventure along with an image gallery
on a carousel. There is a reservation panel where users can put in their details and make a
reservation. They can then view their reservations by going to the Reservations Page. We will
address the adventure details in this module and handle the reservations in the next module.
26
2.5.9 Extracting Adventure details and inserting into the DOM
27
To achieve the desired outcome, we will be updating the addBootstrapPhotoGallery() method.
The objective is to utilize Bootstrap's carousel component to enhance the HTML content of
the photo-gallery element.
Firstly, we need to update the HTML content of the photo-gallery element by integrating
Bootstrap's carousel component. This will involve making adjustments to the existing HTML
structure and incorporating the necessary Bootstrap classes and attributes. Detailed references
and documentation on the carousel component should be consulted for guidance.
Next, we will iterate through the images provided as input and create a div element for each
image. These div elements will be inserted into the carousel-inner element of the Bootstrap
carousel. This will allow for the dynamic generation of the image slideshow within the photo-
gallery section.
It is crucial to ensure that only one of the images (carousel-item) is set as active to ensure
smooth transitions between images. This can be accomplished by adding the appropriate class
or attribute to the respective HTML element.
By implementing these updates, the end result will showcase a responsive and visually
appealing photo gallery that utilizes Bootstrap's carousel component. Users will be able to
navigate through the images seamlessly, experiencing a smooth and responsive slideshow.
28
Arranging images on a carousel is a key ingredient to make image galleries look good and
makes it easier for users to view them. I have successfully implemented an image carousel to
improve the aesthetics of the Adventures Detail page. By completing this module, you have
partially finished the Adventure Details page. The page looks pleasing and the users get to see
the details on a good layout. Still have to handle the "Sold out" message and the reservation
functionality, which you’ll get to in the next module. By adding support to make and view
reservations, QTrip functionality will be complete.
The Adventure Details page now needs to support reservations. In this module, you’ll enable
this using the reservation form on this page. Users will be able to make reservations and the
reservation data will be sent to the Backend server using a POST REST API call.
Also, I am adding functionality to the Reservations Page, which will fetch all user reservations
from the Backend server and display them using the appropriate date format.
We will utilize the available field of the input adventure to make a decision using an if-else
statement. If the adventure is available, we will hide the reservation-panel-sold-out panel and
show the reservation-panel-available panel. Additionally, we need to update the appropriate
element to display the cost per head using the costPerHead field of the input adventure. On
the other hand, if the adventure is not available, we will hide the reservation-panel-available
panel and show the reservation-panel-sold-out panel. It is important to consult the provided
references to understand the appropriate methods for hiding or showing a panel. By correctly
implementing these steps, the given test case will pass, indicating that the reservation panel is
29
rendered conditionally based on the availability of the adventure. Further, when the adventure
is not available (i.e. already booked), the Sold Out section should be shown and the
Reservation form should not be shown.
30
Fig: Calculating Cost of Reservation
2.5.13 Capturing data from reservation form and make POST request
using Fetch API
31
with the message "Success!" and refresh the page to provide a fresh booking experience for
the user.
On the other hand, if the reservation fails, show an alert with the message "Failed!" to inform
the user about the unsuccessful booking attempt.
It's important to note that this is the first time you'll be making a POST request in this module.
Previously, only GET requests were used.
If the backend server is operational and responds with success, you should see a popup
window similar to the example provided when a user makes a reservation. The exact
implementation may vary depending on the programming language or framework you are
using.
32
2.5.13 Fetching the reservations from the backend and Displaying the
reservations
To fetch the details of all reservations, modify the fetchReservations() method to make a
REST API call to the Backend Server. Follow these steps:
1. Make an API request by invoking the Backend's REST API using the configured
backendEndpoint and the /reservations/ API endpoint.
2. Retrieve the JSON data from the response received from the Backend Server.
3. Take note of the fields in the response and understand their significance as you will
need to extract and utilize them in the next milestone or task.
4. Return the JSON data obtained from the Backend Server, which includes the details
of all the reservations.
By implementing these steps, you will be able to actively fetch the reservation details by
making a REST API call to the Backend Server in the fetchReservations() method.
33
Conditionally Render Banner or Reservation Table: To begin with, it is important to
conditionally render either the "no-reservation-banner" or the "reservation-table-parent" based
on whether the input reservations are empty or not. This ensures that the appropriate visual
representation is displayed, providing clarity to the user.
Iterate Through Reservations: Next, a loop should be implemented to iterate through the input
reservations. For each reservation, a row should be dynamically inserted into the reservation
table. The table fields should match the ones indicated in the table header on the Reservations
page, maintaining consistency and clarity.
Utilize Date Functions: The built-in Date functions should be utilized to present the "Date"
and "Booking Time" fields in the specified format. It is crucial to refer to the comments in the
method for guidance on formatting these fields correctly. Additionally, setting the locale to
"en-IN" ensures that the test cases pass successfully, providing accurate date and time
representations.
Include Adventure Link Button: Incorporate a button using the provided "reservation-visit-
button" CSS class. This button should serve as a reference link, directing the user to the
respective adventure page upon clicking. To create the reference link, the adventure ID should
be used, allowing for a seamless and intuitive user experience.
Note on Reservation Scope: It is important to note that these reservations are not specific to
individual users but represent the overall reservations made. This broader perspective ensures
that the displayed reservations offer a comprehensive overview of the reservation activity.
34
Forms are an important component on websites and a good skill to have under the belt.POST
request is used to send data to the backend for the first time in QTrip. Knowing the difference
between when to use GET vs POST is key to getting the REST API implementations
right. completed all the functionality required for your Qtrip website - Landing page,
Adventures page, Adventure Details page and Reservations page.The only part remaining now
is to move from a local frontend and backend to a publicly deployed frontend and backend.
Note on Reservation Scope: It is important to note that these reservations are not specific to
individual users but represent the overall reservations made. This broader perspective ensures
that the displayed reservations offer a comprehensive overview of the reservation activity.
2.6 Deployment:
QTrip website is ready with all the necessary content. backend running on the VM and were
viewing the frontend (website) using the Live Server and your VM’s IP address. Therefore is
But this cannot be shared with others since the VM will be shut down after a while. Hence is
To be able to share this website with others and to be able to access it publicly, it needs to be
deployed. So to do this using render and netlify. Render is the platform where the deployment
of the backend and netlify is the platform where frontend will be deployed.
To deploy this Backend publicly so that it can be used by a publicly deployed Frontend.And
To deploy the Backend to Render. Render is a cloud service to deploy your apps and websites.
Starting by signing in to Render with Google Sign-in.
In the dashboard, click "New +" button then select the second option which is Web
Services.
In the Create a new Web Service, click on Connect GitHub, here there will be a option
of selecting the GitHub repository which contains your project.
Sign in to the GitHub account.
Then Render would ask for permission to access the GitHub repository, click on
Authorize Render.
35
Here you select "All repositories", just for simplicity, or we can also hand-pick the
repositories we want to deploy. Then click on Install.
You will be redirected to the dashboard, click "New +" button then select the second
option which is Web Services. Then select the repository which is to be deployed and
click on Connect.
almost done, there will be some logs that will be visible upon successful deployment.
now hit the API endpoints by using the below provided URL.
36
Fig: Log of Successful Deployement
37
2.6.2 Frontend deployment to Netlify:
The QTrip static website is ready. Now, let's deploy it publicly so that it can be shared with
others. We will be using netlify to do the deployment, which is a platform that can be used for
this purpose.
38
39
40
2.7 CONCLUSION:
While travel planner websites have revolutionized the way people plan their trips, there are
several areas that require improvement. Enhancing the user interface, expanding destination
coverage, ensuring accurate and up-to-date information, offering more customization options,
providing comprehensive reviews and recommendations, optimizing the mobile experience,
and implementing efficient customer support channels are key areas that need attention.
Addressing these issues will not only enhance the user experience but also establish the travel
planner website as a reliable and indispensable tool for travelers worldwide.
The system provides a user-friendly and interactive interface that automates and streamlines
banking operations, including account management, transaction tracking, fund transfers, bill
payments, and loan processing. The system improves the accuracy and speed of banking
services, reduces wait times, minimizes errors, and increases customer satisfaction.
By incorporating JavaScript into the static travel website, the project aims to transform it into
a dynamic and interactive platform. The integration of JavaScript will enhance user
experience, provide real-time information, enable user interactivity, implement booking
functionalities, and create personalized itineraries. This will ultimately make the website more
engaging, user-friendly, and valuable to travelers.
41
Local storage to improve user experience
Using JavaScript libraries and inbuilt methods
Some key components needed for websites including the layout, stylesheet, form,
table, bootstrap, carousel, responsiveness, links etc.
Deployment using Netlify and Render
By incorporating JavaScript into the static travel website, the project aims to transform it into
a dynamic and interactive platform. The integration of JavaScript will enhance user
experience, provide real-time information, enable user interactivity, implement booking
functionalities, and create personalized itineraries. This will ultimately make the website more
engaging, user-friendly, and valuable to travelers.
42
REFERENCES
43
REFERENCES:
44