Skip to content
RWC

Project

FieldOps: An Offline-First Property Inspection App in React Native

FieldOps is a React Native app for property inspections. Field agents capture checklists, photos and flags without signal and upload later; property managers review visits and alerts. I built the app and the API changes behind it.

By Rohit Pippal10 min readComments

FieldOps is a mobile app for property inspections. Field agents go out to the properties, walk through a checklist, take photos, note what needs fixing and what a tenant should be told, check their supplies, and rate the visit. Property managers then look at that evidence and decide whether the job is done.

The hard part is where the work happens. An agent is often in a basement or a stairwell with no signal, and the app has to keep every tap safe until the phone reaches the server again. A manager is online and wants to judge a visit quickly.

I built the mobile app for both of them in React Native, from one codebase: the role on the login decides which app the person gets. I also wrote the changes the FastAPI backend and the Next.js admin panel needed for this, and handed them over as patches.

What I built

  • The agent's visit flow: tasks, supplies, the visit with its checklist, photos and flags, ratings, a summary, store stops with receipts, a sync center, hours and a profile.
  • An offline engine: a SQLite database on the phone that keeps each visit and every write until it uploads, in the order the server needs.
  • Property-manager mode: a portfolio dashboard, a review queue, a full review of one visit, and an alerts feed.
  • Push notifications: Firebase Cloud Messaging, each notification opening the task or visit it is about.
  • API changes: an alerts feed, a richer review queue, a real push sender and the completion rules in the offline bundle, with tests.
  • Admin panel: fields for each task type's completion rules.
  • An Android module: a battery-optimisation check that React Native does not offer.

How FieldOps works

Field agents

An agent signs in and sees My Tasks. Their visits come down in one sync bundle, with each property, its tenants, the checklist and the app's settings. The task screen only offers the moves the server's task flow allows at that status.

Before the visit, the agent confirms the supplies they have; a missing item needs a reason. Then comes the visit itself:

  • a checklist with yes/no, text, number and photo questions, some only for one season
  • photos from the camera or the gallery, checked on the phone (JPEG or PNG, at most 10 MB) before they go anywhere
  • flags for deferred maintenance and tenant follow-ups, each marked as the owner's or the tenant's responsibility
  • four ratings: the condition, the kind of fix, satisfaction, and whether the job is done or needs a return visit, with a reason

A summary shows everything once more, and Submit hands it all to the upload queue. A store stop on the way has its own screen: start and end, a timer, a GPS fix and a photo of the receipt. Ending a stop without a receipt warns but does not block, because the manager sees the gap either way.

Agents have no clock-in: driving, on-site and store time is worked out on the server from the events the app sends.

Property managers

A manager signs in to four tabs instead: Home, Review, Alerts and Profile.

  • Home puts the visits waiting for review in a large card, then overdue tasks, today's tasks, open maintenance and open tenant follow-ups, a bar of all tasks by status, and the latest three alerts. Every card opens its list.
  • Review is the inbox: submitted visits, oldest first, with the property, the agent, the task type, when it was completed and up to four warning badges.
  • Visit review lays out the evidence in the order a manager asks questions: who was there and for how long, the photos, the checklist answers, the ratings, the flags and findings, the supplies, and a timeline. Then the manager closes the visit, sends it back to the agent with a reason, or adds a finding.
  • Alerts lists everything that needs a look, newest first, filtered by type.

Scheduling, assigning work and closing maintenance items stay in the web admin panel, on purpose: closing an item has paperwork behind it, and a car park is the wrong place for that.

Built to work without signal

At first a visit lived only in the screen's memory, so closing the app mid-visit lost the work. Before the screens that depend on it, I built the offline engine.

  • The phone's database is the source of truth. Every change during a visit is written to SQLite straight away, so it survives a crash, a restart or a switch to another task. Photos stay where the camera saved them; the database keeps only their paths.
  • Every write waits in a queue. Submit never talks to the network directly. It turns the visit into queue items: photos, answers, flags, supplies, the rating, and finally "complete". The same button works with or without signal.
  • The queue drains in a fixed order. The server only accepts "complete" once the evidence is stored, so a failure stops that task instead of skipping ahead. Other tasks keep going.
  • It tells a dead end from a bad connection. A network error stops the run and waits. An error the server would give again forever is marked failed, with the server's reason.
  • It sends when it makes sense: when the phone comes back online and when the app returns to the foreground, not on a timer that drains the battery. "Online" means the internet can really be reached, not just that Wi-Fi is on.

The Sync Center shows the counts by kind, the failed items with their reasons, and Retry. It has no delete button: a queued item is proof of work the agent really did, and clearing a stubborn upload would erase it from the record. A bar on every screen turns red the moment anything fails, and signing out keeps the queue on the phone.

Retries that never duplicate

An upload over a weak signal can reach the server while its answer gets lost, and the app tries again. So every write carries an id made on the phone, once. The server recognises a repeat by it and returns the row it already has, and the local queue is unique on it too, so a double tap never adds a second item.

