Modern car listing directory platform for buying and selling cars in Africa - Built with React, Node.js, Express, and MongoDB
# Autodealafrica 🚗
A modern car listing directory platform for buying and selling cars across Africa.
## Features
- 🔍 **Advanced Search & Filters** - Search by brand, model, price, fuel type, transmission
- 📝 **Easy Listing** - Add your car listings with detailed information
- 💼 **Dealer Directory** - Browse through quality vehicles from trusted dealers
- 📱 **Responsive Design** - Works seamlessly on desktop and mobile devices
- ⚡ **Fast & Lightweight** - Built with React and Express for optimal performance
- 🎨 **Modern UI** - Clean and intuitive user interface
## Tech Stack
### Frontend
- **React 18** - UI library
- **Vite** - Build tool and dev server
- **Axios** - HTTP client
- **CSS3** - Styling
### Backend
- **Node.js** - Runtime environment
- **Express** - Web framework
- **MongoDB** (optional) - Database
- **Mongoose** - ODM for MongoDB
- **CORS** - Cross-origin resource sharing
## Project Structure
```
autodealafrica/
├── backend/
│ ├── models/
│ │ └── Car.js
│ ├── routes/
│ │ └── cars.js
│ ├── .env.example
│ ├── package.json
│ └── server.js
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ │ ├── Header.jsx
│ │ │ ├── SearchBar.jsx
│ │ │ ├── CarList.jsx
│ │ │ ├── CarCard.jsx
│ │ │ ├── CarForm.jsx
│ │ │ └── Footer.jsx
│ │ ├── App.jsx
│ │ ├── App.css
│ │ ├── index.css
│ │ └── main.jsx
│ ├── index.html
│ ├── package.json
│ └── vite.config.js
├── .gitignore
└── README.md
```
## Installation & Setup
### Prerequisites
- Node.js (v16 or higher)
- npm or yarn
- MongoDB (optional, works with sample data without database)
### 1. Clone the Repository
```bash
git clone
cd autodealafrica
```
### 2. Backend Setup
```bash
cd backend
npm install
```
Create a `.env` file in the backend directory:
```env
PORT=5000
MONGODB_URI=mongodb://localhost:27017/autodealafrica
NODE_ENV=development
```
**Note:** If you don't have MongoDB installed, the app will work with sample data.
Start t …