FantasyEngine docs Fantasy Engine user guide
Version 1.0.0
  • 1.0.0 (this version)

Fantasy Engine user guide 1.0.0 / Server services

Browser notifications

Admin

Web push for the website: the AdminCP Progressive Web App settings. The Firebase project, the server key and testing are in the mobile app guide.

Web push: AdminCP → Progressive Web App#

Last updated: 2026-10-28 · v1.0.0

AdminCP → Site Settings → General Configuration → Progressive Web App:

FieldPut in
Enableon
Iconthe image shown with a web notification (a default is set)
Firebase jsonthe firebaseConfig object of the Firebase web app: as the console shows it (keys without quotes; the whole const firebaseConfig = {...}; line may be pasted) or the same object as JSON
Firebase key pairthe public VAPID key of Web Push certificates
Firebase json - the console form
{
  apiKey: "AIza-your-web-api-key",
  authDomain: "your-project.firebaseapp.com",
  projectId: "your-project",
  storageBucket: "your-project.firebasestorage.app",
  messagingSenderId: "123456789012",
  appId: "1:123456789012:web:abcdef123456",
  measurementId: "G-XXXXXXX"
}
or as JSON
{"apiKey": "AIza-your-web-api-key", "authDomain": "your-project.firebaseapp.com", "projectId": "your-project", ...}
A value the site cannot read is refused

When the field holds neither form, the AdminCP does not save it and answers "Firebase json must be the firebaseConfig object from the Firebase console (apiKey, authDomain, projectId ...)." An empty field is allowed (the web app then falls back to the keys compiled into its build, below).

Progressive Web App settings
web-push-settings - Progressive Web App card with placeholder values (2026-10-22)

The site hands these values to the web app in /api/init (config.pwa): with Enable off web push is off, even in a build compiled with it on; with it on and the keys filled, the site's keys are used. The EXPO_PUBLIC_WEB_PUSH_* values compiled into a build apply only when the site sends no usable configuration.

Check
curl -s https://your-site.example/api/init | php -r 'print_r(json_decode(stream_get_contents(STDIN), true)["data"]["config"]["pwa"]);'
Expected
Array
(
    [enable] => 1
    [key_pair] => B-your-vapid-public-key
    [apiKey] => AIza-your-web-api-key
    ...
  • The service worker firebase-messaging-sw.js is part of the web build (installed by build_web.sh) and receives the keys from the page; it loads the Firebase library from www.gstatic.com. It is registered under the site's own path (/firebase-messaging-sw.js, or /<folder>/firebase-messaging-sw.js for a site in a sub-folder), and a notice without a link opens the site's home in that folder. Nothing to set up for a sub-folder.
  • Web push works only over HTTPS (or localhost) and after the member allowed notifications for the site.
  • The AdminCP Broadcast Message goes to the topic global, which only the mobile apps subscribe to: it does not reach browsers.

On a test install of the 9c4fba6 on 2026-10-22: pwa.* written as strict JSON, /api/init returned the filled config.pwa; the console form (with const firebaseConfig =, single quotes and a trailing comma), strict JSON and three unreadable values tested through the AdminCP save (tests/Feature/Core/Admin/AdminSettingsCrudTest.php, "Firebase").

Change log#

Last updated: 2026-11-19 · v1.0.0

Date (GMT+7)SectionWhat changed
2026-10-22allFirst version, checked against daily-fantasy c68e20c.
2026-10-22app-config-files, web-push-settings, push-troubleshootingThe app config carries the iOS push entitlement and background mode (IOS_APS_ENVIRONMENT=development for a dev-client device build), a device proof is still open; the Firebase json accepts the console object and JSON and refuses an unreadable value; the two warnings replaced; checked against the 9c4fba6.
2026-10-28web-push-settings, push-troubleshootingThe service worker is registered under the site's path (sub-folder sites); two troubleshooting rows (money notices in money-off mode, an old root worker).
2026-10-28web-push-settingsShot renamed web-push-settings__pwa-settings after its section (same image).
2026-11-16all, change-logThis copy of the guide describes version 1.0.0 (a separate copy describes 1.1.0). An internal label taken out of an older row and the page-source comment; wording only.
2026-11-19allMoved to the documentation site: this page holds the sections web-push-settings of the former Firebase and push notifications document. Page frame, headings and links between the pages updated; the text of the sections is unchanged.