A robust Point of Sale (POS) desktop application designed for wholesale/retail store management. This project strictly follows the Layered Architecture pattern to ensure separation of concerns, utilizing JavaFX for the frontend and MySQL for data persistence.
The application is decoupled into distinct layers to maintain high cohesion and low coupling:
- Controller Layer: Manages UI logic and interacts with the BO layer.
- Service / BO Layer (Business Object): Contains all business rules, calculations, and transaction management.
- DAO Layer (Data Access Object): Handles raw SQL queries and CRUD operations.
- DTO (Data Transfer Object): Transports data between the UI and Service layers.
- Entity: Maps directly to database tables.
Thogakade-Shop-Management-Layered-Architect
├── src
│ ├── main
│ │ ├── java
│ │ │ └── lk.ijse.thogakade
│ │ │ ├── bo # Business Logic Interfaces
│ │ │ │ ├── custom # Specialized BOs (CustomerBO, ItemBO)
│ │ │ │ └── impl # BO Implementations
│ │ │ ├── controller # JavaFX Controllers
│ │ │ ├── dao # Data Access Interfaces
│ │ │ │ ├── custom # Specialized DAOs
│ │ │ │ └── impl # DAO Implementations (SQL)
│ │ │ ├── db # DBConnection (Singleton)
│ │ │ ├── dto # Data Transfer Objects
│ │ │ ├── entity # Database Entities
│ │ │ └── AppInitializer.java
│ │ └── resources
│ │ └── view # FXML UI Views
│ │ ├── dashboard_form.fxml
│ │ ├── customer_form.fxml
│ │ └── ...
└── pom.xml
- Add Customers: Register new customers with validation.
- Update Details: Modify customer information.
- Remove Customers: Delete customer records and view history.
- Stock Management: Monitor and adjust item stock levels.
- Item Details: Update unit prices and descriptions.
- Availability: Real-time checks for stock availability during orders.
- Place Order: Add items to a cart, calculate totals, and process payments.
- Transaction Management: Guarantees data integrity (commit/rollback) across
OrderandOrderDetailtables. - Invoice Generation: (Optional) View or print order summaries.
| Category | Technology |
|---|---|
| Language | Java (JDK 8 / 11) |
| GUI | JavaFX |
| Build Tool | Apache Maven |
| Database | MySQL 8.0 |
| ORM Concept | JDBC (Prepared Statements) |
| Patterns | Singleton, DAO, Factory, DTO |
-
Clone the repository
git clone [https://github.com/rashmiwijemanna/Thogakade-Shop-Management-Layered-Architect.git](https://github.com/rashmiwijemanna/Thogakade-Shop-Management-Layered-Architect.git)
-
Open in IDE
- Open the project in IntelliJ IDEA or Eclipse.
- Allow Maven to load and download dependencies.
- Open your MySQL Client (Workbench, Shell, etc.).
- Create the database:
CREATE DATABASE thogakade; USE thogakade;
- Configure Connection:
- Navigate to
src/main/java/.../db/DBConnection.java. - Update the
userandpasswordvariables to match your local MySQL credentials.
- Navigate to
Contributions, issues, and feature requests are welcome!
- Fork the Project.
- Create your Feature Branch (
git checkout -b feature/AmazingFeature). - Commit your Changes (
git commit -m 'Add some AmazingFeature'). - Push to the Branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
Give a ⭐️ if this project helped you!