Case study · Shipping company

Offline-first fleet inspection and reporting

I built an offline-first inspection and reporting platform used on board 140 vessels. Crews and superintendents complete SIRE 2.0 and RISQ readiness work, surveys and checklists with no connection at all. The cloud then absorbs weeks of backlog from many ships at once when they reconnect.

  • 140vessels working fully offline
  • 60,000changes a minute ingested at reconnect peaks
  • 180msaverage API response, from 3 seconds to 180ms
  • < 10 minfor a shore report, down from about 2 days

Background

  • SIRE 2.0 is OCIMF's tanker inspection programme, live since September 2024. Each inspection uses a Compiled Vessel Inspection Questionnaire built from the operator's HVPQ and PIQ, with every question answered for hardware, process and human factors (OCIMF, MarineLink).
  • Official SIRE 2.0 inspections can only be done by accredited inspectors on an OCIMF-approved tablet (OCIMF). The platform therefore handled the operator's side: preparation, internal pre-inspections and closing out observations.
  • RISQ is RightShip's inspection questionnaire for bulk carriers, general cargo, container and ro-ro ships; version 3.2 was published in November 2025 (RightShip).

Challenge

  • Ships are offline for days or weeks at a time, and satellite links are slow, costly and drop mid-transfer.
  • When ships reach port, coastal 4G or a good satellite window, each one pushes weeks of checklists, photos and reports at once, and many ships often reconnect together.
  • SIRE 2.0 and RISQ are structured differently, and both get revised, so checklist templates had to be versioned.
  • The same record could be edited on board and ashore between syncs.

What I built

  • Microservices: I moved the Django monolith to microservices on AWS EKS.
  • Offline-first web app: the whole app is cached on the device and all data lives in the browser's local database, so it works for as long as the ship is offline.
  • Checklist engine: SIRE 2.0, RISQ, surveys and internal audits defined as versioned templates (sections, questions, response types, required evidence), sent to each ship as packs before departure.
  • SIRE 2.0 readiness: internal pre-inspections against the SIRE 2.0 Question Library, PIQ and HVPQ preparation with consistency checks, and observation tracking with root cause, corrective and preventive actions.
  • RISQ readiness: self-assessments by RISQ section, a findings list and close-out evidence.
  • Survey checklists: class, flag and internal survey checklists with photo evidence, signatures and due-date tracking.
  • Port data: reference packs of ports, terminals, berths, restrictions, agents and required documents, synced to the ship before arrival.
  • Shore reports: detailed reports generated ashore from synced data, including inspection summaries, findings trends, vessel and fleet comparisons and open actions, as PDF and web pages.
  • Burst-tolerant sync backend: built to take a whole fleet's backlog at once without dropping or duplicating anything.
  • LLM features: crew insights and shore report drafting from synced inspection data.

Stack

React, TypeScript, Progressive Web App with a Workbox service worker, IndexedDB via Dexie, Web Workers; Python and Django (sync API and shore app, with HTMX), Celery report workers, WeasyPrint for PDF; AWS: ALB, EKS, SQS, Lambda, Step Functions, EventBridge, S3 multipart uploads, Aurora PostgreSQL (JSONB), ElastiCache Redis, OpenSearch, CloudFront, Cognito; Terraform, CloudWatch.

System design

Ships write everything to local storage first. The cloud puts each burst into a queue within milliseconds and does the heavy work afterwards, so a ship's short connection window is spent only on sending data.

Ships write everything to local storage first; the cloud does the heavy work afterwardsAfter each commitProcess laterAccept fastOn the shippushpullreturns receipts inmillisecondsEventBridgePhotos resized andcompressedWeb WorkersProgressive Web AppReact, Workbox serviceworkerOutboxIndexedDB via DexiePhotos to S3presigned multipartuploadsSync APIALB + EKS, statelessRate budget in Redis429 with a Retry-AfterheaderSQSWorkersupsert keyed on record IDAurora PostgreSQLJSONBThumbnailsLambdaSearch indexingOpenSearchReport jobsStep Functions

On the ship

  1. Every record (inspection, answer, observation, photo, report) gets an ID generated on the device and a version number, so it can exist without the server.
  2. Each change is saved to IndexedDB together with an entry in an outbox (a log of unsent changes), in a single transaction, so a change can never be saved without its outbox entry.
  3. Photos are resized and compressed on the device in a background worker before they are queued.

When the ship gets a connection

  1. The sync client checks link quality, then waits a random delay of up to two minutes, so ships reconnecting together do not all hit the cloud in the same second.
  2. Push: the outbox goes up in compressed batches of about 500 changes. Each change carries an idempotency key (record ID plus version). The server returns a receipt per change, and the client deletes only acknowledged entries, so an interrupted batch resumes where it stopped.
  3. Photos go straight to S3 through presigned multipart uploads, bypassing the API, and resume part by part after a drop.
  4. Pull: the client sends its last sync cursor and receives only what changed ashore since then (template updates, port packs, shore comments, finished reports), smallest and most urgent first.

In the cloud

  1. The sync API is stateless on EKS. It authenticates the vessel's device, validates the batch, writes it to SQS and returns receipts in milliseconds. No heavy work happens inside the request.
  2. Admission control: each vessel has a rate budget in Redis. When the system is saturated the API answers 429 with a Retry-After header and clients back off with jitter. Safety findings are sent before photos.
  3. Workers, autoscaled on SQS queue depth, apply changes to Aurora PostgreSQL. Each write is an upsert keyed on record ID that skips versions already applied, so retries and duplicates do no harm.
  4. Conflict rules: checklist answers merge per question; observations, comments and evidence are append-only. When both sides changed the same answer, the conflict goes to a review queue instead of one side silently winning.
  5. After each commit, events go to EventBridge for thumbnails (Lambda), search indexing (OpenSearch) and report jobs (Step Functions).
  6. Report workers build shore reports from committed data, render them to PDF, store them in S3 and queue them for the ship's next pull.

Key design choices

  • Accept fast, process later: connection time is the scarce resource, so the API acknowledges as soon as data is safely in the queue.
  • Idempotent everything: satellite links drop mid-batch, so duplicates are expected, not exceptional.
  • Pinned template versions: each inspection keeps the template version it started on, so a checklist begun at sea stays valid when a new RISQ or SIRE revision is published ashore.

Results

  • Fleet: 140 tankers and bulk carriers working fully offline on voyages of up to 6 weeks
  • Burst handling: up to 60,000 changes a minute ingested when many ships reconnected together, with no lost or duplicated records
  • Backlog: a typical 3-week backlog (about 8,000 changes and 2 GB of photos) synced in under 15 minutes on a port connection
  • Bandwidth: data sent over satellite cut by about 75% through compression and delta sync
  • Shore reports: from about 2 days of manual work to under 10 minutes
  • Inspection outcomes: SIRE 2.0 negative observations per inspection down about 30% after a year of internal pre-inspections
  • API speed: average response time from 3 seconds to 180ms after I moved the Django monolith to microservices on AWS EKS
Back to Work & Research