Skip to content
A map of the United States drawn in Sleep Map’s cells. Gold ground spreads out from San Francisco, one place for each good night.
← All design work

Design case study · Sleep Map

A habit withsomethingto keep.

A sleep app where a kept night claims a real place on a real map, and a bad night never takes anything back.

Scroll

1person: product, interaction, visual design and code

real places
24,062
regions
487
App Store builds
30
languages
9

Keep the night, and in the morning a real place on a real map warms to gold and becomes yours.

Miss it, and nothing you hold is taken back.

01The problem

A score starts over. A map keeps.

The sleep apps I tried graded the night and handed back a number. A bad night only ever subtracted, and nothing carried over to the next.

The bet: give a good night something to keep.

A nightly sleep score illustration

29-56 overnight

255075100

Starts over every morning. One bad night is the whole headline.

Sleep Map Taiwan, from Taipei

13+0, nothing lost

Only ever grows. A bad night means the next place waits.

The same fourteen nights, drawn twice. Tap a night to miss it.

02A night, start to finish

One night, start to finish.

Tonight’s goal: asleep by 11:00 PM, up by 7:00 AM, with a gold Good night button.
The night has started: lights out just now, earning Carson City tonight.
A story card for Petaluma, with a photograph of its historic downtown and the architect Brainerd Jones.
Night saved: Freeport. Seven hours forty minutes of sleep, drawn as a gold bar inside the planned window.
Night saved: Cheshunt, a new place on your map, glowing gold, with a 2-night streak.
  1. 01 · Tonight

    Set the hours you mean to keep.

    A bedtime and a wake time. That window is the whole goal.

  2. 02 · Good night

    One tap starts the night.

    The first tap, not the last. More on that below.

  3. 03 · The story

    Something true about tonight’s place.

    A short bedtime story drawn from sources on Wikipedia.

  4. 04 · Phone down

    Then nothing at all.

    The night is already counting.

  5. 05 · Woke up

    Wake inside your window.

    The morning draws the night on a clock.

  6. 06 · Claimed

    A real place becomes yours.

    It warms to gold beside your ground, for good.

02The claim

The morning a place becomes yours.

  1. Night saved.The place you reached for, outlined and waiting.
  2. It warms to gold.The morning throws a small party.
  3. Then it takes its place.Right beside the ground you already hold.

18places held

03The one rule

A bad night never takes anything back.

It outranks every feature. I split rhythm from ownership: a streak describes continuity, so it can honestly drop to zero. Ground records what you earned, so nothing takes it away. Try it.

Last night was missed. Neili is still waiting, and all 23 places stay gold.

“Try again tonight. Nothing you’ve claimed is lost.”
What a missed morning says

04One tap to sleep

The night started on the third tap.

The first bedtime took three taps, and the night only started recording at the last. Who reads a bedtime story at bedtime? Someone falling asleep.

Since 1.1.1 the first tap starts the night, and the story carries a counting banner with an undo.

11:25 PMMorning comes later. Which night was it?
YoureadingasleepzzzBefore 1.1.1three taps, countedfrom the last1Good night2Confirm the goal3Confirm the story: never tappedNo night recordedSince 1.1.1one tap, countedfrom the first1Good night: the night startsCounting · UndoThe night counts11:00 PM11:10 PM11:20 PMYouBefore 1.1.1counted from tap 3Since 1.1.1counted from tap 1zzz1Good night2Confirm goal3Tap 3:never came1Good nightCountingNo nightIt counts

05The morning

A miss that says what happened.

My first miss screen was the success screen with a small ember line, and players couldn’t tell the night had failed. Now a miss mirrors a claim: the place, and the reason in plain words.

In 1.12 the card draws the night on a clock. Drive it.

Night saved

Neili

Estimated sleep

7h 40m

Minus 15 min to fall asleep and 5 min to wake up

Bedtime11:00 PMPlanned 11:00 PM
Woke up7:00 AMPlanned 7:00 AM

Tonight’s goal: asleep by 11:00 PM, up by 7:00 AM

Grace, min
  1. Asleep by11:00 PM + 30 min = 11:30 PM
  2. Window opens7:00 AM − 2h − 30 min = 4:30 AM
  3. Window closes7:00 AM + 30 min = 7:30 AM
The rules and the drawing are the app’s. Grace is the player’s own slack on every edge, up to an hour and a half.

06Words that don’t wear out

The same night, the same words.

One fixed line, read every morning, wears through in about a week. So recurring lines come from pools of 16 to 25 short variants, picked by a stable hash of the night.

Each line is tested: 14 words at most, never “fail”, “should” or “lost”. Day sleepers read “sleep” for every “night”.

New time zone

The first night after a long trip never counts against you.

FNV-1a(“jetlag-3F2A9C1E…”)= 2273f2c8ab…mod 18 = 411 words ≤ 14

