iPhone · AR · Open data

Point your phone.
Know what you see.

Spectavi labels the skyline and the sea through your camera. Tap a tower or a ship and it tells you what it is, how far away it is, and why it thinks so, using free open map data and live AIS ship positions.

  • Under 1 mile
  • 1 to 2 miles
  • 2 to 3 miles
Residential tower · 0.8 miOffice tower · 1.9 miHotel · 2.4 miHDG 061° ±3° · GPS ±5 mCalibrateFloor 13

Concept mockup on a real photo of Cebu City. Device screenshots are coming from field testing.

How it works

Three steps, no special hardware.

1

Point

ARKit aligns the camera to gravity and true north. Your GPS position and the direction you face place labels on the buildings and ships around you, and they stay put as you pan.

2

Tap

Tap anything. The server casts a fan of sight lines from your position through PostGIS building footprints and finds what is actually in view, looking over low roofs to the tower behind.

3

Know

Get the top matches with a confidence score, distance and color band. Ships come with live course and speed. If the compass is off, one tap on a known landmark fixes it.

Screens

What it looks like

Mockups of the app's SwiftUI layout over real photos of Cebu, Philippines, the first test city. Device screenshots will replace them after field testing.

Mockup ZOOM 2× · HDG 058°You're looking atResidential tower0.8 mi · ~110 m · 34 floors84%Twin tower B0.8 mi11%Unnamed building1.1 mi · footprint only5%
Tap to identify. Ranked matches with confidence, height and distance.
Mockup Calibrate on a landmarkCentre the tower you picked, then tap Setmeasured 058.4°true 061.2°+2.8°Set
One-tap calibration. Fixes compass drift anywhere, no visual positioning service needed.
Mockup Ferry · 0.4 mi · mooredFerry · 1.2 miRo-ro · 2.2 miAIS · 12 ships in viewPassenger ferryMoored · live AISSOG 0.0 knHDG 095°DIST 0.4 miSEEN 14 s ago
Live ships. AIS positions, dead-reckoned between updates so labels glide.
Mockup Settings Floor13 Show ships Max distance3 mi Serverapi.example:3000 Test connection● 42 ms Map data © OpenStreetMap contributors, Overture Maps Foundation. Ships via Open Waters AIS.
Settings. Floor height sharpens the raycast. Data credits built in.

Engineering

From a tap to an answer

The hard part is not drawing labels. It is deciding which of a hundred thousand footprints you are actually looking at, from a phone whose compass can be 15 degrees off.

iPhone appSwift · SwiftUI · ARKit GPS + ARKit poseLabel projection / frameLabel de-clutteringTap ray → heading, pitchLandmark calibration Spectavi APINode · TypeScript · Fastify POST /identifyGET /nearbyPOST /calibrateAIS stream clientRanking + color bands Postgres + PostGISFootprints · heights · shipsRay ∩ polygon in SQL Open dataOverture · OSM · WikidataOpen Waters live AIS tapmatches SQLimport · stream

Line-of-sight raycasting in PostGIS

Each tap sends position, heading, pitch, heading uncertainty and eye height. The server casts a fan of 9 rays across ±2σ of the heading and asks PostGIS for every footprint each ray crosses and the distance where it enters. The building you are standing in is ignored.

Along each ray the first building tall enough to block the sight line wins, with earth curvature and refraction included, so a 13th-floor balcony looks over low roofs to the tower behind. Rays vote with Gaussian weights, and the top three come back with a confidence.

Calibration that works anywhere

ARKit takes north from the compass once, and phone compasses are often 5 to 15 degrees off, worse near steel and concrete. Apple's Location Anchors would correct this but do not cover many countries.

Instead, you center a landmark you know and tap Set. The server compares the true bearing to the measured one and returns an offset that shifts every label into place. No visual positioning coverage required.

Live ships from AIS

Spectavi grew out of a 2022 patent-pending heads-up display I designed for ship traffic, which read AIS from a radio receiver. Ships now come from Open Waters' free online AIS stream, parsed and stored in PostGIS.

The client dead-reckons each ship along its reported course and speed between refreshes, so labels glide instead of jump. A local receiver can still plug in as another source.

Free, worldwide data

Building footprints, heights and floors come from Overture Maps (OpenStreetMap, Microsoft and Google ML footprints). Unnamed footprints get names by matching Overture place points inside them.

On Mactan Island in the Philippines that took named buildings from 641 to 1,640 out of 147,040 footprints, and to 32% of buildings over 1,000 m². Regions import on demand.

147,040footprints in the first test region
9 raysper tap, Gaussian-weighted
0third-party iOS dependencies
3 CI jobsNode + PostGIS, Swift on Linux, iOS build on macOS

Testable by design

The geodesy, AR-frame math, calibration and label layout live in SpectaviKit, a Swift package with no UIKit or ARKit imports, so swift test runs on Linux in CI. The server's ranking logic is pure TypeScript with unit tests, plus PostGIS integration tests against a real database service container.

# one tap, one answer
curl -s $API/identify \
  -H 'content-type: application/json' \
  -d '{"lat":10.3052,"lon":124.0101,
       "headingDeg":60,"eyeHeightM":30}'

# → { buildings: [ { name, distanceM,
#      confidence, band: "red" } ], ships: [...] }

Tech

The stack

iOS

  • Swift
  • SwiftUI
  • ARKit
  • RealityKit
  • Core Location
  • Swift Package Manager

Backend

  • Node.js 22
  • TypeScript
  • Fastify
  • WebSockets
  • Vitest

Data

  • PostgreSQL
  • PostGIS
  • Overture Maps
  • OpenStreetMap
  • Wikidata
  • AIS
  • DuckDB

Cloud & delivery

  • Azure
  • Azure Static Web Apps
  • GitHub Actions
  • Docker
  • TestFlight
  • Bash

AI-assisted engineering

  • Claude
  • Codex
  • Gemini

Used daily for design reviews, test generation, refactors and research, with every change reviewed and tested.

About

Built from a patent-pending idea

In 2022 I designed an augmented-reality heads-up display for ship traffic: it read AIS broadcasts from a radio receiver and overlaid each vessel on a live view of the water, colored by distance. The patent application is pending and I own the rights.

Spectavi is the next version. It drops the radio hardware, adds buildings, and runs on a phone anyone already has. The name is Latin for "I have seen."

It is also a portfolio project: a real product with a spatial database, a streaming data feed, native AR, and the testing, CI and cloud deployment to back it up, built end to end by one developer.

Hire me

I'm looking for my next role.

I'm Baseem, a senior software engineer with 10 years of experience in JavaScript, Node.js, React, Postgres and Bash, with hands-on Azure experience. I build products end to end, from the database schema to the cloud deployment, and I'm quick on new platforms, like Swift and ARKit for this app. I build every day with AI tools including Claude, Codex and Gemini.

  • Location100% remote, worldwide
  • Looking forAny role, cloud engineering most of all
  • CloudAzure, GitHub Actions, Docker, CI/CD
  • StrengthsNode APIs, React, Postgres/PostGIS, AI-assisted development