Build your own AnyList

Build your own AnyList around grocery items, clear quantities and a reusable checklist. Handle duplicate names and offline retries before adding meal plans.

  • vibe-coding

Build your own AnyList for the grocery list you want to open in the shop. Add an item, record its quantity and check it off. Keep a completed item available to add again next week.

Start from the AnyList catalog prompt. Leave recipes and meal planning outside this build. The first design decision is what happens when two people add milk.

Build your own AnyList with explicit items

Store an item label separately from its quantity and unit. “Milk” is a name. “2” and “litres” describe the amount. A free-text note can capture the brand or a substitution preference.

List(id, owner_id, title, revision)
Item(id, list_id, label, quantity, unit, note, checked_at, revision)
Membership(list_id, person_id, role)

Two matching labels do not necessarily mean duplicate rows. One person might want dairy milk and another oat milk. Suggest similar existing items without automatically merging quantities or erasing notes.

Keep completion separate from deletion

Checking an item should set checked_at. Show completed items below the active ones and offer an explicit “add again” action. That action clears the completion timestamp while retaining the quantity unless the user edits it.

Avoid a blind toggle endpoint. If the client retries “toggle,” the second request can undo the first. Submit the desired state and an expected revision.

Here is the small rule you can run with Node.js:

const desiredChecked = true
const saved = { checked: false, revision: 4 }
const expectedRevision = 4
if (saved.revision !== expectedRevision) throw new Error('Reload this item')
console.log({ checked: desiredChecked, revision: saved.revision + 1 })

The result stays checked when the same intended state is reconciled after a retry. The database write must still enforce its revision condition atomically.

Show the difference between pending and saved

A shopping list invites optimistic interactions. You tap a checkbox and expect an immediate response. You can update the screen quickly, but retain a pending marker until the server confirms the write.

Situation Reader sees
Save pending Checked item with a pending marker
Save confirmed Ordinary checked item
Connection failed Retry action with the intended state retained
Another edit won Current saved item beside the attempted change

For v1, show an honest offline warning and stop writes. A durable offline queue needs operation ids, stale-edit handling and membership checks when the device reconnects. Add it only if your normal shop has poor reception.

Ask for the list you actually use

Build a private grocery list using Astro, HTMX, Alpine.js and SQL.
Each item has a label, decimal quantity, unit, note and completion state.
Keep completed rows and let me add an item again. Suggest matching labels
without merging automatically. Submit desired completion states with
revision checks. Preserve input on save failure and mark pending writes.
Do not add recipes, nutrition estimates, store maps or automatic purchases.

Check two tabs editing the same quantity. Confirm that a signed-out visitor cannot read the list by guessing its id. Remove a member and verify that their open tab cannot submit another change.

Start with a basic online checklist. Add shared editing, export and restore before calling it a reliable household tool. Full mobile synchronization and a recipe platform are a much larger undertaking.

The Todoist guide covers a dated task list. The recipe manager guide is a separate project when grocery items need ingredient scaling. Keep those data models separate until you have a reason to connect them.