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 β¦