This is a Car Dealership Web App built using Django Rest Framework (DRF) for the backend and React for the frontend. The application allows users to buy, sell, compare, and review cars. It also includes user authentication, messaging, wishlist, and (FUTURE) AI-based car recommendations.
✅ User Authentication (JWT-based Login & Registration)
✅ Car Listings with Images (Front, Side, Back, Interior)
✅ Wishlist & Car Comparisons
✅ Messaging between Buyers & Dealers
✅ Reviews & Ratings
✅ AI-Based Car Recommendations (Based on Search History)
✅ Transaction Handling for Car Purchases
- Backend: Django, Django Rest Framework (DRF)
- Frontend: React (separate repository)
- Database: PostgreSQL
- Authentication: JWT (djangorestframework-simplejwt)
- ** >> (FUTURE) AI/ML**: Search History-Based Car Recommendations, User search history.
git clone https://github.com/your-username/car-dealership.git
cd car-dealershippip install pipenv
pipenv shellpipenv installCreate a .env file in the root directory and add:
SECRET_KEY=your_secret_key
DEBUG=True
DATABASE_URL=postgres://user:password@localhost:5432/car_db
ALLOWED_HOSTS=*python manage.py migratepython manage.py createsuperuserpython manage.py runserverPOST /scs/users/→ Register a new userPOST /scs/token/→ Get JWT token (Login)POST /scs/token/refresh/→ Refresh JWT token
GET /scs/cars/→ List all carsPOST /scs/cars/→ Add a new car (Authenticated users only)GET /scs/cars/{id}/→ Get details of a specific carPUT /scs/cars/{id}/→ Update a car listingDELETE /scs/cars/{id}/→ Delete a car listing
POST /scs/car-images/→ Upload images for a car
GET /scs/wishlist/→ Get user’s wishlistPOST /scs/wishlist/→ Add a car to wishlistDELETE /scs/wishlist/{id}/→ Remove a car from wishlist
POST /scs/compare/→ Compare two cars
POST /scs/reviews/→ Add a reviewGET /scs/reviews/{car_id}/→ Get reviews for a car
POST /scs/messages/→ Send a message to a dealerGET /scs/messages/→ Get messages
POST /scs/transactions/→ Purchase a carGET /scs/transactions/→ Get user transactions
python manage.py test- Deploy using Docker, AWS, or Heroku
Example (Docker):
docker build -t car-dealership-app .
docker run -p 8000:8000 car-dealership-app📂 SCS-203/
├── 📂 Car/
│ ├── 📜 models.py # Defines Car & SearchHistory models
│ ├── 📜 views.py # API views
│ ├── 📜 urls.py # API endpoints
│ ├── 📜 serializers.py # DRF serializers
│ ├── 📜 recommendations.py # Hybrid recommendation logic
│ ├── 📜 tasks.py # Celery tasks for retraining
│ ├── 📜 apps.py # App configurations
├── 📜 settings.py # Django settings
├── 📜 manage.py # Django entry point
├── 📜 README.md # Project documentation/scs/register/ { "first_name":"John", "last_name" :"hire", "username": "john_doe", "email": "john@hotwheel.com", "password": "securepassword123", "phone": "+123456789" }
/scs/car-images/ ''' { "id": 1, "car": 1, "image": "/media/car_images/GLA_s8Dfuda.jpg", "image_type": "front" }, { "id": 2, "car": 1, "image": "/media/car_images/GLA_back_INbZDBY.jpeg", "image_type": "interior" },
/scs/cars/ [ { "id": 1, "dealer": 1, "make": "Mercede-Benz", "model": "2024 model", "year": 2024, "price": "5420800.00", "mileage": 0, "condition": "new", "transmission": "automatic", "fuel_type": "petrol", "color": "Black", "description": "The GLA features a sleek and dynamic exterior, characterized by its aerodynamic lines and modern aesthetics. Inside, the cabin offers a spacious and luxurious environment, equipped with high-quality materials and advanced technology. Standard amenities include power-adjustable front seats with memory, dual-zone climate control, and a panoramic sunroof. The rear seats are designed to provide ample head and legroom, ensuring comfort for all passengers.", "created_at": "2025-02-10T11:38:08.612115Z", "updated_at": "2025-02-10T11:40:09.797295Z" } ]
- Fork the repo
- Create a new branch (
git checkout -b feature-name) - Commit changes (
git commit -m 'Added new feature') - Push branch (
git push origin feature-name) - Open a Pull Request
This project is licensed under the MIT License.