Fantasy Engine user guide 1.1.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-11-25 · v1.1.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", ...}
The field is saved when you leave it (like the other fields of this page). When it holds neither form, the AdminCP does not save it: the page reloads with the message "Firebase json must be the firebaseConfig object from the Firebase console (apiKey, authDomain, projectId ...)." in a red bar at the top, and the field shows the value saved before (what you pasted is not kept: paste it again once corrected). 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"). On a local site at db92b46 on 2026-11-16: an unreadable value typed on the page, the refusal shown in the red bar after the reload, the stored value unchanged; /api/init still sends config.pwa with enable, key_pair and the seven firebaseConfig keys.
Change log#
Last updated: 2026-11-25 · v1.1.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-10 | change-log | The header names version 1.1.0. Nothing else changed: its source files changed between 1.0.0 and 1.1.0 only in ways it does not describe (the mark-all-as-read cache, the Survivor round notices, which are pushed like the other contest notices); the sections keep their Last updated line. |
| 2026-11-10 | change-log | Internal review labels and the wording of the test sites taken out of older rows and "checked" lines; content unchanged, the Last updated lines of those sections stay. |
| 2026-11-16 | web-push-settings, change-log | The refusal of an unreadable Firebase json as the AdminCP page shows it: the page reloads with the message in a red bar at the top and the field back at its saved value; new screenshot web-push-settings__firebase-json-refused__admin-1280__2026-11-16.png. Checked against db92b46. |
| 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. |
| 2026-11-25 | all | Re-checked against e94aef78, the code of the 1.1.0 release: every section compared with the code changes since it was last checked; the sections whose code changed since then carry today's date. |