This project is built using React, Redux, and React Router to create a single-page application (SPA) with state management powered by Redux. Axios is used to handle API requests, and CSS modules are used for component styling. The backend is mocked using MockAPI for handling data operations.
- Node.js >= 18.0.0
- npm
- Clone the repository:
git clone https://github.com/neoversity-woolf/travel-trucks-app
- Navigate to the project directory:
cd path/to/folder/travel-trucks-app
- Install dependencies: Using npm:
npm install
- Start the development server: Using npm:
npm run dev
- Open your browser and go to:
http://localhost:5173/
- Vite — For fast project setup and development.
- React — For building user interfaces.
- Redux — For state management.
- React Router — For routing between pages.
- Axios — For handling HTTP requests.
- CSS Modules — For styling components.
src/
│
├── assets/ # Static files (images, icons, etc.)
├── components/ # Reusable UI components and custom elements
├── pages/ # Pages for routing (each page corresponds to a route)
├── redux/ # Redux state management (slices, store, actions)
├── utils/ # Utility functions and helper modules used across the project
├── App.css # Styles specific to the main App component
├── App.jsx # Root App component that handles routing and layout
├── index.css # Global application styles (applied to the entire project)
└── main.jsx # Entry point of the application that renders the App component
- Home Page — Contains a banner with a primary call-to-action.
- Catalog Page — Displays a list of available vehicles with filtering options by:
- Location
- Type of vehicle
- Availability of air conditioning
- Kitchen, etc.
- Camper Detail Page — Displays detailed information about a selected camper, including a photo gallery, user reviews, and a booking form.
- The project follows a component-based architecture.
- DRY (Don't Repeat Yourself) principle is applied to minimize code duplication.
- Code is kept clean and readable with comments where necessary to improve understanding.
The project is deployed on Netlify and can be accessed at travel-trucks.netlify.app. To deploy the project on Netlify:
- Go to Netlify and create a new site.
- Connect your Git repository.
- Set the build command in the settings:
npm run build
- Set the publish directory to:
dist
The project will automatically be deployed to Netlify after each push to the main branch.
This project is licensed under the MIT License.