Fantasy Engine user guide 1.0.0 / Server services
Browser notifications
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:
| Field | Put in |
|---|---|
| Enable | on |
| Icon | the image shown with a web notification (a default is set) |
| Firebase json | the 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 pair | the public VAPID key of Web Push certificates |
{
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", ...}
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).

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.
curl -s https://your-site.example/api/init | php -r 'print_r(json_decode(stream_get_contents(STDIN), true)["data"]["config"]["pwa"]);'
ExpectedArray
(
[enable] => 1
[key_pair] => B-your-vapid-public-key
[apiKey] => AIza-your-web-api-key
...
- The service worker
firebase-messaging-sw.jsis part of the web build (installed bybuild_web.sh) and receives the keys from the page; it loads the Firebase library fromwww.gstatic.com. It is registered under the site's own path (/firebase-messaging-sw.js, or/<folder>/firebase-messaging-sw.jsfor 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) | Section | What changed |
|---|---|---|
| 2026-10-22 | all | First version, checked against daily-fantasy c68e20c. |
| 2026-10-22 | app-config-files, web-push-settings, push-troubleshooting | The 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-28 | web-push-settings, push-troubleshooting | The 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-28 | web-push-settings | Shot renamed web-push-settings__pwa-settings after its section (same image). |
| 2026-11-16 | all, change-log | This 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-19 | all | Moved 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. |