Skip to content

Jain2098/TechStore-SkillOntario

Repository files navigation

TechStore - Dockerized Java App

TechStore is a simple Java CLI application to manage product inventory and sales. This version is containerized using Docker for easy deployment and testing.

📦 Features

  • Product Management:
    • Add new products
    • Update existing products
    • Delete products
    • View all products
    • View single product
    • View low stock products
  • Sales Management:
    • Make a sale
    • View sales report

🔧 Prerequisites

  • Java 21 (already compiled into the JAR)
  • Docker installed and running, if using Docker Method

🚀 Run → Using JAR File

  • Run the JAR file using the following command:
  • java -jar techstore.jar

🚀 Run → Using IntelliJ IDEA

  • Go to src/techstore/main/Main.java
  • Right-click → Run 'Main.main()'

🚀 Run → Using Docker

Build Docker Image

docker build -t techstore-app .

Basic Run (Temporary):

docker run --rm -it techstore-app

💾 To persist data/:

Windows (CMD):
docker run -v %cd%/data:/app/data --rm -it techstore-app

WSL/Linux/macOS (Bash):
docker run -v "$PWD/data:/app/data" --rm -it techstore-app

🧪 Running Tests

Unit tests for TechStore are written using JUnit 5 and are located in the /test folder.

🛠 How to Run Tests (via IntelliJ):

Setup Test Run Configuration

  • Go to FileProject StructureModulesDependencies tab
  • Click the + button → JARs or directories...
  • Download the JUnit 5 JAR from here
  • Set the scope to TestApplyOK
  • Right-click the test/ folder → Mark Directory asTest Sources Root

Run Tests

  • Right-click the test/ folder or any test class → Run 'All Tests'
  • You will see test results in the IntelliJ Run tab

📸 Screenshots

Main Menu

Main Menu

All Products

All Products

Single Product

Single Product

Add Product

Add Product

Update Product

Update Product

Delete Product

Delete Product

Make Sale

Make Sale

Sales Report

Sales Report

Low Stock Report

Low Stock Report

Exit

Exit

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

TechStore is a simple Java CLI application to manage product inventory and sales. This version is containerized using Docker for easy deployment and testing.

Topics

Resources

License

Stars

Watchers

Forks

Contributors