work / full-stack / nishan
Nishan
A geo-tagged landmarks Android client that renders proximity scores as stellar magnitudes, visits as state machines, and stays fully usable offline.
- layout
- 0 XML
- pure Compose, no XML layouts
- scoring
- magnitude
- log-scale stellar transform
- offline
- full
- Room cache, WorkManager sync
- map
- OSM
- no API key, no billing

system architecture / interactive
The data shape problem
The CSE 489 Landmarks API returns a score derived from visit count and average distance:
score = 8 × visit_count − avg_distance / 8. Every score on this dataset is negative,
ranging from about −1,580,000 to −24, and average distances span five orders of
magnitude. Plotting the raw figure collapses nine landmarks out of ten onto the same
mark.
Stellar magnitude as the right transform
Nishan renders score as stellar magnitude: a logarithmic, inverted scale borrowed from astronomy, because it is the correct transform for data shaped like this.
magnitude = 2.5 × log₁₀(avg_distance / 100 m)
A visit landing within 100 m is magnitude 0; a 10 km miss is magnitude 5; the polluted rows already in the dataset sit near 12.8. That transform gives the interface its character: the register is drawn as a star chart, and a landmark's brightness is how accurately it has been visited. Both numbers are always printed: magnitude because it is what can be plotted, and the raw score because it is what the server actually returned.
Visits as a state machine
A visit does not resolve immediately. visit_landmark returns a job_id; the distance
only exists once that job finishes. Nishan models this as a state machine rather than a
simple request-response, with WorkManager settling pending visits in the background.
A hollow pin head on the map means nobody has visited a landmark yet; a ringed head
means a visit the server has not resolved.
Map and index
Map. OpenStreetMap through osmdroid, with no API key and no billing account. Landmarks are drawn as location pins in a Compose canvas over the map, projected through the live map projection. Head colour runs a spectral ramp from blue-white (close) through amber to red (distant), and head diameter carries the same value, so the reading survives colour-blindness and greyscale.
Index. A ruled register rather than a card per row: title, image, score, magnitude, mean miss, and visit count. Sort by brightest, faintest, or name; filter by minimum score, with the slider range computed from the actual data.
Fully offline, zero XML
The entire app is written in Kotlin and Jetpack Compose with no XML layouts. Room caches everything the API returns, so the app stays fully usable with no connection at all. Create a landmark with an optional image, withdraw and reinstate what your device charted, and review every visit this device recorded with the measured distance and server job ID.
stack
the evidence