Two go-live money-correctness bugs in the POS pay flow (deferred TODO #1/#2): #2 — pay against the server's amount, not a client recompute. The pay sheet took `orderAmountDue(payTarget) || total`, so any time the server figure was absent/zero it silently fell back to the POS's own 9% tax recompute. The backend records whatever amount the client posts (it only uses its own order.Total to decide closure), so a client/server mismatch books the wrong cash-drawer amount. Now a real (server) order always charges orderAmountDue(serverOrder); only a genuinely-local offline order — which has no server figure — uses the client total. #1 — don't record a card payment that wasn't confirmed. A connected terminal that declines already throws POS_DEVICE_* and records nothing. But when no terminal is wired up the request is "skipped" and the card was booked as paid with zero proof it cleared. Now, when the card leg isn't machine-confirmed, the cashier must confirm "card approved on the terminal?" before it's recorded; cancel records nothing. Also raise the shared AlertDialog to z-[80] so a confirmation renders above the POS pay sheet (z-[60]) and its busy overlay (z-[70]); still below toasts. tsc clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Meezi — Day 1 Quick Start
Step 1 — Copy these 4 files to your project root
.cursorrules ← AI rules for Cursor MEEZI_CURSOR_GUIDE.md ← Full development guide docker-compose.yml ← Local DB + Redis README.md ← This file
Step 2 — Start local services
docker-compose up -d
Step 3 — Create project structure
mkdir meezi && cd meezi git init
mkdir src web mobile cd src dotnet new sln -n Meezi dotnet new webapi -n Meezi.API --use-controllers dotnet new classlib -n Meezi.Core dotnet new classlib -n Meezi.Infrastructure dotnet new classlib -n Meezi.Shared dotnet sln add Meezi.API Meezi.Core Meezi.Infrastructure Meezi.Shared
cd ../web npx create-next-app@latest dashboard --typescript --tailwind --app
cd ../mobile flutter create meezi_app --org ir.meezi
Step 4 — Open in Cursor
cursor . (from the meezi/ root folder)
Step 5 — Paste this FIRST prompt in Cursor chat (Cmd+L)
Read .cursorrules and MEEZI_CURSOR_GUIDE.md completely. Then do Sprint 1 Week 1:
- Set up the .NET solution with proper references between projects
- Add all NuGet packages listed in the guide to each project
- Create the complete EF Core entity schema from the guide
- Set up AppDbContext with all DbSets
- Create TenantMiddleware and ITenantContext
- Set up Program.cs with full middleware pipeline
Cursor Chat Tips
Ask one sprint at a time
"Do Sprint 2: build the POS order APIs (menu, tables, orders)"
Reference specific sections
"Build the CRM endpoint from Step 10 of MEEZI_CURSOR_GUIDE.md"
Debug with context
"The order API returns 403. Check if TenantMiddleware is injecting CafeId correctly"
Generate Flutter screens
"Build the Flutter POS screen from Sprint 2 in the guide. RTL, Farsi, Riverpod state"
Useful Cursor Keyboard Shortcuts
Cmd+L → Open AI chat Cmd+K → Inline AI edit (select code first) Cmd+I → Composer (multi-file edits) Cmd+. → Quick fix / suggestion Tab → Accept autocomplete
Local URLs when running
Backend API: https://localhost:7001 API Swagger: https://localhost:7001/swagger Dashboard: http://localhost:3000 Hangfire UI: https://localhost:7001/hangfire Flutter web: http://localhost:8080