I didn't build multiple lists. I built several households on one phone
· · Not by Prompt Alone · episode 10 · Czytaj po polsku
From day one Zakupomat has had one rule I guard like the apple of my eye - one household, one list. No "Lidl list", "BBQ list", "Mom's list". One shared list for the whole home, always up to date. On the website, in the "what it doesn't have" section, it says it in black and white: multiple lists.
And yet every now and then the question comes back: what if I shop for the office and for home? What if I shop for my parents? Or I'm in two households at once - in one I add things, in the other I do the buying?
The hint came from an unexpected place. After many months Anthropic finally added signing in to several accounts at once in the Claude app. At last I have my private Claude and my work one together on my phone - because some clients require working in their own environments, under their control. I switch between them without logging out, and I thought: that's exactly what Zakupomat is missing!
So one Saturday evening, while putting together version 1.10, I wrote to Claude: "Actually, in this version I'm dreaming of doing one completely new thing - switching households 🙂".
Multiple lists or multiple households?
"Multiple lists" has been sitting in the project's brain for months, in the "Unresolved" section. There are two competing models and neither convinced me. That's why I didn't want to touch it in passing.
But if you look closely, the office and the home aren't two lists of one household. They're two different groups of people. At the office someone from the team adds things, at home - Marta. They have different products, a different shop order, different keys. They're simply two households. The only thing missing was one phone being able to belong to both.
So we wrote the decision down: separate lists for separate groups of people means separate households on one phone. "Multiple lists in one household" stays open, untouched. So does the "one household, one list" rule.
Don't take "Log out" away from people
Claude prepared a design. A "Households" menu, a list with the open one marked, "Join another", "Create a new one", "Disconnect from this phone". All sensible. Just one thing grated on me - "Log out" disappears from the menu, because disconnecting now lives under "Households".
No. Most households will never have a second one. For them it would be one more step and a change nobody asked for. And I have a rule - a new feature changes nothing for people who don't use it.
So: "Log out" stays as long as there's only one household. It goes away only when a second one appears. Same with tapping the household name in the top bar - it switches only when there's something to switch between. If you have one household, you see no difference at all.
On top of that, two of Claude's ideas I accepted straight away. An invite link to another household no longer replaces the current one - it asks "Add this household?" and adds it. And "Delete account" is now called "Delete household". Because Zakupomat never had accounts 😉
Disconnect without losing it
There was one scenario I feared most. Someone disconnects a household from their phone, they were its only member and never wrote the key down anywhere. The household, with its whole product base, stays somewhere on the server, impossible to recover.
That's why disconnecting always shows the key. And if the server knows that nobody else from that household has used it in the last 30 days, the dialog warns you and suggests "Delete household".
How does the server know? From the new usage stats in the same version - a random installation ID, with no list content at all. And here's an important detail - this heuristic always errs on the safe side. Older app versions, the browser and AI assistants don't send the ID, so they count as "someone else". Better to skip a warning once than to warn "nobody but you" when your wife adds milk from her laptop every day. And when the server doesn't know (stats turned off) - the dialog doesn't claim anything.
The hardest part: nothing must leak
The UI was a small piece. The real work was underneath, and it came down to one question - who owns what the phone keeps in memory?
I've been burned by this before. In July a new household, right after signing in, briefly saw the PREVIOUS one's list. Back then we wrote down a lesson - every piece of state that lives longer than a session must have an explicit answer to "what happens to you when the household changes". The default answer "nothing" is a data leak.
With switching households, that lesson came back with a whole gang of friends:
- Every household has its own drawers on the phone. The queue of changes made offline, the last saved list (so there's no empty screen without signal), the getting-started card - all stored under a key tagged with which household it belongs to. But settings, theme, language or the game high score belong to the phone, so to the person. Splitting "what belongs to the household and what to the person" took more thinking than the whole screen.
- Phones from the previous version. They have the same data, just without the tag. On the first launch of 1.10 we move it once under the household that's on the phone. Without that, the first added household would inherit the previous one's queue of changes 😮
- A 401 must hit the household it's about. The server answers "I don't know this key" (e.g. someone deleted the household on another phone), and in the meantime we've already switched to another one. We'd remove the wrong household from the phone. Now the error carries the key it was about.
- Late responses. A list refresh started for household A, the response came back when B is already on screen. Without a guard, the home list would show up at the office. Now every refresh remembers who it started for, and if the household changed - the result goes in the bin.
- The live connection. The app listens for changes from the server so everyone sees the same thing in the same second. After switching it has to re-attach to the new household. During implementation it turned out that renaming the old household overwrote the new one's name 😂
- Changes made offline. You ticked off three products in the shop's basement and switch to the office. Before switching, the queue gets a few seconds to send. Whatever doesn't make it waits calmly with its own household, instead of flying off to whichever one is open.
There were a few smaller ones too, like the "invite sent" flag which, while creating a new household, got set... on the old one.
"I'm afraid we broke something"
In the middle of the work I wrote to Claude: "Before this release I'll still want to do big regression tests, because I'm afraid we missed something and broke something".
I was right. Claude went through the app on the Android emulator (in a build made like for the store) and on the iOS simulator, with a local server. And it found a crash on startup if something was waiting in the offline queue. Exactly the situation that queue was built for - "I bought it with no signal, I closed the app". All tests were green, because in tests the code starts just slightly differently than on a phone. On top of that: categories disappearing offline, two "back" buttons in one place and a dialog where one sentence contradicted the other.
None of these had anything to do with switching itself. All of them would have gone to the store.
The browser version of Zakupomat stays with one household for now. But a link to another household no longer switches there silently - it asks first and shows the current one's key.
What this means for your team: a "switch account" feature looks like one screen, but it's really a question about who owns every piece of data in the app. Before you start, list everything the app keeps longer than one session, and for each item write down whose it is. Then test it on a real phone, not just in tests. That's how we work at ANSLAN - decisions with reasons, and regression before every release.
Zakupomat is a free app for a family's shared shopping, with no ads: zakupomat.app. Several households on one phone are available since version 1.10.0 - Menu → "Households" 🙂