Professional Documents
Culture Documents
web project 1
web project 1
Mini Project
(Single Member Mini Project)
School: SCOPE
1
INDEX
Table of contents
S. No Topics
1. Title page
2. Index
3. Abstract
4. Introduction
5. Technologies Used
6. Implementation
7. Deployement
8. References
2
Abstract
3
Problem Statement:
The current car rental industry faces challenges in providing a
seamless and user-friendly online booking experience. Users often
encounter issues such as limited vehicle availability, complex booking
processes, and lack of personalized recommendations based on their
preferences.
Project Overview:
The React-based car rental website aims to address these challenges
by creating a modern and intuitive platform for users to easily
discover, book, and manage rental vehicles. The website will offer a
diverse fleet of vehicles, personalized recommendations, and a user-
friendly interface for a hassle-free booking experience.
4
3. Integrate a recommendation system that suggests relevant
vehicles based on user history and preferences.
4. Develop a secure authentication system for user accounts and
a dashboard for managing bookings, payments, and profiles.
5. Ensure responsive design and compatibility across various
devices and screen sizes for a consistent user experience.
6. Optimize performance and loading times to provide a smooth
and efficient booking process.
Technologies Used
5
. Through its component-based architecture, React enables
the creation of reusable UI elements, facilitating modular
development and efficient rendering of user interface
elements.
The project will utilize HTML, CSS, JavaScript, React, and possibly
additional libraries or frameworks for enhanced functionality such as
Redux for state management, Firebase for authentication and database
storage, and Axios for handling API requests.
6
Implementation
7
1. Import Statements:
• import React from "react";: Imports the main React
object from the "react" package.
• import { Routes, Route, Navigate } from "react-router-
dom";: Imports the necessary components from the
react-router-dom package. Specifically, it imports
Routes, Route, and Navigate components for handling
routing in the application.
• Imports for various page components like Home, About,
CarListing, CarDetails, Blog, BlogDetails, and Contact
from their respective files in "../pages/" directory.
2. Routers Component:
• const Routers = () => { ... }: Defines a functional
component named Routers responsible for setting up
routing in the application.
• return ( ... ): Contains the JSX code representing the
routing configuration using <Routes> and <Route>
components.
3. Routes and Route Components:
• <Routes> ... </Routes>: This is the root component for
defining routes in the application. It wraps multiple
<Route> components that define specific routes and
their corresponding components.
• <Route path="/" element={<Navigate to="/home" />} />:
Redirects the root path "/" to "/home" using the
<Navigate> component from react-router-dom. This
ensures that when users visit the root URL, they are
redirected to the home page.
• Various <Route> components are used to map different
URL paths to their corresponding components:
• /home maps to the Home component.
8
•/blogs/:slug maps dynamic URLs for individual blog
details using the BlogDetails component.
• /contact maps to the Contact component.
Components
Header.jsx file
const navLinks = [
{
path: "/home",
display: "Home",
},
{
path: "/about",
display: "About",
},
{
path: "/cars",
display: "Cars",
},
{
path: "/blogs",
display: "Blog",
},
9
{
path: "/contact",
display: "Contact",
}
];
return (
<header className="header">
{/* ============ header top ============ */}
<div className="header__top">
<Container>
<Row>
<Col lg="6" md="6" sm="6">
<div className="header__top__left">
<span>Need Help?</span>
<span className="header__top__help">
<i class="ri-phone-fill"></i> +1-202-555-0149
</span>
</div>
</Col>
10
<Row>
<Col lg="4" md="3" sm="4">
<div className="logo">
<h1>
<Link to="/home" className=" d-flex align-items-center
gap-2">
<i class="ri-car-line"></i>
<span>
Rent Car <br /> Service
</span>
</Link>
</h1>
</div>
</Col>
<Col
lg="2"
md="3"
sm="0"
className=" d-flex align-items-center justify-content-end
"
>
<button className="header__btn btn ">
11
<Link to="/contact">
<i class="ri-phone-line"></i> Request a call
</Link>
</button>
</Col>
</Row>
</Container>
</div>
<div className="main__navbar">
<Container>
<div className="navigation__wrapper d-flex align-items-center
justify-content-between">
<span className="mobile__menu">
<i class="ri-menu-line" onClick={toggleMenu}></i>
</span>
<div className="nav__right">
<div className="search__box">
<input type="text" placeholder="Search" />
<span>
<i class="ri-search-line"></i>
</span>
</div>
</div>
</div>
</Container>
</div>
12
</header>
);
};
Footer.jsx file
import React from "react";
const quickLinks = [
{
path: "/about",
display: "About",
},
{
path: "#",
display: "Privacy Policy",
13
},
{
path: "/cars",
display: "Car Listing",
},
{
path: "/blogs",
display: "Blog",
},
{
path: "/contact",
display: "Contact",
},
];
14
<h5 className="footer__link-title">Quick Links</h5>
<ListGroup>
{quickLinks.map((item, index) => (
<ListGroupItem key={index} className="p-0 mt-3
quick__link">
<Link to={item.path}>{item.display}</Link>
</ListGroupItem>
))}
</ListGroup>
</div>
</Col>
<p className="office__info">Email:
atulmangla210503@gmail.com</p>
<Col lg="12">
<div className="footer__bottom">
<p className="section__description d-flex align-items-
center justify-content-center gap-1 pt-4">
<i class="ri-copyright-line"></i>Copyright {year},
Developed by
Atul Mangla. All rights reserved.
</p>
15
</div>
</Col>
</Row>
</Container>
</footer>
);
};
16
UI components:
Aboutsection.jsx
17
amet.
</p>
18
Becomedriversection.jsx
Bloglist.jsx
import React from "react";
import { Col } from "reactstrap";
import "../../styles/blog-item.css";
import { Link } from "react-router-dom";
import blogData from "../../assets/data/blogData";
19
<BlogItem item={item} key={item.id} />
))}
</>
);
};
return (
<Col lg="4" md="6" sm="6" className="mb-5">
<div className="blog__item">
<img src={imgUrl} alt="" className="w-100" />
<div className="blog__info p-3">
<Link to={`/blogs/${title}`} className="blog__title">
{title}
</Link>
<p className="section__description mt-3">
{description.length > 100
? description.substr(0, 100)
: description}
</p>
20
);
};
Bookingform.jsx
import React from "react";
import "../../styles/booking-form.css";
import { Form, FormGroup } from "reactstrap";
21
<FormGroup className="booking__form d-inline-block ms-1 mb-4">
<select name="" id="">
<option value="1 luggage">1 luggage</option>
<option value="2 luggage">2 luggage</option>
<option value="3 luggage">3 luggage</option>
<option value="4 luggage">4 luggage</option>
<option value="5+ luggage">5+ luggage</option>
</select>
</FormGroup>
<FormGroup>
<textarea
rows={5}
type="textarea"
className="textarea"
placeholder="Write"
></textarea>
</FormGroup>
</Form>
);
};
CarItem.jsx
import React from "react";
import { Col } from "reactstrap";
import { Link } from "react-router-dom";
import "../../styles/car-item.css";
return (
22
<Col lg="4" md="4" sm="6" className="mb-5">
<div className="car__item">
<div className="car__img">
<img src={imgUrl} alt="" className="w-100" />
</div>
HeroSlider.jsx
import React from "react";
23
import "../../styles/hero-slider.css";
24
<h1 className="text-light mb-4">Reserve Now and Get 50%
Off</h1>
ServiceList.jsx
import React from "react";
import { Col } from "reactstrap";
import "../../styles/services-list.css";
import servicesData from "../../assets/data/serviceData";
<h6>{item.title}</h6>
<p className="section__description">{item.desc}</p>
</div>
</Col>
);
25
Testimonial .jsx
import React from "react";
import Slider from "react-slick";
import "../../styles/testimonial.css";
return (
<Slider {...settings}>
<div className="testimonial py-4 px-3">
<p className="section__description">
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Ducimus magni
26
explicabo molestias recusandae repudiandae, dolor, sapiente
placeat
ab, animi eum minima nulla facere aliquam aut vitae quo
pariatur
voluptate odit?
</p>
<div>
<h6 className="mb-0 mt-3">Jhon Doe</h6>
<p className="section__description">Customer</p>
</div>
</div>
</div>
<div>
<h6 className="mb-0 mt-3">Jhon Doe</h6>
<p className="section__description">Customer</p>
</div>
</div>
</div>
27
<div className="mt-3 d-flex align-items-center gap-4">
<img src={ava03} alt="" className="w-25 h-25 rounded-2" />
<div>
<h6 className="mb-0 mt-3">Jhon Doe</h6>
<p className="section__description">Customer</p>
</div>
</div>
</div>
<div>
<h6 className="mb-0 mt-3">Jhon Doe</h6>
<p className="section__description">Customer</p>
</div>
</div>
</div>
</Slider>
);
};
28
React pages
About.jsx
import React from "react";
<section className="about__page-section">
<Container>
<Row>
<Col lg="6" md="6" sm="12">
<div className="about__page-img">
<img src={driveImg} alt="" className="w-100 rounded-3"
/>
</div>
</Col>
<p className="section__description">
Lorem ipsum dolor sit, amet consectetur adipisicing
elit.
Eveniet veniam assumenda aperiam accusantium ex autem
perferendis repellendus nostrum delectus. Nemo et
dolore est
tempore rem minima adipisci magni dolorum ipsam.
</p>
29
<p className="section__description">
Lorem ipsum dolor sit, amet consectetur adipisicing
elit.
Eveniet veniam assumenda aperiam accusantium ex autem
perferendis repellendus nostrum delectus. Nemo et
dolore est
tempore rem minima adipisci magni dolorum ipsam.
</p>
<div>
<h6 className="section__subtitle">Need Any
Help?</h6>
<h4>+00123456789</h4>
</div>
</div>
</div>
</Col>
</Row>
</Container>
</section>
<BecomeDriverSection />
<section>
<Container>
<Row>
<Col lg="12" className="mb-5 text-center">
<h6 className="section__subtitle">Experts</h6>
<h2 className="section__title">Our Members</h2>
</Col>
<OurMembers />
</Row>
</Container>
</section>
</Helmet>
);
};
30
Blog.jsx
import React from "react";
import { Container, Row } from "reactstrap";
import Helmet from "../components/Helmet/Helmet";
import CommonSection from "../components/UI/CommonSection";
import BlogList from "../components/UI/BlogList";
BlogDetail.jsx
import React, { useEffect } from "react";
import { Container, Row, Col, Form, FormGroup, Input } from
"reactstrap";
import "../styles/blog-details.css";
useEffect(() => {
31
window.scrollTo(0, 0);
}, [blog]);
return (
<Helmet title={blog.title}>
<section>
<Container>
<Row>
<Col lg="8" md="8">
<div className="blog__details">
<img src={blog.imgUrl} alt="" className="w-100" />
<h2 className="section__title mt-
4">{blog.title}</h2>
<p
className="section__description">{blog.description}</p>
<h6 className="ps-5 fw-normal">
<blockquote className="fs-
4">{blog.quote}</blockquote>
</h6>
<p
className="section__description">{blog.description}</p>
</div>
32
<div className="comment__content">
<h6 className=" fw-bold">David Visa</h6>
<p className="section__description mb-0">14
July, 2022</p>
<p className="section__description">
Lorem ipsum dolor sit amet consectetur
adipisicing elit.
Eos nobis totam eius laborum molestias
itaque minima
distinctio, quae velit tempore!
</p>
<Form>
<FormGroup className=" d-flex gap-3">
<Input type="text" placeholder="Full name"
/>
<Input type="email" placeholder="Email" />
</FormGroup>
<FormGroup>
<textarea
rows="5"
className="w-100 py-2 px-3"
placeholder="Comment..."
></textarea>
</FormGroup>
33
</div>
</Col>
CarDetail.jsx
import React, { useEffect } from "react";
34
const singleCarItem = carData.find((item) => item.carName ===
slug);
useEffect(() => {
window.scrollTo(0, 0);
}, [singleCarItem]);
return (
<Helmet title={singleCarItem.carName}>
<section>
<Container>
<Row>
<Col lg="6">
<img src={singleCarItem.imgUrl} alt="" className="w-
100" />
</Col>
<Col lg="6">
<div className="car__info">
<h2
className="section__title">{singleCarItem.carName}</h2>
<p className="section__description">
{singleCarItem.description}
</p>
<div
35
className=" d-flex align-items-center mt-3"
style={{ columnGap: "4rem" }}
>
<span className=" d-flex align-items-center gap-
1 section__description">
<i
class="ri-roadster-line"
style={{ color: "#f9a826" }}
></i>{" "}
{singleCarItem.model}
</span>
<div
className=" d-flex align-items-center mt-3"
style={{ columnGap: "2.8rem" }}
>
<span className=" d-flex align-items-center gap-
1 section__description">
<i class="ri-map-pin-line" style={{ color:
"#f9a826" }}></i>{" "}
{singleCarItem.gps}
</span>
36
style={{ color: "#f9a826" }}
></i>{" "}
{singleCarItem.seatType}
</span>
37
Contact.jsx
import React from "react";
import { Link } from "react-router-dom";
import { Container, Row, Col, Form, FormGroup, Input } from
"reactstrap";
import Helmet from "../components/Helmet/Helmet";
import CommonSection from "../components/UI/CommonSection";
import "../styles/contact.css";
const socialLinks = [
{
url: "#",
icon: "ri-facebook-line",
},
{
url: "#",
icon: "ri-instagram-line",
},
{
url: "#",
icon: "ri-linkedin-line",
},
{
url: "#",
icon: "ri-twitter-line",
},
];
<Form>
<FormGroup className="contact__form">
<Input placeholder="Your Name" type="text" />
</FormGroup>
<FormGroup className="contact__form">
<Input placeholder="Email" type="email" />
</FormGroup>
38
<FormGroup className="contact__form">
<textarea
rows="5"
placeholder="Message"
className="textarea"
></textarea>
</FormGroup>
39
</div>
</Col>
</Row>
</Container>
</section>
</Helmet>
);
};
Home.jsx
import React from "react";
<div className="hero__form">
<Container>
<Row className="form__row">
<Col lg="4" md="4">
<div className="find__cars-left">
<h2>Find your best car here</h2>
</div>
</Col>
40
<Col lg="8" md="8" sm="12">
<FindCarForm />
</Col>
</Row>
</Container>
</div>
</section>
{/* =========== about section ================ */}
<AboutSection />
{/* ========== services section ============ */}
<section>
<Container>
<Row>
<Col lg="12" className="mb-5 text-center">
<h6 className="section__subtitle">See our</h6>
<h2 className="section__title">Popular Services</h2>
</Col>
<ServicesList />
</Row>
</Container>
</section>
{/* =========== car offer section ============= */}
<section>
<Container>
<Row>
<Col lg="12" className="text-center mb-5">
<h6 className="section__subtitle">Come with</h6>
<h2 className="section__title">Hot Offers</h2>
</Col>
41
<h6 className="section__subtitle">Our clients
says</h6>
<h2 className="section__title">Testimonials</h2>
</Col>
<Testimonial />
</Row>
</Container>
</section>
<BlogList />
</Row>
</Container>
</section>
</Helmet>
);
};
42
Website Screenshots
43
44
45
46
Payment page
47
Deployment
Conclusion
In conclusion, Meloflow represents a promising
webbased music player application designed to provide
users with a seamless and enjoyable music streaming
experience. Throughout its development, several key
features and functionalities have been implemented to
deliver on this goal.
48
caters to the diverse needs of music enthusiasts across
different devices and platforms.
References
• W3School:https://www.w3schools.com/REACT/D
EFAULT.ASP
• External Library used
•animate.css
• Took references from Websites:
Car dekho
49
• GFG
GitHub link:
https://github.com/atul21mangla/WEB-programming-lab-tasks.git
50