§01
Overview
- What it is: an internal procurement/inventory/operations management system for a restaurant chain. Supplier orders with state workflow, inventory and write-off accounting, oil consumption module (kg↔L, approval), market/bazaar price dashboards, meal-order summaries, Excel/PDF export, invoice generation, store/branch RBAC.
- Type / status / role: web-app (ERP/back-office) · active (last commit 2026-05-23) · solo — 225 of 227 commits by the user (Davron 221 + Dave93 4; root@choparpizza.uz 2).
- Activity period: 2023-03-07 → 2026-05-23 — 3+ years of continuous support, very much alive. Strong signal of ownership and long-term responsibility.
§02
Stack
- Languages: PHP (Yii2), JavaScript, SQL (MySQL).
- Frameworks/libraries: Yii2 (~2.0.14, PHP 5.4+), MVC + ActiveRecord ORM; yii2-bootstrap; phpoffice/phpspreadsheet (Excel export); kartik-v/yii2-mpdf (PDF invoices); kartik datepicker/select2; pkpass/pkpass (Apple Wallet passes?); Codeception (unit/functional/acceptance tests).
- Infra/deploy: Docker (docker-compose), Vagrant (Vagrantfile + vagrant/), Gii + Debug Toolbar (dev). DB sessions, file-cache, schema-cache in prod.
- Data: MySQL
les_exord_db(orders, order_items, oil_inventory, products, stores, users, stock/stock_balance). - Notable tooling: AI tooling in the repo —
.claude/,AGENTS.md,.conductor/,.kombai/(Kombai — AI frontend generator); REST API for Telegram (/api/tguser/*).
§03
What was shipped
225 authored commits over 3 years; recent ones (2026) show active feature/maintenance work (per diffs):
- Market/bazaar price dashboard (
b0083cf+423,a41c7f0XLSX export,d47897bbuyer-role access by branches,59d7ee6list speedup — batched counts + tighter range,7501764fix DISTINCT in order-ids subquery). - Meal-orders summary (
2fc006c+176,afe6d75per-store breakdown,282198etranspose table + XLSX). - iiko integration (
31b7fc4exclude soft-deleted positions from iiko document exports; invoices). - Invoices (
c0e1008send/delete order log + auto-open invoice,fc4dba6Yii formatter timezone fix + header rework,0fb086bdocument date = order creation date). - Oil inventory (kg↔L conversion 1kg=1.1L, status workflow new→filled→accepted/rejected, analytics — separate CHANGES_*.md files).
- Telegram notifications (
0c4bd5amove tokens to config,e17703adebug logging for writeoff/transfer). - Scope: 227 commits; steady stream of features+fixes 2023→2026.
§04
Technical challenges
Per diffs of recent commits (user-authored):
- Inventory-accounting correctness in exports (
31b7fc4): excluding soft-deleted order positions from iiko exports — a typical but important data-correctness concern in ERP↔POS integration. - List perf for prices (
59d7ee6,7501764): tightening the default date range + batched counts instead of N queries; fix for incorrectDISTINCTin an order-id subquery. → SQL/ActiveRecord optimization at realistic scale. - Units and timezones (
fc4dba6, oil kg↔L): unit conversion with rounding, Yii formatter timezone fix in invoices — attention to domain edge cases. - Per-branch RBAC (
d47897b): buyer-role access to prices, restricted to their branches — real multi-store data isolation. - Export engine: XLSX (phpspreadsheet) + PDF (mpdf) invoices; fix for "broken XLSX" (
5d8c9b7). → Production-grade reporting. - Caveat: the stack is legacy (Yii2, PHP 5.4+), but the code is being maintained and extended competently.
§05
AI-assisted development
- Sessions found: 6
.jsonlfiles in the Claude Code sessions directory for this project (verified via full-path normalization). - What was done with AI: recent 2025–2026 features (dashboards, exports, iiko/Telegram) — given the presence of sessions and AI tooling, substantially AI-assisted.
- AI workflow patterns: rich AI toolkit — Claude Code +
AGENTS.md+.conductor/(agent orchestration) +.kombai/(AI UI generation). Detailed CHANGES_*.md as change specs. The user applies AI even to a legacy PHP codebase.
§06
Achievements & metrics
- 3+ years of continuous production use; ~36 controllers, ~68 models, ~22 migration directories (per structure) — a large business system.
- Real chain operations: procurement, inventory, oil, prices, reporting; iiko + Telegram integrations.
- Solo ownership end-to-end (225/227 commits).