07The map won

I built a globe first. The map won.

The globe was lovely, and it couldn’t do Tonight’s one job: show tonight’s place. Its texture is now excluded from release builds, and a check on the shipped bundle keeps it out.

The whole world in Sleep Map’s cells on a flat Mercator map, closing in on Taiwan.

First build · a SceneKit globeThe earth at night. It couldn’t zoom in far enough.

Tonight’s canvas · a flat Mercator mapThe globe became a debug screen.

The one jobClose enough to see tonight’s place.

1.12 · A crisper map

Real coastlines, same world.

Only the drawing is clipped to land. The cells, their IDs and everyone’s ground are untouched, and tapping the sea beside an island still selects it.

Tonight in 1.12: back to finish Tamsui District, with gold ground around Taipei on a map with real coastlines.
1.12 · clipped to land1.11 · whole cells
22 places held around Zhongzheng, identical on both sides. Drag the handle.

08Something true at bedtime

Before sleep, something true.

Nearly every place carries a short bedtime story, drawn from sources on Wikipedia and, for a few regions, gazetteers and government pages. Wrong-place stories were found by looking: 161 evicted, Milan’s and Genoa’s football clubs among them.

24,062

places in 487 regions, on every inhabited continent

The whole world drawn in Sleep Map’s cells, in dusk brown on night blue, with coloured ground spreading from hometowns.

An illustration: hometowns around the world, each grown in its own colour.

  • Keelung
  • Tulare
  • Trollhättan
  • Gravesend
  • Ushuaia
  • Tromsø
  • Kyoto
  • Timbuktu
  • Zanzibar
  • Samarkand
  • Cusco
  • Reykjavík
  • Hobart
  • Essaouira
  • Varanasi
  • Halifax
  • Lalibela
  • Petaluma
  • Hanga Roa
  • Luang Prabang
  • Bergen
  • Oaxaca
  • Galway
  • Hakodate
  • Kashgar
  • Byblos
  • Tbilisi
  • Mombasa
  • Salta
  • Galle
  • Rotorua
  • Savannah
  • Iqaluit
  • Chefchaouen
  • Gyeongju
  • Hilo
  • The story card for Trollhättan, Sweden, with a photograph of the city by the river.
  • The story card for Petaluma, with its historic downtown and the architect Brainerd Jones.
  • The story card for Gravesend, on the Thames, with a photograph of a ferry.
  • World in 1.12: nearby places around London, each with a photograph.
  • The story card for Don Torcuato, Argentina, with a lamplit street.
  • The Nights journal: San Benedetto del Tronto and Foligno, each with a photograph.
“Most of surfing is not surfing. It is sitting out past the break, watching the water, letting the wrong waves go by.”
From the bedtime story for Santa Cruz, California
places with a bedtime story
19,457
with a photograph, picked by hand from contact sheets
10,849
person nights, with a portrait
2,284

09Sleeping together, apart

A Circle shares ground, never a miss.

Circles are optional groups kept on each member’s iCloud. A miss publishes nothing: it is silence. Even the streak flame shows only where there is one, because an empty flame would announce the night you missed.

Met: your ground touches theirs

A Circle called The Night Shift, 45 places held together. Ana, Tim, Ben and Maya each on three lines: name and a met or you tag, what they last claimed, then places, streak and when.

10Made for travel

The time change takes the blame.

Before 1.12, a one-hour trip west could reset a streak on a good night. Now every night keeps the zone it began in, and a big jump buys one night of grace.

San Francisco–UTC−8Taipei–UTC+8+16 hours

The first night after the jump is judged, but it can never be a miss.

New time zone: Gharonda Neemka Bangar. The time change takes the blame. Your streak stands. The first night after a time change of three hours or more can’t be a miss.
A bad first night after a long trip: named, and not a miss.

11Nine languages

Good night, nine ways.

  • Good night
  • 晚安
  • Buenas noches
  • Boa noite
  • Bonne nuit
  • Gute Nacht
  • おやすみなさい
  • Спокойной ночи
  • Buonanotte

About 990 interface strings in eight translations, and a test fails if any key is missing anywhere. Place stories read in five languages, and Taiwan’s in Traditional Chinese.

12What I’d measure next

Honest about what I know.

Sleep Map has no analytics or advertising SDKs, so there is no retention curve here and no claim about anyone’s sleep. With consented measurement, I’d ask these first.

  1. 01

    Do people grasp ground versus streak before their first miss?

  2. 02

    Does a half-built place bring them back, or read as a reproach?

  3. 03

    How often is a night a grace night, and does a traveller’s streak survive the trip?

  4. 04

    Does a Circle bring people back, or only make the good nights more visible?

Sleep well tonight.

In the morning a little more of the world is yours, and none of it goes anywhere.