# Inventory Intelligence — reproduction guide

Completed Python and local SQLite analysis of synthetic inputs. No Home Depot records, hosted PostgreSQL deployment or Power BI report is claimed.

## Reproduce
Extract the full package, install Python 3.10+ and create a virtual environment.
```
python -m pip install -r requirements.txt
python run_analysis.py --output reproduced
python -m unittest test_analysis.py
```
The fixed seed is 20261114. NumPy and pandas versions are pinned. Compare CSVs and numerical outputs; SQLite version information may differ by platform. manifest.json contains SHA-256 hashes for shipped artifacts.

## DBeaver and SQLite
Open inventory.sqlite with the SQLite driver in DBeaver and run executed-analysis.sql. All eight tables were populated through pandas.to_sql. Python validated keys, references, nonnegative quantities and balances; SQLite tables do not themselves declare these constraints. The optional PostgreSQL blueprint declares explicit constraints.

## Optional PostgreSQL (not executed)
Review inventory-schema.sql before applying to an empty personally owned database. Its service_role grants assume that role exists; adapt grants for standalone PostgreSQL. Import dimensions before facts and run stockout-analysis.sql, an unexecuted PostgreSQL port. Use private passwords, SSL and a dedicated read-only reporting account. Never expose credentials or arbitrary query execution to visitors.

## Provenance
All CSV records are synthetic. Product cost, selling price, volume, supplier assignments, lead-time means and variability are generator assumptions. observed_demand_units retains a schema name but contains generated demand; demand_source is synthetic. observed_stockout_flag means simulated unmet units > 0, not hours out of stock.

## Policy horizons
Baseline spans 60 days. Forecasts and policy targets use the first 40 days and test on the last 20 days. Policies reset to common starting stock and no open orders. Open horizon-end orders are charged ordering cost but not received. No terminal-stock, salvage, capacity or receipt-age costs are modeled.

## Website questions
The helper retrieves approved case-study passages locally without AI generation or stored conversations. Unsupported questions can be opened in the visitor’s email app addressed to Melvin. No automatic delivery or visitor data storage is claimed.
