A simple inventory/bin-tracking web app with CRUD for Bins and Items, image upload, and a pluggable "Auto-fill from Image" stub (vision + scraping).
- Bins CRUD (each bin has a number and optional category label)
- Items CRUD (title, description, vendor, price, product id, URL, quantity, bin)
- Photo upload per item (stored under
public/uploads/) - Auto-fill (beta): stub endpoint to (a) suggest bin based on keywords, (b) try to fetch OpenGraph metadata from a provided URL
- Pure PHP (PDO SQLSRV) + simple HTML (Tailwind CDN). No framework.
- Works with Microsoft SQL Server.
-
Clone and setup:
git clone https://github.com/joerandazzo76/inventoryApp.git cd inventoryApp cp .env.example .env -
Start the containers:
docker-compose up --build
Wait for SQL Server to fully start (30-60 seconds).
-
Initialize the database: Connect to SQL Server at
localhost:1433with usersaand passwordYourStrong!Passw0rd, then:CREATE DATABASE inventory_app; GO
Run the schema from
sql/schema.sql. -
Access the app: Open http://localhost:8080 in your browser.
-
Requirements
- PHP 8.1+ with
sqlsrvand/orpdo_sqlsrvextensions enabled - Microsoft SQL Server (local or remote)
- A web server (Apache/Nginx). Point your doc root to
public/.
- PHP 8.1+ with
-
Database
- Create a database (e.g.,
inventory_app). - Run the schema:
sql/schema.sql - Update DB credentials in
app/config.php.
- Create a database (e.g.,
-
Serve
- Place this folder on your server.
- Set document root to
public/. - Visit
http://localhost/.
- The app includes a stub
VisionController::autoFill()that:- Suggests a bin based on category keyword matching in the file name or a provided hint.
- If you provide a Vendor URL, it fetches Open Graph metadata to prefill Title/Description.
- Hooks are ready in
app/VisionProviders/to add:OpenAI/Azurevision calls- Local ONNX/CLIP pipeline
- See
VisionController.phpfor TODOs.
- Basic input validation and CSRF-lite tokens are included, but not production-hardened.
- If you expose publicly, add auth, rate limits, stricter validation, and CSRF protections.
We use the CDN per your preference:
<script src="https://cdn.tailwindcss.com"></script>public/index.php: dashboard + navpublic/bins.php: CRUD for binspublic/items.php: CRUD for items (includes upload + auto-fill)public/upload.php: file receiving endpointapp/config.php: config, category keywords, basic settingsapp/db.php: SQL Server PDO connectionapp/Models/*.php: simple modelsapp/Controllers/*.php: page handlersapp/VisionProviders/OpenGraphScraper.php: generic metadata scrapersql/schema.sql: DB schema
MIT (do what you want, no warranty).