Ratings needed one more step. The server returns a known rating unchanged, which would silently drop an agent's later edit, so each new version of a rating gets a fresh id.

Block, don't remind

The server refuses to complete a visit until the task type's minimums are met: by default three tenant flags, three maintenance flags and one photo, plus the answers, the supply check and the rating. At first the app learned this only at the very end, perhaps offline.

I added those minimums to the offline bundle, so the app knows them before the visit starts. Complete stays locked, and a panel names exactly what is still missing. The server keeps the last word: when it refuses, its own list is shown in plain words, with a link to fix each item.

In the admin panel, I added the three minimums to the task type form, pre-filled with the server's defaults. An empty number field would otherwise be saved as zero and quietly create a task type with no rules.

One app, two shapes

An agent works one visit from start to finish, so they get a linear stack of screens. A manager moves between four views all day, so they get tabs. Neither has a route into the other, so nobody lands on a screen the server would refuse them.

The manager side is online-first: no queue, and the database is never opened on a manager's phone. Without signal, a grey line says "Offline — showing last loaded", and the action buttons wait with "Connect to act on this visit". Managers also skip the permission setup: they never need the camera or location.

Manager mode and the API behind it

Before building the manager screens, I checked every endpoint they needed against the backend's code. The visit review was mostly ready. The rest was not: there was no alerts feed, the review queue sent ids without names and only one of the four warnings (its badges would have cost about sixty requests for a page of twenty), and sending a push was a placeholder.

I wrote the backend changes in FastAPI and handed them over as one patch with tests, without any database change:

  • One definition of an alert, shared by the feed and the queue's badges, so they can never disagree: a return visit needed, a supply override, an incomplete exit, and a store stop without a receipt. The last one is worked out in SQL by comparing two grouped counts, never by looping over tasks.
  • Server time, not phone time. The feed is ordered by when the server received each record, so a phone with a wrong clock cannot pin itself to the top.
  • One request for the queue, with names, the completion time and all four badges on each row.
  • Photo links in the list, so twelve photos cost one request instead of thirteen.
  • "Overdue" as a filter, using the dashboard's own rule, so the number on the card and the list it opens always match.

On the phone, each section of the review loads on its own, and a missing one is shown as a gap, because "the agent never recorded this" is the finding a manager needs.

Push notifications that open the right screen

On the server, I replaced the placeholder with Firebase Cloud Messaging's current HTTP v1 API, signed in with a short-lived token from a service account. Every push carries its type and its task, so a tap opens the right task or visit, not just the app.

Agents hear about a new task and a visit sent back. Managers hear about only two alerts, a return visit and an incomplete exit; the other two wait in the feed, because pushing all four would teach a manager to ignore all four. A token the push service rejects is switched off, but a network failure is not: treating an outage as a dead token would unsubscribe every phone. Signing out removes the phone's token first.

Small things that matter in the field

  • Sunlight: a high-contrast palette, because the app is used outdoors.
  • Gloves: ratings are a row of numbers to tap, with no slider and no typing.
  • Permissions in plain words: the first launch and the Profile screen say what breaks without location, the camera, photos, notifications or the battery setting, with a Fix button for each.
  • Battery: Android can stop an app in the background to save battery. React Native cannot read that setting, so a small Kotlin module reads it and opens the right settings page.

What I took from this project

Offline-first is not a feature you add at the end. It decides where data lives and what "submitted" means, so it had to come before the screens. Reading the backend's code before planning paid off too: the gaps showed up in a table, not in a demo.

Tools used

AreaTools
Mobile appReact Native, TypeScript, React Navigation
Data on the phoneSQLite, MMKV, TanStack Query, Zustand
FormsReact Hook Form, Zod
DeviceCamera and gallery, GPS, network state, permissions, a Kotlin native module
PushFirebase Cloud Messaging (HTTP v1)
BackendFastAPI, Python, SQLAlchemy, PostgreSQL, pytest
Admin panelNext.js, TypeScript
TestsJest

Do you need a mobile app that keeps working when the signal does not? Tell me about it.

Comments

No ratings yet

Log in to comment

Only members can comment and rate posts. It is free and takes a minute.

No comments yet. Be the first to share your thoughts.

All projects
  • ProjectFeatured

    AI Platforms

    MasteryOS: An AI Platform for Experts, With Assistants, Assessments and Voice

    MasteryOS is MasteryMade's AI platform for experts: each gets a site with assistants that answer from their own material, guided assessments, voice chat, plans and credits. I am the largest contributor to its Next.js frontend and worked on two side tools, MetaMCP and KeyVault.

    10 min read
  • Project

    Online Stores

    CoffeeRun: Coffee Ordering and Delivery for Salons and Cafés on Laravel

    CoffeeRun is an Australian Laravel platform where salon clients scan a QR code, order coffee from nearby cafés and get it brought to their chair. I worked on the ordering flow, the Stripe and PayPal checkout, the café dashboard and the admin order screens.

    9 min read