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/27 FoundationModels support).
  • Hybrid AI (HybridAIManager):
    1. 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 via FirebaseAILogic (FirebaseAI.firebaseAI(backend: .googleAI())), or queues locally if offline (NWPathMonitor).
    2. Multimodal Cloud Processing: Walk & Record audio+photo splitting uses FirebaseAILogic (gemini-3.5-flash-lite, with gemini-3.8-flash and gemini-flash-latest fallbacks) and strict JSON Schema (GenerationConfig).
  • Local Storage (LocalMediaStore): Site photos, project covers, and signatures are stored as SHA256-hashed JPEG files in Documents/Photos/, keeping session metadata lightweight and offline-safe.
  • Firebase Stack: FirebaseCore, FirebaseAppCheck (AppCheckDebugProvider in debug, AppAttestProvider in release), FirebaseAILogic, and FirebaseCrashlytics.
  • 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-sdk version 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 older 12.19.3 APIs. 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 via gcloud and firebase CLI revealed that Replay Protection on firebaseml.googleapis.com was set to ENFORCED (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.plist still 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 to com.siteflowai.app, untracked the plist in favor of a base64-encoded version of GoogleService-Info.plist decoded in ci_post_clone.sh from 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 inside UserDefaults JSON, which doesn't scale for photo-heavy inspections. I refactored image persistence into Documents/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 Apple FoundationModels and automatically falls back to Cloud Gemini via FirebaseAILogic when 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_BASE64 in 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).

Built With

Share this project:

Updates

Submission history