Sultan
Field workforce platform
2022 - 2023 · Cross-platform mobile and backend architecture
Field-workforce platform for an Italian construction company — native iOS and Android apps plus an installable PWA on one Firebase backend, with QR-and-geolocation clock-in, digital document signing, chat and a Vue admin back-office.
One Workforce, Three Native Clients and a Shared Firebase Core
Sultan is a field-workforce platform built for an Italian construction and industrial company, where the people using the software are out on working sites rather than at a desk. My role was the architecture that ties three client apps — native iOS, native Android and an installable PWA — to one Firebase backend and a web admin back-office.
The product exists because the day-to-day reality of a cantiere does not fit a normal office tool. Workers move between sites, connectivity is unreliable, and the company still needs accurate clock-in records, signed documents and a reliable channel to reach everyone. Sultan turns that into one operating system: each worker carries the app, each site is a place you can clock into, and the back-office sees it all in real time.
Rather than ship a single wrapped webview, the project runs three genuine clients on a shared contract. The iOS app is SwiftUI with an MVVM structure — dedicated view models for dashboard, working sites, clocking-in, calendar, expenses, documents, chat, authentication and location. The Android app is native Kotlin with the same MVVM shape, Hilt dependency injection and Firebase repositories. The third client is a Nuxt 3 PWA built with Nuxt UI, Pug and @vite-pwa/nuxt, installable to the home screen and offline-aware through Dexie and IndexedDB. All three speak to the same Firebase project, so a clock-in from an iPhone, an Android phone or the web app lands in the same place.
The shared core is Firebase: Firestore for data, Firebase Auth for identity and roles, Cloud Functions for trusted server logic, Storage for documents and Cloud Messaging for push. A @sultan/shared TypeScript package holds the domain models — users, working sites, clocking-in, expenses, documents, signatures, communications, chat groups, messages, events, tools, work reports and notifications — so the same shapes are honored by the apps, the functions and the admin panel. Firestore triggers keep everything in sync: writes fan out to Algolia indexes for search and push notifications for chat messages, calendar events, working-site changes and clock-in updates.
The most security-sensitive piece is clock-in. A worker does not simply tap a button; they scan a QR code physically present at the site. Those codes are minted by a callable Cloud Function reserved for admins, which signs the working-site payload as an ES256 JWT and renders it into a QR image. Scanning the code opens the app with a verifiable token, so a timbratura proves both the site and that the code is authentic rather than fabricated. The clock-in flow also captures geolocation and supports a foreman mode — a site lead can clock in for themselves or for the other workers present — plus travel and expense entries attached to the same record.
Beyond clock-in, Sultan carries the rest of the employment relationship. Workers receive personal documents — payslips and LUL, PPE and welfare paperwork — and sign them digitally through a dedicated sign-document function, so the company has a traceable record of delivery and acknowledgement. A communications board pushes company-wide announcements, a group chat with admin moderation keeps teams reachable, and a calendar combines scheduled events with the worker’s own clock-in history. Tools and equipment are tracked per site, and everything important arrives as a push notification.
The company side is a separate Vue admin back-office. Built with Vuex, vuexfire, Google Maps, a calendar and Algolia, it gives administrators a live map of sites and clock-ins, employee directories and per-employee reports, document and communication management, tool tracking and an Excel export of work hours generated server-side with pdf-lib and xlsx helpers in the functions layer. Role-aware access — worker, foreman, admin and super-admin — runs consistently from the Cloud Functions down to what each client is allowed to do.
The result is a platform shaped around the field rather than the office: native apps that feel right on each phone, an installable web fallback, a back-office that mirrors the sites in real time, and a Firebase core that keeps authorization, signing and synchronization trustworthy even when the work happens far from a good connection.
The screenshots shown are anonymized: real names, addresses and document references have been replaced with fictitious data.
Gallery







