Skip to content

Voidhmslf/pony_shop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Java Shop: The Ultimate Polyglot E-Commerce Engine

Java Spring Boot PostgreSQL Python Docker

Warning: This project contains extreme levels of Clean Code, SOLID principles, and Polyglot Architecture. Viewer discretion is advised.


🔥 What is this?

This isn't just a shop. This is a masterpiece of engineering.

It's a fully containerized, database-backed, enterprise-grade e-commerce platform built to demonstrate how Real Systems should be architected. We didn't just write code; we crafted an ecosystem.

  • Java handles the heavy business logic.
  • PostgreSQL holds the single source of truth.
  • Python orchestrates the data seeding.
  • Docker binds them all together.

Whether you're selling physical goods with complex shipping rules or digital assets with instant delivery, Java Shop handles it with elegance.

✨ Features That Will Blow Your Mind

🧠 Intelligent Architecture

  • SOLID to the Core: Every class has a single responsibility. Open/Closed principle allows adding new features without touching old code.
  • Strategy Pattern Everywhere: Pricing, Taxes, Shipping — all pluggable strategies. Want a new tax law? Just add a class.
  • Polymorphic Power: Product handles Physical and Digital items seamlessly through inheritance.

🐍 Python-Powered DevOps

  • Automated Seeding: No more manual SQL inserts. A dedicated Python micro-service (seeder.py) waits for the DB to be healthy and populates it with rich test data automatically.
  • Zero-Touch Deployment: Just run docker-compose up and watch the symphony of containers orchestrate themselves.

🛍️ Powerful E-Commerce Engine

  • Dynamic Pricing: BOGO (Buy One Get One), Bulk Discounts, Seasonal Sales.
  • Smart Taxation: Flat VAT, Progressive Taxes, Digital Goods Tax exemptions.
  • Logistics Logic: Volumetric weight calculation, Express vs Standard shipping, Free shipping thresholds.
  • Real-time Calculator: Instant price estimation on product pages considering all active policies.

🎨 Beautiful & Responsive

  • SVG Sprite System: Ultra-optimized icon rendering (load once, use everywhere).
  • Thymeleaf Templates: Server-side rendering for blazing fast initial loads.
  • Admin Dashboard: Full control over Products, Categories, and dynamic Policy configuration (Pricing, Tax, Shipping).

🛠️ The Tech Stack of Champions

Technology Role Why?
Java 17 Core Logic LTS stability meets modern syntax.
Spring Boot 3 Framework The gold standard for enterprise Java.
Spring Data JPA ORM Hibernate on steroids. Database interactions made simple.
PostgreSQL Database The world's most advanced open source relational database.
Python 3.9 Scripting Fast, efficient data seeding and automation.
Docker Compose Orchestration One command to rule them all.

🚀 Get Started in 30 Seconds

You don't need to install Java. You don't need to install Postgres. You just need Docker.

1. Clone the Beast

git clone https://github.com/BadRabbit00/java_lab.git
cd java_lab

2. Ignite the Engines

docker-compose up --build -d

Wait for the magic to happen...

  1. Postgres wakes up.
  2. Python Seeder connects, checks the DB, and injects the data.
  3. Java App launches and serves the content.

3. Witness Greatness

Open your browser and behold:


📂 Project Structure (Where the Magic Lives)

.
├── docker-compose.yml  # The Orchestrator
├── seeder.py           # The Python Data Injector
├── src/main/java/com/shop/
│   ├── category/       # Category management logic
│   ├── controller/     # REST & Web Controllers (The Traffic Cops)
│   ├── product/        # The Heart of the Domain
│   │   ├── pricing/    # Promotion Strategies (BOGO, Fixed, %)
│   │   ├── shipping/   # Shipping Strategies (Express, Standard)
│   │   ├── tax/        # Tax Strategies (VAT, Progressive)
│   │   ├── DigitalProduct.java
│   │   └── PhysicalProduct.java
│   ├── repository/     # JPA Repositories (The Data Layer)
│   └── service/        # Business Logic Layer

🤝 Contributing

Found a bug? Want to add a "Buy 10 Get 1 Free" strategy?

  1. Fork it.
  2. Create your feature branch (git checkout -b feature/AmazingStrategy).
  3. Commit your changes (git commit -m 'Add some AmazingStrategy').
  4. Push to the branch (git push origin feature/AmazingStrategy).
  5. Open a Pull Request.

Built with ❤️, ☕, and 🐍 by BadRabbit00

About

poni eeeee

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors