Skip to content

Fr4n9/PROP_Supermaket_manager

Repository files navigation

EspañolCatalà

Supermarket Manager 🛒

Smart optimization of product distribution in supermarkets to maximize sales and efficiency.

Java Gradle Status


📖 Table of Contents


🎯 Project Description

Supermarket Manager is a desktop application designed to solve the complex problem of product distribution on supermarket shelves.

The goal is to generate an optimal layout that not only enhances the customer experience but also increases sales through strategic product placement based on data and similarities between products defined by the supermarket itself.

The system uses advanced algorithms, such as a solution to the Travelling Salesman Problem (TSP) and Backtracking, to calculate the most efficient layout.


✨ Key Features

  • Profile Management: Create, load, and edit supermarket profiles containing the product catalog and sales data.
  • Shelf Management: Define the physical structure of supermarket shelves.
  • Optimal Distribution Calculation: Automatically generate the best product layout using different algorithmic strategies.
  • Similarity Analysis: Modify and consult the similarity matrix between products to refine cross-selling strategies.
  • Result Visualization: Display the final distribution graphically and intuitively.
  • Data Persistence: Save and load the application's state (profiles, shelves) for future use.

🚀 Quick Demo

alt_text alt_text alt_text


🛠️ Tech Stack and Architecture

  • Language: Java (JDK 22)
  • UI: Java Swing for the desktop interface.
  • Build System: Gradle for dependency management and task automation.

The project follows a Layered Architecture to separate responsibilities:

  • Presentation Layer (UI): Swing views interacting with the user.
  • Domain Layer: Contains business logic and core entities (Product, Profile, etc.).
  • Persistence Layer: Handles reading and writing data to files.
  • Controllers: Coordinate communication between layers to keep them as independent as possible.

The project also uses several interfaces to decouple the various calculation methods from the core code.


🏁 Getting Started

Follow these instructions to get a working copy of the project on your local machine.

Prerequisites

Installation and Execution

  1. Clone the repository:

    git clone <REPOSITORY-URL>
    cd PROP_Supermaket_manager
  2. Build the project with Gradle:

    On Windows:

    ./gradlew.bat build

    On macOS/Linux:

    ./gradlew build
  3. Run the application:

    On Windows:

    ./gradlew.bat run

    On macOS/Linux:

    ./gradlew run

Run Tests

To run the unit test suite and ensure everything works as expected:

On Windows:

./gradlew.bat test

On macOS/Linux:

./gradlew test

📁 Project Structure

.
├── DOCS/                     # Project documentation: user manual, testing, etc.
├── EXE/                      # .jar executables organized by class type (test, exceptions, etc.)
├── FONTS/                    # Source code, including JUnit tests
├── JAVADOC/                  # Documentation generated with JavaDoc
├── PERFILES/                 # Saved profile data (.dat)
├── PRESTATGERIES/            # Shelf data (.dat)
├── build/                    # Gradle-generated files
└── src/main/java/edu/upc/prop/clusterxx/
    ├── clases_dominio/             # Data models (Product, Profile)
    ├── controladores/              # Business and UI logic
    ├── controladores_persistencia/ # Logic for saving/loading data
    ├── controladores_presentacion/ # Graphical interface views
    └── estrategias_calculo/        # Optimization algorithms

🧰 Useful Gradle Commands

./gradlew run                  # Run the application
./gradlew test                 # Run tests
./gradlew build                # Compile and build the project
./gradlew clean                # Clean compiled files
./gradlew jar                  # Generate a .jar in build/libs (without dependencies)
./gradlew compileAllClasses    # Compile all classes in /classes/java
./gradlew assembleDist         # Create a complete distribution (.zip and .tar) for running without an IDE

👥 Development Team

PROP Group 31.5 — Projecte de Programació, UPC

Professor: Carles Arnal (carles.arnal@upc.edu)

Group Members:


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors