restaurants.cover_url existed in the schema and was already read by the
public menu page, but nothing could ever write it — the update endpoint
didn't accept it and there was no picker in the app. Adds coverUrl to
PATCH /restaurants/:id and a cover photo picker in the mobile account
screen, next to the existing logo picker.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Restaurant owners can now enable/disable AI-translated menu languages
(EN/DE/AR/RU/FR) from the account screen, calling the new
/restaurants/:id/languages endpoints. Turkish stays as the fixed base
language; adding a language triggers a full AI translation pass, removing
one just hides it (translations are kept for a fast re-enable).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
RevenueCat's entitlement identifier contains U+2024 (ONE DOT LEADER),
not a plain period — "Menul.io Pro" never matched the real
"Menul⁚io Pro" key, so isProActive() stayed false even after a real
purchase (confirmed via a genuine sandbox trial that RevenueCat
recorded as active while the app kept showing "Ücretsiz plan").
RevenueCat's API doesn't allow renaming an entitlement's lookup_key
after creation (405), so fixed on our side instead: this app only
ever grants one entitlement, so "any active entitlement" == Pro,
no identifier string needed.
eas.json's production build profile hardcodes its own env block —
local apps/mobile/.env is never read by EAS cloud builds. The
RevenueCat public key was missing from that list, so every
production/TestFlight build compiled EXPO_PUBLIC_REVENUECAT_API_KEY
as undefined, making configurePurchases() silently no-op and every
later Purchases call throw "no singleton instance".
"There is no singleton instance" when tapping Yayınla — the app can
land directly on /menu (e.g. iOS restoring the last screen on
relaunch) without ever running index.tsx's routing gate, so
Purchases.configure() was never called. Menu editor's load() now
configures it defensively too, same pattern as account/subscription.tsx.
Missing safe-area top inset pushed the header (back arrow + title)
up under the status bar/notch, overlapping the clock and making the
button effectively untappable. Also falls back to router.replace
when there's no back history instead of silently no-op'ing.
Publishing (including re-publishing after a lapsed subscription —
PRD §15) now checks Pro entitlement first; if inactive, prompts the
owner to the paywall instead of calling the publish endpoint. The
paywall also flags packages with an active introductory offer as
"7 gün ücretsiz dene" (both plans now have a 7-day free trial
configured in App Store Connect, Turkey territory).
- Purchases.configure() runs with appUserID = restaurantId at every
point the id becomes known (login resolve, cold-start rehydration,
onboarding restaurant creation) — this must match what the backend
webhook expects (see apps/api/src/routes/subscription.ts).
- New account/subscription.tsx paywall: current entitlement status,
offering packages with real store prices, purchase, restore.
- Linked from the account screen.
Native module — requires an EAS/dev-client build, not plain Expo Go.