This repository features a fully functional, three-tier desktop application built entirely from scratch without heavy framework layers. It integrates an offline-first HTML5 and JavaScript user dashboard directly with a native backend Java web server, allowing immediate data streaming out of a localized PostgreSQL database.
Development Methodology: This system was built using a systematic back-to-front approach. The foundational database schemas and constraints were established first, followed by wiring the Java server socket controllers, and finally constructing the frontend dashboard to display the processed data streams securely.
Many industrial warehouses rely on slow, manual spreadsheet entries or paper logbooks to track stock. This manual process causes delayed reporting, human calculation errors, stockouts, and massive waste of operational resources.
This application completely automates inventory tracking and reporting. By building a direct data pipeline, warehouse managers can view real-time stock levels and calculate bulk order metrics instantly with a single click. This eliminates manual logs, saves operational hours, and prevents wastage of warehouse resources.
This is the webpage where users click a button to pull live data from the database instantly without reloading the page:
This is the backend Java program running in the terminal. It listens for web requests and streams database records back to the webpage:
This is the local database terminal where we run scripts to build tables and insert our 19 default inventory rows.
- Operating System: Linux Ubuntu (VirtualBox Environment)
- Database: PostgreSQL SQL Database
- Backend Language: Java (Version 11)
- Web Server Engine: Java Built-in HttpServer Framework
- Frontend Interface: HTML5/CSS3 and JavaScript (Fetch API)
This map shows the location of every file created inside the project:
~/ifs-warehouse-db/
βββ index.html # Frontend dashboard viewport page (HTML, Local CSS, JS Fetch)
βββ postgresql.jar # Database driver package file (The Translator Bridge)
βββ README.md # System documentation and setup guide
βββ LICENSE # Open-source MIT License terms and conditions
βββ images/
β βββ web-dashboard.png # Frontend dashboard interface screenshot
β βββ backend-server.png # Active Java backend server console log preview
β βββ database-terminal.png # Terminal view of database connections and queries
βββ schema/
β βββ schema.sql # Database table structural blueprints
βββ seeding/
β βββ seeding.sql # Core inventory data records (19 initial entries)
βββ queries/
β βββ analytics.sql # Reference SQL JOIN calculation script
βββ src/
βββ WarehouseApp.java # Monolithic Java Backend Source Code
You must install the following software packages before running the application:
- Java Development Kit (JDK 11 or higher): Required to compile and run the Java server.
- Ubuntu command to install:
sudo apt install default-jdk
- Ubuntu command to install:
- PostgreSQL Server: Required to host the local database vault.
- Ubuntu command to install:
sudo apt install postgresql postgresql-contrib
- Ubuntu command to install:
- Git: Required to clone the project files from GitHub.
- Ubuntu command to install:
sudo apt install git
- Ubuntu command to install:
Follow these steps in order to download, build, and run the application:
Open your Linux terminal, download the repository, and enter the main project folder:
# Clone the repository onto your machine
git clone https://github.com
# Move into the project directory
cd ifs-warehouse-dbRun this command to create your database tables and insert the 19 default transaction records:
sudo -u postgres psql -d ifs_warehouse -f schema/schema.sql -f seeding/seeding.sqlUpdate your PostgreSQL user permissions to authorize backend data connectivity:
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'postgres';"Compile the Java source code while linking the required PostgreSQL driver package:
javac -cp .:postgresql.jar src/WarehouseApp.javaLaunch the application and open the interactive main menu:
java -cp src:postgresql.jar WarehouseAppWhen the terminal menu appears, type option 2 and press Enter. This instructs Java to listen for incoming web requests on port 8080.
You can open the user interface using either of the following methods:
- Method A (Java Server): Open a browser tab and go to: π
http://localhost:8080/ - Method B (VS Code Live Server): Right-click
index.htmlin VS Code and select Open with Live Server to access: πhttp://127.0.0.1:5500/index.html.
Click the EXECUTE LIVE PORT POLL button. The dashboard will instantly fetch your live database records without reloading the page!
This is the database query the backend executes to calculate inventory metrics across multiple tables:
SELECT products.product_name, products.stock_level,
SUM(purchase_orders.order_quantity) AS total_ordered
FROM purchase_orders
INNER JOIN products ON purchase_orders.product_id = products.product_id
GROUP BY products.product_name, products.stock_level
ORDER BY total_ordered DESC;If you want to log into your PostgreSQL database manually to verify that your tables loaded correctly, run these quick commands in your terminal:
- Log in to the database:
sudo -u postgres psql -d ifs_warehouse
- List all active tables: Type
\dtand press Enter to see yourproductsandpurchase_orderstables. - Print your rows: Type
SELECT * FROM products;to view your data records. - Exit the database: Type
\qto return to your normal terminal prompt.
- System Architecture: Learned and gained some knowledge on the architecture behind full-stack development.
- Database Integration: Practiced how database tables pass records up to a backend server.
- Browser Connections: Handled how a webpage talks to an active server over local network ports.
- Offline Performance: Learned how to make a webpage load instantly from a local drive without needing the internet
- AI Collaboration: Developed in partnership with Google AI as an engineering peer. Used Google AI to brainstorm system architecture, troubleshoot cross-origin network ports, and refine professional code documentation.
- Two-Way Data Flow (Write Access): Add an HTML input form to allow operators to insert new records into the database directly from the browser window.
- JSON Data Serialization: Convert the Java API output from raw text tables into standard JSON format arrays.
- Data Visualizations: Connect the JSON stream to a JavaScript charting library (like Chart.js) to display dynamic inventory graphs.


