A Java Swing desktop application that models a small delivery marketplace with stores, a platform and a delivery company. It was built as the final project for the Application Engineering and Development (AED) course (Wednesday section, Group 78).
The app follows the AED Network, Enterprise, Organization, Role and WorkQueue pattern:
AFASystemis the root object. It holds networks, a system-level employee directory and a system-level user account directory.NetworkholdsEnterpriseobjects of three types:Store,PlatformandDelivery.- Each enterprise holds
Organizationobjects (Inventory, Purchase, Store Financial, Store Manager, Platform Manager, Platform Financial, Delivery Manager, Delivery). Each one has its own employees, user accounts and aWorkQueue. - Each
UserAccounthas aRole. The role decides which Swing work area opens after login. - Requests (
Order,PurchaseRequest,ModifyItemsRequest,MoneyOrder) live in directories on the enterprise. Their status moves through values such asOrdered,Prepared,DeliveryingandFinished.
| Role | Work area | What the UI provides |
|---|---|---|
| System Admin | SystemAdminWorkArea |
Manage networks, enterprises and enterprise admins |
| Store / Platform / Delivery Manager | AdministrativeRole |
Manage organizations, employees and user accounts. The store manager can also approve or decline requests and mark orders ready |
| Customer | Customer |
Sign up from the login screen, add items to a cart, place orders and view order history |
| Inventory | InventoryRole |
Add or delete stock items and raise modify-stock requests |
| Purchase | SPurchaseRole |
Raise purchase requests |
| Store Financial | SFinancialRole |
Request money and approve or decline requests |
| Platform Financial | PFinancialRole |
View request details |
| Delivery | DeliveryRole |
Take an order, view its details and mark it complete |
The whole AFASystem object graph is saved with db4o (an embedded object
database). The jar is Deliverease/db4o-8.0.184.15484-all-java5.jar.
Business/DB4OUtil/DB4OUtil.java opens Data.db4o in the current working
directory, which is the Deliverease/ project folder when you run from
NetBeans. If the file is missing, db4o creates it. If it holds no system,
ConfigureASystem seeds a new one. The system is saved on logout and after
some edits, such as registering, adding items and making requests.
Data.db4o is git-ignored because it contains user accounts.
Passwords are stored as salted PBKDF2 (PBKDF2WithHmacSHA256) hashes.
Business/UserAccount/PasswordHasher.java does the hashing. A Data.db4o file
created before this change holds plaintext passwords and will not work for
login. Delete it so the system is re-seeded.
Requirements:
- JDK 15 or newer. The project targets Java 15 (
javac.source=15). - Apache NetBeans. The project was created with NetBeans 16.
Steps:
- In NetBeans, choose File > Open Project and pick the
Deliverease/folder. - Check the libraries.
nbproject/project.propertiesputs two jars on the classpath, both relative toDeliverease/:db4o-8.0.184.15484-all-java5.jar(included in the repo)AbsoluteLayout.jar(not included). This is the NetBeans AbsoluteLayout library. Copy it from your NetBeans install (netbeans/java/modules/ext/AbsoluteLayout.jar) intoDeliverease/, or fix the reference with Resolve Problems. The current sources compile without it, but NetBeans reports a broken reference until it is resolved.
- Run the project. The main class is
UserInterface.MainJFrame.
On first run (no Data.db4o), ConfigureASystem creates one account:
- Username:
sysadmin - Password:
sysadmin
This is a demo account only. Change or replace it before using the app for anything beyond a local demo. Log in as the system admin to create a network, enterprises and enterprise admins. Those admins then create organizations, employees and user accounts. Customers register with SignUp as Customer.
Deliverease/ NetBeans project (src/, nbproject/, build.xml, db4o jar)
docs/ Proposal, UML diagram, component diagram, final presentation
- There is no automated test suite.
- Customer self-registration stores accounts at the system level. Staff accounts are stored per enterprise or organization.