00 ยท Status

Where the app stands today

Live modules, recent changes, known risks, operating constraints and the open questions to settle before the Orders & Dispatch build.

8 modules live ยท 1 new module planned๐Ÿ“„ PROJECT_STATUS.mdAs at: 4 October 2026 Live URL: https://skycrest.id/stock_control.php Source: stock_control.php (single file, ~5,950 lines) Read with: TRD.md, APP_FLOW.md, DASHBOARD.md, AGENTIC.md, AIRLINE_ANALYSIS.md, IMPLEMENTATION_PLAN.md, TESTING.md

1What the app is today

A private web app that the Skycrest kitchen team uses to track finished-goods stock and plan production. It replaces parts of three Excel workbooks:

Excel sourceReplaced by app page
Stock Control.xlsm (main data + QUICHE / PIES / OTHER / SWEETS / GEMA ORDERS sheets)Stock + Products pages, and Sync from XLSM
Airline Wholesale Stock Count / AIRLINE ORDERS sheet ("Alex's excel")Production Planning page
TARTLET ORDERS 2026.xlsxTartlet Orders page

The app does not yet handle customer orders end to end (intake โ†’ invoice โ†’ allocate โ†’ dispatch). That is the new module described in workflow.xlsx and planned in IMPLEMENTATION_PLAN.md.


2Module status

#ModulePage / entryStatusNotes
1Login / session? (login form)โœ… LiveUsername + password, PHP session. No password reset, no lockout.
2Stock (home)?โœ… LiveGreeting card, product search with autocomplete, product card with live stock (units + boxes), Stock IN / Stock OUT form (units or boxes), last 25 transactions.
3Products?page=productsโœ… LiveTable with Code, Name, Category, Subcategory, Pack, Base, Live stock. Search + category + subcategory filters. Admin: add / edit / delete, inline "set live stock".
4Sync from XLSMHamburger โ†’ Sync, or Products toolbarโœ… Live (just deployed)Upload .xlsm/.xlsx โ†’ preview โ†’ apply. Upserts catalog from "main data", sets stock from category sheets via adjustment transactions.
5Production Planning?page=planโœ… LiveAirline order matrix: products ร— (destination + date) columns. Live stock, boxes, total ordered, stock-after, to-produce (units + cartons). Cell colours, add column / add week, save / load / delete snapshots, print.
6Tartlet Orders?page=tartletsโœ… LiveClient orders ร— 16 tartlet sizes. Due date/time, Delivery / Pick-up, notes. Totals, in-stock, NEED TO MAKE rows. Editable "as at" date, date sort โ†‘โ†“, cell colour picker, save / load snapshots, print.
7Users?page=usersโœ… Live (admin)Add / edit / delete users, roles admin (Super Admin) and user. Change own password. Last admin cannot be deleted.
8ExportHamburger โ†’ Exportโœ… LiveStock levels and full transaction log as .xlsx.
9Orders & Dispatch (new)โ€”โฌœ Not startedSee workflow.xlsx, TRD.md ยง5, IMPLEMENTATION_PLAN.md.
10Dashboard (new home page)โ€”โฌœ Not startedRole-based daily dashboard + "seen today" tracking. DASHBOARD.md
11Hermes Reminder Bot (new)โ€”โฌœ Not startedMessage โ†’ SMS โ†’ call ladder for staff who haven't seen the dashboard. DASHBOARD.md ยง4
12Airline analytics (new)โ€”๐ŸŸก Analysis donePatterns from 216 POs (Jul 2025โ€“Apr 2026). AIRLINE_ANALYSIS.md

3Recent changes (this work session)


4Known issues and risks

