This project is a car catalog web application called Car Hub. It allows users to discover and explore various cars based on different parameters such as manufacturer, year, fuel type, and more.
- Car Catalog: Explore a wide range of cars available in the catalog.
- Search Functionality: Search for cars by manufacturer, year, model, and fuel type.
- Custom Filters: Filter cars based on fuel type and year of production.
- Car Details: View detailed information about each car, including specifications and images.
- Responsive Design: The application is responsive and works well on various screen sizes.
- Next.js: Used for building the frontend of the web application.
- React: Used for creating reusable UI components.
- Tailwind CSS: Used for styling the components and layouts.
- Headless UI: Used for creating accessible and composable React components.
- RapidAPI: Used for fetching car data from an external API.
app/
├── layout.tsx
└── page.tsx
components/
├── CarCard.tsx
├── CarDetails.tsx
├── CustomButton.tsx
├── CustomFilter.tsx
├── Footer.tsx
├── Hero.tsx
├── Navbar.tsx
├── SearchBar.tsx
├── SearchManufacturer.tsx
└── ShowMore.tsx
constants/
└── index.tsx
types/
└── index.tsx
utils/
└── index.tsx
- Defines the layout for the application, including the navbar and footer.
- Represents the main page of the application where users can explore cars.
- Displays information about a single car.
- Provides detailed information about a car in a modal dialog.
- Custom button component with optional right icon.
- Component for filtering cars based on fuel type and year of production.
- Footer component displaying company information and links.
- Hero section introducing the application with a call-to-action button.
- Navigation bar component displaying the logo and sign-in button.
- Component for searching cars by manufacturer and model.
- Component for searching car manufacturers using a dropdown.
- Component for displaying a button to load more cars.
- Contains arrays of manufacturers, years of production, and fuel types.
- Contains TypeScript interfaces for various props used in the application.
- Contains utility functions for fetching cars, generating car image URLs, calculating car rent, and updating search parameters.
- Exports:
fetchCars
,generateCarImageUrl
,calculateCarRent
,updateSearchParams
functions.
- Clone this repository to your local machine.
- Navigate to the project directory.
- Install dependencies using
npm install
oryarn install
. - Obtain a RapidAPI key and add it to the appropriate environment file.
- Run the development server using
npm run dev
oryarn dev
. - Open your browser and go to
http://localhost:3000
to view the application.