Truck Tracker View on GitHub

Go · React Native · PostgreSQL

Live truck locations, built for one person to read on a phone.

A senior-friendly fleet-tracking app for a father with a 1–5 truck operation running Pictor PS10a and PT06 GPS trackers.

github.com/Rhythm1710/Truck-Tracker

What it does

Pictor trackers send location frames over a cellular link to a single Go binary. The server listens on TCP port 5023, writes positions to PostgreSQL, and exposes REST plus a WebSocket on port 8080 for the app.

The React Native app — iOS and Android from one TypeScript codebase — signs the operator in with a phone number, lists every truck with a live status pill, and opens a detail screen with a Mappls map, ignition, speed, heading, and last update. The interface is English, high contrast, large type, and only three screens: Login, Home, and Truck Detail.

Key features

Taken from the current app and backend in the repository — not a roadmap.

Live fleet list

Home shows truck cards with plate, label, speed, and a relative timestamp. Summary counts and filters sit above the list.

Running Idle Stopped Offline

Truck detail

A Mappls map with a bottom sheet for ignition, speed, heading, and last update. If Mappls keys are missing, the map falls back to a placeholder.

Phone sign-in

Firebase Phone Auth sends a 6-digit OTP. The backend exchanges the Firebase ID token for a 24-hour app token. A still-valid session is restored from the device so Home opens directly.

Live WebSocket updates

One socket to /v1/live patches incoming positions into the app cache. It reconnects with exponential backoff, caps at 30 seconds, and closes while the app is in the background.

GT06-family decoder

The server decodes Pictor PS10A and PT06 frames that share the same envelope. CRC-ITU is checked against the vendor’s golden frames. A fake tracker can replay login, heartbeat, and location frames without hardware.

Built for one operator

Designed for a parent who is not a regular phone-app user: large tap targets, a short screen path, and no dispatcher console or multi-tenant dashboard in this version.

Architecture

From the project README. Three goroutine-based services share one process, one Postgres database, and an in-process position bus on Go channels.

Phone layouts

Approved Login, OTP, Home, and Truck Detail layouts. The banners, plates, times, and map coordinates are example data from the design files — not live telemetry, and these images are not committed in the GitHub repository.

Login screen: Truck Tracker title, Indian mobile number field, and a Get OTP button. Banner reads Example data — draft screens.
Login Phone number, then Get OTP.
OTP screen: six-cell code entry and Verify and Continue. Banner reads Example OTP entry — not a real code.
OTP Six-cell entry, resend, and change number.
Home screen titled My Trucks, with Running, Idle, and Stopped summary counts and three example truck cards. Banner reads Example fleet — sample plates and times.
Home Fleet list, status pills, and filters.
Truck detail with a map, plate, Running status, ignition On, speed, last update, and heading. Banner reads Example truck — sample figures.
Truck Detail Map, ignition, speed, heading, last update.

Stack

Libraries and services actually used in the repository.

Backend

  • Go 1.22
  • chi
  • pgx
  • sqlc
  • gorilla/websocket
  • Firebase Admin
  • PostgreSQL
  • Prometheus
  • Docker

Mobile

  • React Native
  • TypeScript
  • TanStack Query
  • Zustand
  • Firebase Phone Auth
  • Mappls
  • AsyncStorage