# Bilko demo — reverse-engineering + feature list + live Playwright test (MC #102883) — 2026-06-03

## Summary
MC #102883 reverse-engineered the Bilko demo product from existing code into a full spec chain, then validated the live demo with Playwright. Target: **bilko-demo.alai.no** (HR/EUR/PDV demo tenant). No deploy; no product code changed (docs + e2e spec only).

## Pipeline delivered (durable in `docs/reverse-engineering/`)
- **Architecture** — `architecture-map.md` (backend, salvaged from #102798) + `frontend-ux-flows.md` (17 UX flows, 39 Next.js routes mapped).
- **User stories** — `user-stories.md` (97, sectioned, HR-demo-core flagged).
- **Requirements** — `requirements.md` (65 functional + 30 non-functional, traceable to features/stories).
- **Feature list** — `feature-list.md` (**131 features**, 115 HR-demo-core), each with a testable expectation + a real-vs-mock annotation.

## Live testing (Playwright / webapp-testing)
- Spec: `apps/e2e/tests/phase-b-feature-coverage.spec.ts` (54 tests, 16 domains), run against live bilko-demo.alai.no (login `demo@bilko.cloud`).
- **Result: 54 passed / 0 failed.** 39 screenshots. **0 real product bugs.**
- 8 intentional stubs confirmed behaving correctly (banking "u pripremi", VAT PDF/Excel export disabled, ePorezna disabled, email-send blocked, payables empty-state).
- High-value confirmations: login→dashboard (real EUR data 18.420,75), invoice wizard (auto-number INV-2026-004, HR VAT 25%, BT-3 380 Račun), PDF export real, OIB label correct, settings org loaded, upsell modal renders.
- 2 initial failures were test-selector bugs (not product) — fixed (`placeholder*="Puno ime"`, `getByRole textbox Pretraži račune`), suite re-run fully green.

## Verification
- Independent pre-verifier (Company Mesh / Proveo): **PASS** — `mesh-thr-7a45d8e0-c63a-4803-909a-8177f73b0630`.
- til-done: **DONE** — `/tmp/til-done/102883-20260603T212200Z.json`.

## Deferred (follow-up MC #102884)
~28 features need a **resettable demo tenant + 2nd account** (viewer/accountant) to test safely: RBAC role-gating, destructive write flows (draft save/resume, OIB validation, travel-order/expense create+approve), multi-tenant isolation. These must NOT run against the customer-facing demo — deferred by design.