My roommate partied all night in Rio. I ended up building local-first JS on the stairs.
DEV Community

My roommate partied all night in Rio. I ended up building local-first JS on the stairs.

2012, Rio de Janeiro, Carnival week. I was playing digital nomad before that was a phrase anyone used - staying in a rented room, splitting it with a roommate who was still asleep at noon because the whole night had been spent out celebrating.

Couldn't work inside without waking him up, so I took the laptop out to the staircase of the building instead. Client was in Bogotรก: an equipment rental company whose reps needed to build quotes on the spot at venues with no WiFi.

The Architecture

So the catalog, the pricing logic, the whole quote state lived in the browser - no server round-trip per calculation, just local storage doing the persistence. Local-first before "local-first" was a name anyone used for it.

App itself was hosted on Heroku for whenever a connection did show up. Samba through the wall the whole time. Carnival two blocks away.

Testing and Delivery

I tested it with my own WiFi off to make sure it actually held up with zero connection, then sent the client setup instructions for their reps and called it done.

Reflection

Looking back, I'm not sure how much of that was a real engineering challenge and how much was just the tools of the time being clunky for something that's almost trivial now - local-first patterns are basically a checkbox in a lot of frameworks today, and I genuinely don't know if an agent would've had this solved in twenty minutes flat.

Maybe the staircase was the hard part, not the code.

Anyone else have a "the deadline did not care what was happening outside" story?

Comments

No comments yet. Start the discussion.