Ana Sayfa / Kod ve Scriptler / Stockcast - Inventory Forecasting PHP

Stockcast - Inventory Forecasting PHP

Envanter talebini tahmin edin, yeniden sipariş noktaları belirleyin; satın alma siparişlerini ve stok uyarılarını yönetin.

  • Yayın tarihi10 Kasım 2026
  • Nerede çalışırPHP 8.2, PHP 8.3, PHP 8.4
  • VeritabanıMySQL 8.0, SQLite 3.x
  • Paket içeriği.php, .css, .json, .svg, .sql, .md, .yml/.yaml, composer.json, Dockerfile, JavaScript .js
  • Son güncelleme10 Kasım 2026
  • Canlı demoVar
Stockcast - Inventory Forecasting PHP

Overview

Inventory with sales history, reorder points, demand forecasting, purchase orders and stock alerts. Stockcast is a complete, self-hosted inventory Forecasting in plain PHP 8.2 — no framework, no Composer runtime dependencies and no build step. Upload the files, run the browser installer, choose SQLite or MySQL, and you are live in minutes.

Forecast reorder points from your own sales. Import daily sales, get average demand, MAD-based variability, safety stock at a chosen service level, reorder points, days of stock and pack-rounded purchase suggestions — with every number explained on screen.

What's inside

  • Reorder cockpit — KPI cards, status chips (OK, Reorder soon, Reorder now, Overstock), lead-time risk badges, data warnings, and a drill-down drawer that shows the formula and every input.
  • CSV sales import — per-row validation report. A file with any invalid row is rejected in full: no partial writes, no silently dropped rows. Re-importing a day replaces its quantity.
  • Explainable forecast — average daily demand over a configurable window (capped at the first recorded sale), mean absolute deviation, safety stock z × MAD × √lead, reorder point ceil(avg × lead + safety), days of stock, and a pack-rounded suggestion.
  • Multi-location stock — on hand, on order, reserved; availability is on hand + on order − reserved.
  • Purchase orders — drafts grouped by supplier, integer-cent totals, ordering and receiving move stock between on-order and on-hand, CSV export, cancellation of open orders.
  • Settings — window days, service level (80/85/90/95/97.5/99 with a visible z table), rounding rule (whole packs, or packs plus the review period), review period, currency.
  • Roles — admin (users, everything) and planner (inventory and purchasing). CSRF on every POST, prepared statements only, escaped output everywhere, EN/ZH interface, dark mode, keyboard-first.

Why Stockcast

  • CSV sales import produces per-SKU: average daily demand, demand variability (MAD), safety stock at a chosen service level, reorder point and days of stock — with the formula and inputs shown in the UI.
  • Suggested purchase orders grouped by supplier with lead-time awareness and one-click CSV export.
  • Multi-location stock with an explicit assumption panel, so numbers never look like a black box (InvenTree's recurring complaint).

Built to last

  • No framework and no runtime Composer packages — the ZIP is the whole application.
  • SQLite for a zero-config install and MySQL/MariaDB for production, from one migration pair.
  • 33 automated tests covering the money, state-machine, uniqueness and permission rules.
  • English and Chinese interface, dark mode, WCAG AA focus states, usable down to 360 px.
  • CSRF on every POST, prepared statements only, output escaped at the template.

Requirements

  • PHP 8.2 or newer with PDO (pdo_sqlite or pdo_mysql), mbstring, json, openssl and fileinfo.
  • Apache with mod_rewrite or Nginx; document root pointed at public/.
  • SQLite 3 (bundled with PHP) or MySQL 8 / MariaDB 10.4+.
  • Write access to the application root and storage/.

Quick start: upload the ZIP, point the document root at public/, open /install/ and follow the four steps. Docker users can run docker compose up -d --build instead and open the same installer.

Features

• Reorder cockpit — KPI cards, status chips (OK, Reorder soon, Reorder now, Overstock), lead-time risk badges, data warnings, and a drill-down drawer that shows the formula and every input. • CSV sales import — per-row validation report. A file with any invalid row is rejected in full: no partial writes, no silently dropped rows. Re-importing a day replaces its quantity. • Explainable forecast — average daily demand over a configurable window (capped at the first recorded sale), mean absolute deviation, safety stock z × MAD × √lead, reorder point ceil(avg × lead + safety), days of stock, and a pack-rounded suggestion. • Multi-location stock — on hand, on order, reserved; availability is on hand + on order − reserved. • Purchase orders — drafts grouped by supplier, integer-cent totals, ordering and receiving move stock between on-order and on-hand, CSV export, cancellation of open orders. • Settings — window days, service level (80/85/90/95/97.5/99 with a visible z table), rounding rule (whole packs, or packs plus the review period), review period, currency. • Roles — admin (users, everything) and planner (inventory and purchasing). CSRF on every POST, prepared statements only, escaped output everywhere, EN/ZH interface, dark mode, keyboard-first. • Self-hosted PHP 8.2 application with no framework and no runtime Composer dependencies • SQLite and MySQL/MariaDB support from one migration pair, with a four-step browser installer • 13 database tables, 41 routes and 33 automated tests • English and Chinese interface, dark mode, WCAG AA focus states, mobile down to 360 px • CSRF protection, prepared statements and escaped output throughout

Requirements

• PHP 8.2 or newer (tested on 8.2, 8.3 and 8.4) • PDO with pdo_sqlite or pdo_mysql • mbstring, json, openssl and fileinfo extensions • Apache with mod_rewrite, or Nginx with a front-controller rule • SQLite 3, or MySQL 8.0 / MariaDB 10.4 and newer • Write access to the application root and storage/ directory • A modern browser; no Node.js, Composer or build tools required