SeverityIssueImpactSuggested fix
HighNo CSRF tokens on any POST form or JSON APIA malicious page could trigger actions while a user is logged inAdd per-session token, check on every POST (Phase 0)
HighNo automated DB backupstock.db loss = loss of all historyNightly copy of stock.db outside public_html (Phase 0)
Mediumsession_regenerate_id() not called on loginSession fixation riskOne-line fix at login
MediumIf users table is ever empty, app seeds admin / adminWeak default credentialsKeep table non-empty; remove seed or force password change
MediumSingle 5,950-line fileEvery new module makes edits riskier and slowerSplit new modules into includes/ while keeping one entry point (Phase 0)
MediumDeploy is manual FTP over plain (non-TLS) FTPCredentials sent in clear; no rollbackSwitch to FTPS/SFTP if host supports; keep dated backups of the PHP file
Lowapply_xlsm_sync refuses to run if the file has catalog rows but no stock rowsCatalog-only sync is blockedCheck rows or catalog
LowcurrentStock() runs 2 queries per productPages slow down as products/transactions growOne aggregate query per page
LowPlan items (plan_items) and Tartlet sizes are separate lists from productsCodes can drift out of syncLink by product code (Phase 1 of new module)
Infostock.db sits in public_htmlReturned HTTP 403 on the old domain (checked 4 Oct 2026) โ€” re-check on skycrest.idMove outside web root when convenient
InfoDomain moved to skycrest.idFTP path / deploy target in deployment.md needs updatingConfirm new FTP host & folder before next upload

5Operating constraints (must not be broken)

  1. Never reset, recreate or overwrite stock.db. All schema changes are additive (CREATE TABLE IF NOT EXISTS, ALTER TABLE ADD COLUMN).
  2. Never change existing users or passwords during deployment.
  3. FTP credentials live only in the local deployment.md โ€” never in source, never uploaded to the server, never in these docs.
  4. Deploy = upload stock_control.php only (plain FTP, passive mode).

6My understanding of the business (from workflow.xlsx)

Two businesses share the kitchen and stock:

Both follow the same core loop โ€” receive order โ†’ invoice โ†’ print & send to kitchen โ†’ confirm to customer โ†’ packing checks stock โ†’ allocate or make โ†’ dispatch โ†’ remove from stock โ€” with differences at intake (airline orders arrive as POs and go straight onto the production planner; non-airline orders first need an availability and delivery-date check) and at dispatch (airline interstate goes via Roadmaster by port; Sydney is a driver run; non-airline is a single schedule for all customers).

Full flow in APP_FLOW.md ยง3.


7Open questions before building the new module

These decide scope. Defaults I've assumed in the TRD are in brackets.

Answered: hosting supports scheduled tasks (cron) โœ… ยท airline orders arrive by email as system-generated POs (dnata, Gate Gourmet) โ€” see AIRLINE_ANALYSIS.md ยง1.

  1. Xero: connect via the Xero API, or keep invoicing in Xero manually and just record the invoice number? (Manual โ€” record invoice no. only, for V1.)
  2. Email intake: should the app read orders from the mailbox, or does someone key them in? (Keyed in manually, with the PO/PDF attached.)
  3. Confirmation email: should the app send it, or does the team send from Outlook/Gmail? (App generates the text; team sends it, for V1.)
  4. Allocation: does "move stock & allocate" mean reserve (stock still on hand, but committed) and the final deduction happens at dispatch? (Yes โ€” reserve on allocate, deduct on dispatch.)
  5. Production planner link: should airline orders entered in the new module automatically appear as quantities on the Production Planning page? (Yes โ€” the new module becomes the source; planner reads from it.)
  6. Tartlet orders: are these non-airline orders that should eventually move into the new Orders module? (Leave Tartlets as-is in V1; merge later.)
  7. Hermes host: a small VPS or an always-on office PC for the Hermes gateway? Which channel do staff use โ€” WhatsApp or Telegram? (VPS + WhatsApp.)
  8. Roadmaster / driver booking: in-app booking, or just a printable/exportable delivery schedule? (Printable schedule + "booked" tick box and reference.)
  9. Who does what: do packing staff need their own login with limited rights (e.g. can allocate and dispatch but not edit prices/customers)? (Add a packing role.)
  10. Customer list: is there a master list of customers / airlines / ports to load, or build it up as orders arrive? (Build as we go; seed airlines from the planner destinations.)