An open API service indexing awesome lists of open source software.

https://github.com/marjory00/cardealerapp

Car Dealer Pro Management System: A car dealership's inventory, created with python
https://github.com/marjory00/cardealerapp

css css3 flask html jinja2 json python

Last synced: 2 months ago
JSON representation

Car Dealer Pro Management System: A car dealership's inventory, created with python

Awesome Lists containing this project

README

          

# Car Dealer Pro Management System

**Author:** Marjory D. Marquez

***

## Purpose of the Project

This is a portfolio demonstration of a full-stack web application built using **Python/Flask** for the backend, managing car inventory with **Object-Oriented Programming (OOP)** principles.

The primary goal of the **Car Dealer Pro Management System** is to provide a comprehensive, user-friendly, and persistent solution for managing a car dealership's inventory.

This application transitions from a Command Line Interface (CLI) to a **web-based interface** using the **Flask** framework, offering a professional, modern user experience for key dealership functions like adding new stock, viewing current inventory, and processing vehicle sales.

***

## Overview

This application utilizes a robust object-oriented Python backend to handle business logic and data persistence, while the Flask framework provides the sleek frontend web interface.

* **Professional Web Interface:** Utilizes **Flask**, HTML, and **CSS** for a clean, modern, and responsive user experience.
* **Inventory Management:** View all cars in a clean, professional table format.
* **Persistent Data Storage:** Inventory data is saved to a local **`cars.json`** file, ensuring all records are maintained between application sessions.
* **Add New Stock:** A dedicated web form for efficiently adding new vehicles with basic validation for data types and ensuring a unique Vehicle Identification Number (**VIN**).
* **Sales Processing:** Functionality to remove a car from the inventory (simulating a sale).

***

## Key Features & Improvements

This application handles a complete inventory lifecycle with robust features and recent improvements:

* **Full CRUD Functionality:** Add, View Detail, Edit, and Sell (Remove) vehicles.
* **Data Persistence:** Inventory and Sales History are saved using JSON files.
* **Dynamic Search & Sorting:** Users can filter the inventory instantly and sort columns (Make, Model, Year, Price, VIN) in ascending/descending order.
* **Enhanced Reporting:** Dedicated views for **Sold History** and aggregate **Sales Reports**.
* **Improved UX/Styling:**
* Cohesive dark theme and high-contrast styling across the header and footer.
* The "Add Car" button and navigation links are professionally styled.
* **Visual Flair:** Custom logos/icons added to the main header, Sales Report title, and Sold Inventory title.
* Robust form validation with flashing error messages.

***

## Case Study: Dealership Workflow

The application supports a typical dealership workflow:

1. **Acquisition:** When a new vehicle is purchased, an employee navigates to the **'Add New Car'** form, inputs the required details (Make, Model, Year, Price, VIN), and the application validates and saves the entry.
2. **Reporting:** The Sales Manager checks the **'Inventory'** page to see real-time stock levels, vehicle details, and total count, aiding sales and marketing decisions.
3. **Sale:** When a car is sold, the employee clicks the **'Sell'** button next to the car's entry. The application instantly removes the vehicle from the inventory and updates the local data file.

***

## 💻 Language & Technology Stack

| Component | Technology | Description |
| :--- | :--- | :--- |
| **Backend Logic** | **Python 3.x** | Handles all object creation (`Car`), data validation, and inventory manipulation. |
| **Web Framework** | **Flask** | Lightweight Python micro-framework used for application routing and template rendering. |
| **Frontend** | HTML5 / Jinja2 | Used to structure the web pages and dynamically display Python data within templates. |
| **Styling** | **CSS3** | Implements the custom, professional, and responsive aesthetic. |
| **Data Storage** | JSON | Simple, local file storage for persistent inventory data. |
| ***Principles:** | OOP | Object-Oriented Programming (OOP). |

***

## 📂 Project Structure

The project follows a standard modular structure for a Python application integrating the Flask framework:

```

CarDealerApp/
├── static/ # Contains public assets (linked via Flask)
│ ├── css/
│ │ └── style.css # Custom application styling
│ └── images/
│ ├── logo.jpg # Main header logo
│ ├── image-1.png # Sales Report icon
│ └── image-2.png # Sold History icon
├── cars.json # Persistent data file (IGNORED by Git)
├── .gitignore # Specifies files to ignore (e.g., cars.json)
├── app.py # Flask application entry point and routing logic
├── car.py # Data Model: Defines the Car class
├── dealer_manager.py # Business Logic: Handles all inventory operations (CRUD)
└── templates/
├── base.html # Main layout template (Header, Footer, Nav)
├── index.html # Main Inventory & Search page
├── car_detail.html # Single car view
├── add_car.html # Form to add a new car
├── edit_car.html # Form to edit an existing car
├── sold_cars.html # Detailed list of sold vehicles
└── sales.html # Sales Summary and Aggregate Report

```

***

## 🛑 Important Note on Source Code

This repository does **not** contain the complete source code for the "Car Dealer Manager" application.

The files included here are specifically selected for **portfolio review purposes** to demonstrate my skills in:
* **Application Architecture and Flask Routing**
* **Business Logic (CRUD operations)**
* **HTML Templating (Jinja2)**
* **CSS/Frontend Styling**

**Note:** Key backend files like **`app.py`** (Flask application) and **`dealer_manager.py`** (core logic/data management) are intentionally omitted from this public repository, as are other proprietary or infrastructural files. This repository represents a comprehensive *view* of the project's structure and my capabilities, not a complete, runnable clone.

***

## 📸 Application Overview Images Screenshots

These images demonstrate key features and the overall user interface of the Car Dealer Manager application.

### 1. Main Inventory View (Search & Sort)

![Main Inventory Table with Search Bar](static/images/screenshots/Inventory-View-Search.png)

### 2. Add New Car Form

![Form for adding a new vehicle with validation](static/images/screenshots/Add-New-Car-Form.png)

### 3. Detailed Car View

![Detailed view of a single car, including image and VIN]()

### 4. Sales Report Summary

![Sales History Report showing total revenue and sold units](static/images/screenshots/Sales-inventory.png)

### 5. Edit Car Details

![Form for editing the price, year, and image URL of an existing car](static/images/screenshots/Edit-car-details.png)

***

## ▶️ Getting Started

Follow these steps to set up and run the application locally on your Windows machine:

1. **Clone the Repository:**
```bash
git clone [https://github.com/Marjory00/CarDealerApp.git](https://github.com/Marjory00/CarDealerApp.git)
cd CarDealerApp
```

2. **Install Dependencies:**
```bash
pip install Flask
```

3. **Run the Application:**
```bash
python app.py
```

4. **Access the App:** Open your web browser and navigate to the address shown in your terminal (typically http://127.0.0.1:5000/).