Projects

Drift

A street-level map experience that reacts to the weather, the time of day and how you're moving.

Swift, SwiftUI Canvas, Core Location, CoreMotion, Open-Meteo, OpenStreetMap

TL;DR

How I built it

In Launch Control and Axis, I wrote the code myself and used AI for specific jobs like tests and debugging. With Drift, I wanted to see how far I could get by directing instead of typing.

The lesson: prompting well is mostly product and engineering judgment. You have to be precise about what you want and catch where the output drifts from the vision.

The theme engine

One function turns two inputs into the whole look of the screen:

static func theme(weather: WeatherCondition, timeOfDay: TimeOfDayCondition) -> MapTheme {
    weather.overridesTimeOfDay ? theme(for: weather) : theme(for: timeOfDay)
}
Priority Input Source
1 Weather: rain, snow, storm and fog override time of day Open-Meteo (free, no API key)
2 Time of day: sunrise, midday, sunset, night Calculated on the device with the sunrise equation
— Movement: still, walking, biking CoreMotion. Drives animation only, never color

There are eight hand-tuned gradients, and one rule holds for all of them: it never goes fully dark. Even at night or in a storm, the bottom of the gradient fades to a pale tone.

The street-level world

Real roads and building footprints come from OpenStreetMap through the Overpass API. Each fetch covers twice the visible area, and the app only fetches again once you leave it, to stay within a shared free API’s limits.

What’s next

Onboarding with contextual permission requests, settings, the floating weather and speed pills, place search, a fading movement trail, and later an Apple Watch face over the same live gradient.