Loading…
Loading…
Audits-IQ is a production-focused software project built by Sadam Hussain using React Native, TypeScript, Firebase, and related technologies.
Offline-first inspection platform in React Native: local-first data, background sync with field-level conflict resolution, configurable form engine. Outcome: fieldwork software that works with zero connectivity.
Tech Stack




Status
Production Ready
Type
Enterprise platform
Led the cross-platform mobile development of a flagship enterprise auditing system using React Native and TypeScript, architecting the mobile application for offline reliability, performance with large audit records, and cross-platform consistency.
Architected a local-first data persistence layer that stores all audit data on-device using structured local storage, enabling inspectors to create, edit, and complete full audit workflows with zero connectivity - no server dependency for any field operation.
Designed a conflict-aware synchronization engine that reconciles locally modified audit records with the central Firestore database when connectivity returns, using timestamp-based versioning and field-level merge strategies to handle concurrent edits from multiple inspectors.
Built a highly configurable drag-and-drop form engine supporting conditional logic (show/hide fields based on previous answers), branching workflows (different inspection paths based on findings), scored assessments, and industry-specific templates - all configurable by business users without engineering involvement.
Implemented multi-media attachment handling for offline field environments - photo capture, annotation, and storage are managed locally with deferred upload queuing that syncs media files to Firebase Storage in the background when bandwidth is available.
Built automated enterprise reporting services using Cloud Functions to generate structured PDF and Excel outputs from completed audit data, with configurable report templates that match each client's compliance documentation requirements.
Optimized mobile runtime performance for large audit records containing hundreds of form fields and multiple media attachments, implementing virtualized form rendering, incremental data loading, and memory-efficient media handling to prevent crashes on mid-range devices.
Integrated Redux for offline-aware state management with persistence middleware that serializes the entire audit state to local storage on every change, ensuring zero data loss even if the app is force-closed or the device runs out of battery mid-inspection.
Implemented rigorous mobile testing with Jest and React Testing Library, focusing on offline state transitions (online → offline → edit → reconnect → sync), conflict resolution logic, and form engine conditional behavior.
Developed reusable cross-platform UI components ensuring consistent enterprise design standards across iOS and Android, with platform-specific adaptations for native gestures, navigation patterns, and notification handling.
Audits-IQ is an inspection platform built for places with no signal: basements, factory floors, remote sites. The app is offline-first by design; every write lands on-device, and a background sync engine reconciles changes when connectivity returns, with field-level conflict resolution. A drag-and-drop form engine lets each industry define its own inspections without engineering changes.
This isn't an app that "degrades gracefully" when offline - it's designed offline-first, with online synchronization as the enhancement. The distinction matters architecturally: every state mutation, every UI interaction, and every data write assumes no network is available and works perfectly in that context.
The platform's second major technical investment is its configurable form engine. Rather than building fixed-layout inspection forms, the system provides a generic engine where business users define form structures, conditional logic, branching workflows, and scoring rules through a drag-and-drop builder. This engine-based approach allows the platform to serve diverse industries (construction, food safety, manufacturing, healthcare) without engineering changes for each new inspection type.
Field inspections happen in basements, construction sites, factory floors, remote agricultural facilities, and industrial environments where cellular connectivity is unreliable or nonexistent. Traditional inspection tools - whether paper forms or cloud-dependent mobile apps - fail in these conditions. Paper forms create data entry bottlenecks and transcription errors. Cloud-dependent apps freeze, lose data, or prevent inspectors from working when the signal drops.
The core problem: Inspection work is inherently disconnected. The places where inspections happen are the places where connectivity is worst. Any tool that requires an internet connection to function is fundamentally mismatched with the reality of fieldwork. But inspections also generate data that needs to reach a central system for compliance, reporting, and operational visibility - so eventually, the data must sync.
Stakeholder perspective:
Constraints that shaped the architecture:
The fundamental architectural decision is that the app's primary state is offline. Every feature is designed to work without a network connection, and online connectivity is treated as an opportunity to sync rather than a requirement to function.
This inverts the typical mobile app architecture where data flows through API calls and local caching serves as a performance optimization. In Audits-IQ, local storage is the primary data store, and Firestore is the secondary store that receives synchronized copies. The implications are significant:
The decision to build a configurable form engine rather than fixed-layout forms was driven by the enterprise market's diversity. A construction safety inspection has entirely different fields, logic, and scoring than a food safety audit or a healthcare facility review.
The engine-based approach means:
The trade-off is complexity - a generic form engine is significantly harder to build and test than fixed forms. But the scalability payoff is substantial: each new industry or compliance standard that Audits-IQ enters requires a new template, not a new feature.
The synchronization layer handles the most complex technical challenge - reconciling data that was created or modified without server coordination.
Write path (local → cloud):
Read path (cloud → local):
Redux serves a critical role beyond typical state management - it's the offline persistence layer. Middleware serializes the Redux store to structured local storage on every state change (debounced to avoid excessive I/O). When the app launches, the store is rehydrated from local storage, immediately restoring the inspector's complete working state including in-progress audits, form answers, and pending sync queue.
This architecture means:
The most architecturally challenging aspect of Audits-IQ is the synchronization engine that reconciles independently modified audit records from multiple inspectors working offline simultaneously.
The Problem: In a traditional client-server architecture, concurrent edits are handled by the server - last write wins, or optimistic locking rejects the second write. In an offline-first system, there is no server mediating writes. Two inspectors can modify the same audit record while both offline, and neither knows about the other's changes until both sync.
The Conflict Taxonomy:
Non-overlapping field edits (auto-merge): Inspector A modifies fields in Section 1. Inspector B modifies fields in Section 3. Both changes are valid and can be merged automatically - the merged result contains both sets of changes. This is the most common case and is handled transparently.
Overlapping field edits (conflict): Inspector A rates a safety item as "Pass" while Inspector B rates the same item as "Fail." Both had reasons - perhaps they inspected different aspects. The system cannot automatically determine which is correct.
Structural conflicts (rare): One inspector adds a new section to the audit while another inspector deletes that section. These require administrative resolution.
The Resolution Strategy:
For auto-mergeable changes, the system tracks modifications at the field level, not the record level. Each field in an audit record has its own last-modified timestamp. When syncing, the system compares field-by-field: if Inspector A's version has a newer timestamp for fields 1-5 and Inspector B's version has a newer timestamp for fields 6-10, the merged result takes each field's latest version.
For actual conflicts (same field, different values, different timestamps), the system applies "last write wins" at the field level - the later timestamp's value becomes the canonical value. However, the overwritten value isn't discarded. It's stored in a conflict log attached to the audit record, recording: which field, what the original value was, what it was overwritten with, who made each edit, and when. Compliance managers can review the conflict log and manually override if the "losing" value was actually correct.
For structural conflicts, the system preserves both versions and flags the record for administrative review. This is rare enough that manual resolution is acceptable.
Sync Queue Processing: The sync queue is processed sequentially (not in parallel) to prevent race conditions. Each record syncs in order:
Why field-level merging: Record-level conflict resolution (the entire record is "in conflict" if any field differs) is simpler but generates false conflicts constantly. In a large audit with hundreds of fields, two inspectors almost always modify different sections. Field-level merging resolves these automatically, reducing administrator review burden to only the genuinely ambiguous cases.
Challenge: Large audit records with hundreds of form fields caused performance degradation - slow rendering, high memory usage, and occasional crashes on mid-range Android devices. Approach: Implemented virtualized form rendering (only mounting visible fields in the component tree), incremental section loading (load the active section first, background-load the rest), and memory-efficient photo thumbnails (low-res for gallery display, full-res on demand). Why: React Native's bridge has performance characteristics that make rendering hundreds of components simultaneously problematic. Virtualization keeps the active component count manageable regardless of form size.
Challenge: Photo capture and storage during offline inspections could exhaust device storage on long inspection days with many photo-heavy audits. Approach: Implemented tiered storage management - full-resolution photos store locally during the active inspection, compressed versions queue for upload, and successfully uploaded photos transition to "cloud-backed" status where the local copy can be evicted if storage pressure is detected. The system warns inspectors when device storage is running low. Why: Field inspectors may complete dozens of audits per day, each with multiple photos. Without proactive storage management, the device fills up and the inspector can't continue working - exactly the failure mode offline-first architecture is supposed to prevent.
Challenge: The configurable form engine needed to support conditional logic (field visibility based on previous answers) that could be arbitrarily complex - nested conditions, multiple dependencies, and circular reference detection. Approach: Built the conditional logic system as a dependency graph where fields declare their visibility conditions as references to other fields' values. The engine evaluates the graph topologically, detecting circular references at template creation time (blocking save) rather than at runtime (causing infinite loops). Why: A simple if/else approach works for basic conditions but fails when conditions reference each other or form chains. The graph-based approach handles arbitrary complexity while preventing the invalid configurations that would crash the form engine at runtime.
Challenge: Enterprise clients required different report formats - some needed detailed PDF reports with photos, others needed Excel summaries for data analysis, others needed both with different layouts. Approach: Built a report template engine in Cloud Functions where each client configures their desired output format, field selection, photo placement, and branding. The same audit data produces different report artifacts based on the client's template configuration. Why: Hardcoding report layouts per client doesn't scale. The template approach means onboarding a new enterprise client's reporting requirements is a configuration task, not a development task.
Audits-IQ demonstrated that in field-service software, offline support is not a feature - it is the product. Designing for the "unconnected" user requires a fundamental shift in how state, synchronization, and UI feedback are managed. Every architectural decision must be evaluated against the question: "Does this work at 0 Mbps?"
Patterns I'd reuse:
What I'd reconsider:
Trade-offs acknowledged: