Add push notifications (Pushe) + Capacitor shell for Koja

Iran-safe push for the Koja Android app (Cafe Bazaar / Myket / direct APK):

Backend
- PushDevice entity + EF migration; idempotent device register/unregister.
- IPushSender / PusheNotificationSender (Pushe REST) — SendToTopic for
  marketing (city-{slug}) and saved-café (cafe-{slug}) pushes, SendToTokens
  for targeted order/reservation updates.
- Public register/unregister endpoints + authorized topic broadcast.

App
- capacitor.config.ts (native WebView loads the live PWA via server.url).
- push.ts Pushe glue: topic helpers + backend device registration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-05-29 17:06:42 +03:30
parent 289c808257
commit 963d02a265
15 changed files with 3754 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
namespace Meezi.API.Models.Public;
/// <summary>Device registration from the native (Capacitor + Pushe) shell.</summary>
public record RegisterPushDeviceRequest(
string Token,
string Platform = "android",
string? City = null,
string? ConsumerAccountId = null);
public record UnregisterPushDeviceRequest(string Token);
/// <summary>Broadcast a push to a Pushe topic (city-{slug} / cafe-{slug}).</summary>
public record BroadcastPushRequest(
string Topic,
string Title,
string Body,
string? DeepLink = null);