TravelTrucks is the front-end part of a web application designed for the rental of campers. Built using ReactJS on Vite, it provides customers with an intuitive interface to explore available campers, manage their favorites, and make bookings seamlessly.
Multiple Pages: The application consists of several key pages:
Home Page: Features a banner with a primary call to action
Catalog Page: Displays all available campers with filtering options
Favorites Page: (extra feature) Allows users to save campers for future review
Individual Camper Page: Includes details, a photo gallery, user reviews, and a booking form
The application uses a pre-built backend-api available at MockAPI to manage camper listings.
Frameworks and Libraries:
Routing:
/
- Home Page./catalog
- Catalog Page./catalog/:id
- Individual Camper Page./favorites
- Favorites Page (extra feature)./404
- NotFound.State Management:
Dependencies: The project utilizes several key libraries to enhance functionality:
react-datepicker
: For selecting dates in the booking form.react-hot-toast
: For displaying notifications upon successful actions
like bookings, filters, favorites applied.react-loader-spinner
: For loading indicators during asynchronous
operations.The design of the TravelTrucks application is guided by a UI Kit that includes:
Icons: Common icons to represent features like -air conditioning, -bathroom, -kitchen, and more.
└── travel-trucks
├── public/
├── src
│ ├── App.jsx
│ ├── main.jsx
│ ├── index.css
│ ├── api
│ │ └── apiService.js
│ ├── common
│ │ └── components
│ │ ├── Booking
│ │ │ ├── Booking.jsx
│ │ │ └── index.module.css
│ │ ├── Buttons
│ │ │ ├── Button.jsx
│ │ │ ├── Button.module.css
│ │ │ ├── Checkbox.jsx
│ │ │ └── RadioButton.jsx
│ │ ├── CardBadge
│ │ │ ├── CardBadge.jsx
│ │ │ └── index.module.css
│ │ ├── CardContent
│ │ │ ├── CardContent.jsx
│ │ │ ├── CardFiltered.jsx
│ │ │ └── index.module.css
│ │ ├── CardDetails
│ │ │ ├── FeaturesTab.jsx
│ │ │ ├── Gallery.jsx
│ │ │ ├── ReviewsTab.jsx
│ │ │ ├── TabButton.jsx
│ │ │ ├── helper.js
│ │ │ └── index.module.css
│ │ ├── CardFilter
│ │ │ ├── CardFilter.jsx
│ │ │ └── index.module.css
│ │ ├── CardList
│ │ │ ├── CardList.jsx
│ │ │ └── index.module.css
│ │ ├── UI
│ │ │ ├── EmptyList
│ │ │ │ ├── EmptyList.jsx
│ │ │ │ └── index.module.css
│ │ │ ├── Input
│ │ │ │ ├── Input.jsx
│ │ │ │ └── index.module.css
│ │ │ ├── Loader
│ │ │ │ ├── Loader.jsx
│ │ │ │ └── index.module.css
│ │ │ ├── ScrollToTop
│ │ │ │ ├── ScrollToTop.jsx
│ │ │ │ └── index.module.css
│ │ │ └── Textarea
│ │ │ ├── Textarea.jsx
│ │ │ └── index.module.css
│ │ ├── icons/
│ │ ├── img/
│ │ └── layouts
│ │ └── SharedLayout
│ │ ├── SharedLayout.jsx
│ │ └── SharedLayout.module.css
│ ├── hooks
│ │ └── useCamperDetails.jsx
│ ├── pages
│ │ ├── CatalogPage
│ │ │ └── CatalogPage.jsx
│ │ ├── DetailsPage
│ │ │ ├── DetailsPage.jsx
│ │ │ └── index.module.css
│ │ ├── FavoritesPage
│ │ │ └── FavoritesPage.jsx
│ │ ├── HomePage
│ │ │ ├── HomePage.jsx
│ │ │ └── index.module.css
│ │ └── NotFoundPage
│ │ ├── NotFound.jsx
│ │ └── index.module.css
│ ├── store
│ │ ├── dataSlice.jsx
│ │ ├── favoritesSlice.jsx
│ │ ├── reducer.jsx
│ │ ├── selectors.jsx
│ │ └── store.jsx
│ └── utils
│ ├── Fallback.jsx
│ ├── FavoriteIcon.jsx
│ ├── FormatLabel.jsx
│ ├── StarRating.jsx
│ ├── context.jsx
│ ├── error.jsx
│ ├── filterData.jsx
│ ├── filterIcons.jsx
│ ├── filterParams.jsx
│ ├── pagination.jsx
│ ├── placeholder.jsx
│ ├── scroller.jsx
│ └── validator.js
├── index.html
├── package-lock.json
├── package.json
├── README.md
└── vite.config.js