Installing Fahari as an app
Fahari is a Progressive Web App: people install it from the browser and it then opens from the home screen or dock, full screen, like a native app. There is nothing to publish in an app store.
How people install it
| Device | How |
|---|---|
| Android (Chrome, Edge, Samsung Internet) | Tap Install on the sign-in banner, in the account menu or under More. The browser's own install dialog opens. |
| iPhone and iPad | In Safari, tap Share, then Add to Home Screen. Fahari's Install button shows these steps. (Other iPhone browsers are told to open the page in Safari.) |
| Windows, ChromeOS, Linux (Chrome or Edge) | The install icon at the end of the address bar, or Install in the account menu. Installed apps appear in the Start menu and taskbar. |
| Mac | Chrome/Edge as above, or Safari 17+: File → Add to Dock. |
| Firefox | On Android: menu → Install. Firefox on a computer can't install web apps; use Chrome, Edge or Safari. |
Once installed, the Install buttons disappear.
School-branded apps
Each school gets its own app: its name, logo and colour on the icon and launch screen.
- Someone signed in to a school (parent, teacher, admin…) installs that school's app.
- From outside, share
https://your-site/login.php?school=SCHOOL-SLUG; the sign-in page offers the school's app. - School Admin → Brand colours → Your app sets the short name under the icon (12 letters at most; phones cut longer names) and shows the icon.
The platform's own app (for Super Admins and anyone signing in without a school link) uses the platform name, the Fahari mark and the platform primary colour.
What is generated
public/app-icon.php draws every icon with PHP GD and caches it in storage/cache/app-icons/:
- icons 48–512 px on a rounded white tile, and Android adaptive (maskable) icons on the brand colour;
- Apple touch icons (152, 167, 180) and iPhone/iPad launch screens for 15 screen sizes;
- Windows tiles (
browserconfig.php).
Changing a logo or colour produces new icons automatically. Installed apps pick up a new icon when the browser next checks the manifest (Android usually within a day; iOS only when the app is re-added).
public/manifest.php (and manifest.php?school=…) lists the icons, four screenshots from
public/assets/brand/screenshots/, shortcuts (Messages, Pay fees, Mark attendance) and opens an
already-open window instead of a second one.
Offline
The service worker (public/sw.js) keeps the stylesheets, scripts, fonts and icons for speed and
shows a branded "You're offline" page when there is no connection. Pages themselves always come from
the server, because fees, marks and attendance must never be shown out of date.
Requirements
- HTTPS (browsers only install from secure sites;
localhostis allowed for testing). - The PHP GD extension with FreeType (standard on cPanel). Without GD the shipped icons are used.
storage/must be writable (it already is for uploads).