Restaurant SaaS — Runtime Architecture

Restaurant SaaS — Runtime Architecture An architecture diagram generated by Archify. Guest · table QR · Public zone — guest-only Guest table QR Operator · tenant staff · Tenant admin zone — auth:sanctum Operator tenant staff Platform user · SaaS owner · Platform ops zone — staff-only Platform user SaaS owner customer · Next.js :3002 · Host machine (laragon / docker) › Public zone — guest-only customer Next.js :3002 admin · Next.js :3001 · Host machine (laragon / docker) › Tenant admin zone — auth:sanctum admin Next.js :3001 platform · Next.js :3003 · Host machine (laragon / docker) › Platform ops zone — staff-only platform Next.js :3003 nginx · 1.27 :8000 · Host machine (laragon / docker) › Bridge network: restaurant nginx 1.27 :8000 PHP-FPM · app image · Host machine (laragon / docker) › Bridge network: restaurant PHP-FPM app image Laravel 12 app · PHP 8.3 · Host machine (laragon / docker) › Bridge network: restaurant · ~30 restaurant/* packages Laravel 12 app PHP 8.3 ~30 restaurant/* packages Postgres 16 · :5433 · Host machine (laragon / docker) › Bridge network: restaurant Postgres 16 :5433 Redis 7 · cache / queue · Host machine (laragon / docker) › Bridge network: restaurant Redis 7 cache / queue Reverb · WebSocket :8081 · Host machine (laragon / docker) › Bridge network: restaurant Reverb WebSocket :8081 MinIO / S3 · media bucket · Host machine (laragon / docker) › Bridge network: restaurant MinIO / S3 media bucket Mailpit · dev SMTP · Host machine (laragon / docker) › Bridge network: restaurant Mailpit dev SMTP pgAdmin · ops :5050 · Host machine (laragon / docker) › Bridge network: restaurant pgAdmin ops :5050 admin WS · Echo.private · Host machine (laragon / docker) › Tenant admin zone — auth:sanctum admin WS Echo.private customer WS · Echo.channel · Host machine (laragon / docker) customer WS Echo.channel HTTPS HTTPS php-sock WS events WS events Host machine (laragon / docker) Public zone — guest-only Tenant admin zone — auth:sanctum Platform ops zone — staff-only Bridge network: restaurant

Primary path

  • • Guest → customer (:3002) → nginx → PHP-FPM → restaurant/* package → Postgres.
  • • Reverb fans events to public order.{id} + private tenant.*.orders; payments webhooks terminate in the same package.

Trust + externals

  • • Three zones (public, tenant admin, platform ops) — broadcasts guarded by BroadcastChannelAuthorization and spatie/laravel-permission.
  • • WhatsApp Cloud API, GA-style analytics, AWS S3 in production (MinIO in dev); browser opens Reverb directly, bypassing nginx.