Inspiration
Site inspections on active construction projects are still surprisingly manual. The FMI & PlanGrid "Construction Disconnected" study found that construction teams lose 5.5 hours every week just tracking down project data, and 22% of rework comes from bad or hard-to-share project information.
On the App Store, tools like Site Audit Pro, Site Audit, and Site Report Pro prove superintendents already pay for mobile inspection apps. The catch is that they still work like digital paper forms: you have to stop, pull off your gloves, tap through dropdowns, and type every issue by hand.
And apps that need the internet are useless on site—basements and concrete rooms kill your reception. So I built SiteFlow AI: you speak a 4-second voice note offline and it logs the structured issue on-device, or you record an entire walkthrough with photos and let Cloud Gemini split it into issues and generate a PDF you can send straight to subcontractors.
What it does
SiteFlow AI covers the full inspection flow from field capture to final report:
- Voice & Photo Issue Capture: Tap the dictate button in the bottom-right thumb zone, speak naturally (transcribed on-device via
SFSpeechRecognizer), and SiteFlow extracts a structured issue—title, trade, severity, location, assignee, and repair action—at $0.00 API cost. - Walk & Record: Record a continuous walkthrough while snapping photos along the way. If you're offline in a dead zone, the recording and photos queue locally; once back online, Cloud Gemini splits the audio into separate issues, matches each photo to the right issue by timestamp, and titles the clip.
- Annotate, Sign & Export: Mark up issue photos, capture an auditor signature, preview the full report, and export a formatted PDF or CSV to share with subcontractors.
How we built it
- iOS App: Native SwiftUI (
iOS 18.0+target, with iOS 26 Liquid Glass styling and iOS 26/27FoundationModelssupport). - Hybrid AI (
HybridAIManager):- On-Device Primary + Cloud Fallback: Single-issue capture tries Apple
FoundationModels(SystemLanguageModel.default/LanguageModelSession) first (text on iOS 26; text plus up to 4 image attachments on iOS 27+). If the device doesn't support it or local limits are hit, it falls back to Cloud Gemini viaFirebaseAILogic(FirebaseAI.firebaseAI(backend: .googleAI())), or queues locally if offline (NWPathMonitor). - Multimodal Cloud Processing: Walk & Record audio+photo splitting uses
FirebaseAILogic(gemini-3.5-flash-lite, withgemini-3.8-flashandgemini-flash-latestfallbacks) and strict JSONSchema(GenerationConfig).
- On-Device Primary + Cloud Fallback: Single-issue capture tries Apple
- Local Storage (
LocalMediaStore): Site photos, project covers, and signatures are stored asSHA256-hashed JPEG files inDocuments/Photos/, keeping session metadata lightweight and offline-safe. - Firebase Stack:
FirebaseCore,FirebaseAppCheck(AppCheckDebugProviderin debug,AppAttestProviderin release),FirebaseAILogic, andFirebaseCrashlytics. - Tooling: Built with Xcode, Google Antigravity & Firebase Agent Skills.
Challenges we ran into
- Firebase AI Logic SDK & documentation mismatch: I spent hours figuring out which
firebase-ios-sdkversion to target. The newest SDK (13.2.0) changed/removed some of the earlier hybrid wrapper methods for Apple Foundation Models, while parts of the documentation still pointed to the older12.19.3APIs. Navigating that took some real trial and error. - Debugging TestFlight Cloud AI failures: At one point Cloud AI calls started failing silently in TestFlight with truncated
(Firebase...errors. Checking the project's App Check state viagcloudandfirebaseCLI revealed that Replay Protection onfirebaseml.googleapis.comwas set toENFORCED(rejecting standard App Check tokens). - Accidentally exposing our API key (and fixing it properly): While preparing the repo for submission, I briefly flipped it to public with
GoogleService-Info.pliststill tracked in git and got a compromise alert. I immediately switched the repo back to private, rotated the key in Google Cloud Console, restricted it tocom.siteflowai.app, untracked the plist in favor of a base64-encoded version ofGoogleService-Info.plistdecoded inci_post_clone.shfrom an encrypted Xcode Cloud environment variable (GOOGLE_SERVICE_INFO_PLIST_BASE64), and pushed a clean public repo with zero secret history. - Moving Photos Out of
UserDefaults: Earlier builds saved JPEG data insideUserDefaultsJSON, which doesn't scale for photo-heavy inspections. I refactored image persistence intoDocuments/Photos/files while keeping backward compatibility for cached sessions.
Accomplishments that we're proud of
- Building a full-scale iOS app (91 TestFlight builds) with real field UI/UX, rather than a single-screen demo.
- Designing Walk & Record around how inspectors actually move through a site—letting them talk and snap photos continuously without stopping, then having Gemini align the media and split everything into structured issues automatically.
What we learned
- Automatic on-device fallback (
FoundationModels→FirebaseAILogic) and intentional cloud routing solve different parts of the same workflow: Single-snag capture runs on-device first via AppleFoundationModelsand automatically falls back to Cloud Gemini viaFirebaseAILogicwhen hardware or local limits require it—while continuous audio + photo walkthroughs route straight to Gemini in the cloud. - Proper API key hygiene and CI secret management (
GOOGLE_SERVICE_INFO_PLIST_BASE64in Xcode Cloud) for open-source mobile repos.
What's next for SiteFlow AI: Site Audit
- Integrating Firestore + Cloud Storage for multi-device sync across teams and subcontractors.
- Public App Store release (
SiteFlow AI: Site Audit).