Skip to content

VladMoticica/Price_Comparator_Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📈 Price Comparator Java Backend App

A backend application for comparing product prices across multiple stores.
Built with Java, Spring Boot, and Gradle, this project processes CSV product data and provides endpoints for alerts, baskets, discounts, and product information.

🛠 Tools & Technologies

IDE: IntelliJ IDEA
Language: Java (OpenJDK 17.0.15)
Build Tool: Gradle (Kotlin DSL)
Framework: Spring Boot
CSV Handling: BufferedReader (no external libraries)
Frontend: HTML, JavaScript

📁 Project Structure

src/
 ├── main/
 │  ├── java/
 │  │  └── org.App/
 │  │    ├── Controllers/
 │  │    │  ├── AlertsController
 │  │    │  ├── BasketController
 │  │    │  ├── DiscountsController
 │  │    │  ├── HomeController
 │  │    │  └── ProductsController
 │  │    ├── Loaders/
 │  │    │  ├── DiscountsLoader
 │  │    │  └── ProductsLoader
 │  │    ├── Models/
 │  │    │  ├── Alerts
 │  │    │  ├── Discounts
 │  │    │  └── Products
 │  │    ├── Service/
 │  │    │  ├── AlertsService
 │  │    │  ├── DiscountsService
 │  │    │  └── ProductsService
 │  │    └── Main
 │  └── resources/
 │    ├── data/
 │    │  ├── kaufland_2025-05-01.csv
 │    │  ├── kaufland_2025-05-08.csv
 │    │  ├── kaufland_discounts_2025-05-01.csv
 │    │  ├── kaufland_discounts_2025-05-08.csv
 │    │  ├── lidl_2025-05-01.csv
 │    │  ├── lidl_2025-05-08.csv
 │    │  ├── lidl_discounts_2025-05-01.csv
 │    │  ├── lidl_discounts_2025-05-08.csv
 │    │  ├── mega_2025-05-20.csv
 │    │  ├── mega_2025-05-23.csv
 │    │  ├── mega_discounts_2025-05-20.csv
 │    │  ├── mega_discounts_2025-05-23.csv
 │    │  ├── profi_2025-05-01.csv
 │    │  ├── profi_2025-05-08.csv
 │    │  ├── profi_discounts_2025-05-01.csv
 │    │  └── profi_discounts_2025-05-08.csv
 │    └── static/
 │      ├── add-alert.html
 │      ├── basket.html
 │      └── delete-alert.html
 └────/

🚀 Getting Started

  1. Download the project
    Go to the master branch → click Code → Download ZIP
  2. Open in IntelliJ
    Unzip the project
    Right-click the folder → Open Folder as IntelliJ IDEA Project
    Click Trust Project if prompted
  3. Set JDK
    Click SetupSDK in the top-right yellow ribbon
    Select ms-17 (OpenJDK 17.0.15)
  4. Load Gradle
    Click Load in the bottom-right corner to load Gradle build files
  5. Run the Application
    Navigate to src/main/java/org.App/Main
    Click the green Run arrow
  6. Access the Backend
    Open your browser at: http://localhost:8080/home
    Example endpoints: /products/store/{storeName} → storeName: lidl | kaufland | profi | mega/products/category/{categoryName}
    Replace {storeName} or {categoryName} with your desired value

📌 Assumptions

IntelliJ IDEA and OpenJDK 17 must be installed
Tested with ms-17, JDK version 17.0.15

📊 Features

View product lists per store
Monitor discounts and promotions
Manage product alerts
Handle baskets with products
Simple HTML/JS frontend for interaction

⚙ How CSVs Are Used

CSV files are loaded via BufferedReader without external libraries
Products and discounts are parsed and stored in memory
Supports multiple stores with versioned CSVs

🔗 Live Links (Local)

Home: /home
Products: /products/store/{storeName}
Alerts: /alerts
Basket: /basket
Discounts: /discounts

About

Java Price Comparing Backend App Using Spring Boot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors