Skip to content

sdrahnea/order-management-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

109 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Order Management System

Java Spring Boot Build Tool Database License

A lightweight, extensible platform for managing day-to-day operational flows such as orders, items, inventory, clients, providers, and custom dashboards.

Table of Contents

Overview

Order Management System helps teams run core business operations from one place. It combines a JSF web UI with Spring Boot services and a relational database backend, while supporting configurable dashboards through native SQL queries.

Features

  • Manage core entities: orders, items, articles, clients, providers, and inventory.
  • Use CRUD operations across all supported business entities.
  • Build custom dashboard views with native SQL scripts.
  • Choose between MySQL, PostgreSQL, or H2 depending on environment.
  • Start quickly with built-in seed data and default credentials.

Screenshots

Login page

Main page

Items list

Create item

Create article

Article form

New item

Inventory create

Order create

Person create

Unit create

Unit of measure create

Unit type create

Architecture

flowchart LR
  U[User Browser] --> V[JSF / PrimeFaces Views]
  V --> C[Spring Boot Controllers]
  C --> S[Service Layer]
  S --> R[Spring Data JPA Repositories]
  R --> D[(MySQL / PostgreSQL / H2)]
  C --> Q[Dashboard SQL Queries]
  Q --> D
Loading

Tech Stack

  • Java 8+
  • Spring Boot
  • Spring Security
  • Spring Data JPA
  • JoinFaces + PrimeFaces
  • Liquibase
  • Maven
  • MySQL / PostgreSQL / H2

Getting Started

Clone the repository and configure your local environment.

git clone https://github.com/sdrahnea/order-management-system.git
cd order-management-system
git config --local user.email "your_email@domain.extension"

Prerequisites

  • Java 8
  • Maven
  • One database engine: MySQL, PostgreSQL, or H2

If you run into the Java module access error shown below, use Java 8 for this project:

Unable to make field private com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors ...

Database Setup

This project ships with Liquibase changelogs and SQL data scripts.

SQL files often used for initial data

article.sql
article_category.sql
article_type.sql
chart_type.sql
dashboard_query.sql
data.sql
first_name.sql
inventory.sql
inventory_status.sql
inventory_type.sql
last_name.sql
unit_industry.sql
unit_of_measure.sql
unit_type.sql

MySQL

Create a database:

CREATE DATABASE oms;

For some MySQL 8 setups, you may need:

ALTER USER '${USER}'@'localhost' IDENTIFIED WITH mysql_native_password BY '${PASSWORD}';

PostgreSQL

Example commands:

createuser -U postgres -s Progress
pg_restore -d DATABASE_NAME < PATH/BACKUP_FILE_NAME.sql

H2

No installation required. By default, application.properties uses file storage mode.

Run and Build

Build the project:

mvn clean compile package

Run locally:

mvn spring-boot:run

or run the jar:

java -jar target/order-management-system-2.0.0.jar

Default URL (from current configuration):

  • http://localhost:8081/oms/login.xhtml

Default credentials:

  • username: admin
  • password: 123

API Examples

Available API endpoint

User registration endpoint in src/main/java/com/oms/controller/MainRestController.java:

  • POST /api/user/register

Request:

POST /api/user/register
Content-Type: application/json

{
  "username": "new.user",
  "password": "StrongPassword123",
  "email": "new.user@example.com"
}

Response (example):

{
  "id": 42,
  "username": "new.user",
  "enabled": true
}

Upload API request/response example

This repository currently does not expose a dedicated upload endpoint in the REST controllers. For teams extending OMS with file import/export, the following is a compact example contract:

Request:

POST /api/upload
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary

------WebKitFormBoundary
Content-Disposition: form-data; name="file"; filename="inventory.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

(binary)
------WebKitFormBoundary--

Response (example):

{
  "uploadId": "up_01JXYZABC123",
  "fileName": "inventory.xlsx",
  "status": "RECEIVED",
  "rowsDetected": 128,
  "message": "File queued for processing"
}

Testing

Automated tests are currently minimal and may be absent in some modules.

Run tests with:

mvn test

Deployment

After building the jar, run:

java -jar target/order-management-system-2.0.0.jar

When running with default properties, the app is available at:

  • http://localhost:8081/oms/login.xhtml

Support

If you run into an issue, open a GitHub issue or contact the maintainer using details in license.md.

Contributing

Please read CONTRIBUTING.md for contribution guidelines and pull request process.

Versioning

This project follows SemVer.

Authors

  • Sergiu Drahnea - Initial work - LinkedIn

License

Licensed under the MIT License. See license.md.

Donations

If this project helps you, donations are appreciated.

  • PayPal
  • EGLD - erd1t3t5m8v7862asdh48nq820shsmlmuw9jpm87qw25cvch7djpkapskgq4es
  • TROY - Address: bnb136ns6lfw4zs5hg4n85vdthaad7hq5m4gtkgf23 | Memo: 100079140
  • PHB - Address: bnb136ns6lfw4zs5hg4n85vdthaad7hq5m4gtkgf23 | Memo: 100079140
  • HOT - 0x1ebfc62e2510f0a0558568223d1d101d0cf074b2
  • VET - 0x1ebfc62e2510f0a0558568223d1d101d0cf074b2
  • TRX - TRe8xSkGqpS73Nhk6bnvW34aiJoRTmZs8N
  • BTT - TRe8xSkGqpS73Nhk6bnvW34aiJoRTmZs8N

About

Order Management System helps you to manage the business activity of your entity. The menus are: orders, items, articles, clients, providers, dashboards. You can create your custom dashboards using native sql scrips. Basic operations for all entities.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors