Cross-platform mobile app

MileageSync

A hands-free mileage logger that detects drives in the background and turns them into IRS-ready deductions, with every GPS point kept on the device.

Overview

A mileage deduction needs a contemporaneous log, and manual logging fails the moment someone is busy — the drives that go unrecorded are exactly the ones worth money.

Automating it means running location tracking in the background, where modern iOS and Android actively work against you. Processes get killed, battery optimisation throttles updates, and a tracker that quietly stops is worse than no tracker at all, because the user only finds out at tax time.

MileageSync puts the hard part behind pure functions. A detection engine reasons over location samples to decide when a drive genuinely starts and ends, and because it is pure it can be tested against simulated restarts, GPS drift, and traffic. Around it sits a background pipeline that persists its own state, self-heals when the OS interferes, and reports its health honestly.

The design principle running through it is that the app should never present a number the user could not defend to the IRS. When trips are unclassified, the deduction says so.

Status
In development — store listings in progress
Built for
Self-employed drivers, contractors, and anyone claiming a mileage deduction or reimbursement
Role
Solo full-stack mobile developer: detection engine, background pipeline, tax and export engine, store compliance
Timeline
Sep 2025 – Present
Platforms
iOS, Android
Categories
Mobile Apps, Location & Maps
The MileageSync app shown on a phone, displaying its trip tracking home screen

What was built

Responsibilities and core features

Responsibilities

  • Trip detection engine written as pure, testable functions
  • Background location pipeline that survives process death and OS interference
  • Tax engine producing IRS-style logs and filing-ready PDF summaries
  • On-device SQLite schema and migrations
  • App Store and Play Store compliance, including tracking transparency and purchases

Core features

  • Background GPS trip detection using speed, distance, and idle heuristics
  • Manual trip entry for drives the phone missed
  • A tracking-health card that flags permission and battery problems before they cost a trip
  • Route previews with a capture-confidence score on every drive
  • One-tap classification, Needs Review sorting, and bulk classify by week, month, or year
  • Date-range and trip-type filters driving CSV and PDF exports
  • Business-use percentage and IRS standard-mileage deduction, marked provisional when trips are unclassified
  • Per-client and per-vehicle breakdowns
  • A diagnostics console with live trip state, filterable event logs, and background-task re-registration
  • One-time in-app purchase to remove ads, with restore for reinstalls

Engineering

Problems that came up, and what fixed them

The specifics matter more than the feature list. This is what the work actually consisted of.

  1. Making the untestable part the best-tested part

    Deciding when a drive starts and stops is the whole product, and it is nearly impossible to test against real hardware. The engine is written as pure functions over location samples, which puts roughly 100 Vitest cases around behaviour that would otherwise only surface in a car — simulated killed-app runtime restarts, GPS-drift rejection so a parked phone does not invent a trip, and red-light tolerance so stop-and-go traffic does not split one drive into five.

  2. Surviving the operating system

    Background execution on modern mobile is a negotiation, not an API call. Engine state is persisted so it survives headless JS runtimes and process death, Android 12+ foreground-service restrictions are handled with deferred profile switching, dead SQLite handles are detected and recovered, and an AppState watchdog repairs the background task without the user ever knowing it broke.

  3. A tracker the user can actually trust

    A tracker that silently stops is worse than no tracker, because the user only finds out at tax time. A live tracking-health score combines permissions, background task registration, battery optimization state, and GPS heartbeat into one signal with one-tap fixes, backed by a diagnostics console with filterable event logs so a problem can be diagnosed from the device rather than guessed at.

  4. A tax engine, not a mileage total

    Raw miles are not what gets filed. The engine computes per-year business-use percentage, applies the IRS standard-mileage rate, and breaks results down per client and per vehicle, then emits an IRS-style CSV mileage log and a branded PDF summary. When trips remain unclassified it marks the deduction provisional instead of presenting a figure the user cannot defend.

  5. Privacy as architecture rather than as a policy

    Location history is the most sensitive data the app touches, so it never leaves the device. Trips and GPS points live in on-device SQLite, and data moves outward only through user-initiated share actions on an export the user asked for.

  6. Store compliance designed for, not retrofitted

    App Tracking Transparency is prompted only for ad-supported users, SKAdNetwork identifiers are declared, background-mode declarations match the shipped behaviour, and a restore-purchases flow handles reinstalls.

Technical architecture

  • Expo SDK 54 and React Native 0.81 on React 19 with TypeScript, React Navigation, and Zustand state
  • A background pipeline over expo-location, task-manager, background-fetch, and notifications, with an Android foreground service and boot-completed re-registration
  • On-device SQLite with migrations for trips, waypoints, and diagnostics, persisted so tracking survives process death and reboot
  • Mapbox route matching for road-aligned geometry, degrading to raw waypoints when no token or too few points are available
  • A Vitest suite spanning the detection engine, storage migrations, tracking services, route matching, tax reports, and exports
  • EAS Build with sanitized per-environment native config, Google Mobile Ads, and expo-iap for the one-time ad-removal purchase

Technology stack

  • React Native
  • Expo
  • TypeScript
  • SQLite
  • Mapbox
  • Zustand
  • Vitest
  • EAS Build

What it adds up to

  • Roughly 100 automated tests covering detection, storage migrations, tracking services, route matching, tax reports, and exports
  • Location history never leaves the device — exports are user-initiated only
  • Produces both an IRS-style CSV mileage log and a filing-ready PDF summary
  • Background tracking self-heals after process death, reboot, and OS throttling

Related services

The work this project demonstrates

Custom Software

One system that matches your real process, instead of four tools and a spreadsheet holding the gaps together.

Mobile Apps

Cross-platform apps in React Native and Expo — including the background, permission, and store-review work that decides whether an app actually ships.

Workflow Automation

Connect the tools you already pay for, and let the handoffs happen without someone remembering to do them.

Keep reading

The GameLynx app shown on a phone, displaying its member discovery map

Cross-platform mobile appMobile Apps

GameLynx

A skill-based matchmaking app that pairs golfers with compatible playing partners nearby, then gets the round on the calendar.

In development — store listings in progress

  • React Native
  • Expo
  • TypeScript
  • React 19
  • +5 more
The FamilyPromise matching app shown across mobile screens

Full-stack civic mobile appMobile Apps

FamilyPromise Mobile Matching App

A role-based mobile app helping tenants, property owners, and case handlers coordinate Section 8 housing voucher matches in one workflow.

University team project, Fall 2024 — built with multiple contributors

  • React Native
  • Expo
  • TypeScript
  • Flask
  • +3 more

All case studies

Building something in this territory?

If any of this resembles the problem you are trying to solve, a discovery call is the fastest way to find out whether we can help.

Prefer email? Contact@DeviceBytes.com