Memories on the web¶
The Loved One web app (apps/web) keeps a senior's memories and the
family's uploads on two pages (since October 21, 2026, as two tabs until
November 12, 2026; Photos and videos is a row on Home now, and Memories is
under More, Journeys on the web, "The pages"):
- Memories: every memory, whatever its picture (a photo, a video, an illustration, or none yet), one grid of cards, each the same picture, title, and Edit. Edit opens a dialog with everything about the memory, the card the Memory screens tab used to show, where a Loved One with manage access puts their own photo or video on it, changes its words, and searches for the song that plays behind it. Add a memory is here too, and, closed under a button each until asked for (since November 12, 2026), Taken out, with its count, and Who sees which words.
- Photos and videos: every photo and video the family uploaded, each a memory of its own on the phone, in one grid. Add a photo or video saves the chosen file as whichever it is.
Both grids are CardGrid (apps/web/src/media-section.tsx), with the
same filters above it, closed under one Filter button beside a line
that says what is showing ("Showing 3 of 42: 1980s, Not on phone"; always
open until November 12, 2026). Each is a radio group of pills: Decade, Tom's
phone (All, On phone, Not on phone), and, on Photos and videos, Type
(All, Photos, Videos). MemoryScreensSection
(apps/web/src/memory-screens-section.tsx) is the Memories page: it loads the
memories, draws each card's picture, and holds the dialog. MediaSection
is Photos and videos.
Before, the memories moved twice. Until October 13, 2026 they were a tab of their own, Memory screens, with a bigger card; then they went onto Photos or Videos, by the picture the phone shows, among the uploads (Every memory in the bank). Thomas asked on October 21, 2026 for Photos and Videos to be one tab and Memories its own.
This covers Tom's, Nyna's, and Lisa's memories (seniors 1, 2, and 4). Lisa's have no pictures yet, so each card says "No picture yet." Thomas (3) has no memories that come with the app, so his Memories page starts empty.
What a Loved One can do¶
- Look at each memory as the phone shows it: its title, the memory detail shown with the buttons, its song, and its picture (photo, memory illustration, or video), with that picture's description, which a screen reader reads aloud on the phone. The status line says in words which one it is.
- Replace a photo or illustration with their own. The new photo needs a description, like every photo in the product (the Born Accessible rule). A real photo shown in place of a memory illustration is no longer labeled "Illustration".
- Add a photo to a memory that has none. The app leaves a memory with nothing to look at out of the senior's sessions, so this brings it in. Its card in the grid says "No picture yet."
- Go back to the app's own picture ("Use the app's picture"), or remove the photo from a memory that had none.
- Remove the app's own photo or illustration ("Remove photo" or "Remove illustration"). The memory then has nothing to look at, so it leaves the senior's sessions, and its card says "Picture removed." Adding a photo shows it again, and "Use the app's picture" brings the app's picture back.
- Change the song. "Change song" opens the music search: type a title, an artist, or both, listen to the 30-second previews, and press "Use this song". "Use the app's song" goes back. See Choosing a song.
- Keep a memory off the phone while it is being worked on, with the switch on its card. See Not on the phone yet.
- Find a memory. Filter, above the grid, opens a row of decades: "All decades", then each decade that has a memory in it ("1960s (11)"). Uploads and the other memories share one order, the order they happened, oldest first: an upload by the date the family gave it ("1975" or "07/04/1975" under When and where), a memory by its year. Within a year the uploads come first. Anything with no year yet comes last, in the order it was added, and is only under "All decades". A memory's dialog says its year ("From 1968").
A memory's picture can be a photo or a video, on the app's own memories as on any other: Replace picture takes either (a video plays once without sound, up to one minute and 80 MB, and gets a still drawn from its middle), and Remove video takes the skydive's video away as Remove photo does a photo.
The phone picks up a change the next time Memories opens, comes back from
the background, or returns to its start screen after a session (Back to
start), so a senior who never closes the app still gets it
(useStoryPool and refreshStoryPool in
src/features/stories/use-story-pool.ts). A memory that is
new, or whose photo changed, comes first in the senior's next session; after
those come memories not seen lately (src/features/memories/history.ts). The
phone keeps that history per senior and never sends it anywhere.
Not on the phone yet¶
Every card in the grid has a switch beside Edit, with On or Off next to it (since October 21, 2026; before, it was the first thing in the Edit dialog). A screen reader hears it as "Show The lake house on Tom's phone", with the card's title and the senior's name. It is on for everything already in the bank. Switched off, the memory stays on the web, where the family can keep working on its words, picture, and song, but the senior's phone is never sent it, so it leaves their sessions. Switching it back on sends it the next time Memories opens. It saves at once, saying Saving… meanwhile, and the page's status line says what changed. The Not on phone filter, under Filter above the grid, finds the drafts. Under that filter, or On phone, a card switched the other way leaves the grid, and keyboard focus moves to the next card's switch (the one before when it was the last). A memory whose words are not in the bank yet has no switch.
Add a photo or video has the same switch, on unless the family turns it off, so a new photo or video can wait on the web from the start. A memory written with Add a memory has no picture yet, so it is not shown anyway; switch it off on its card before giving it one. A view-only Loved One sees no switch; a card that is off says "Not on Tom's phone yet", in words and a dashed outline.
The Worker does the hiding, not the phone, so it works on every build
already installed. A phone signs in as the senior's own account (which
has no password), so isSeniorsPhone in apps/api/src/auth.ts tells the
phone from a Loved One:
| For the phone | A memory switched off (on_phone = 0, migration 0017) |
|---|---|
GET /banks/:bankId/memories |
Left out of memories and named under removed, as a taken-out memory is, so an app memory's bundled copy stays away too. |
GET /banks/:bankId/memory-photos |
Its picture is not listed; otherwise the phone would play it on its own. |
GET /banks/:bankId/photos, videos |
A photo or video switched off (media_assets.on_phone = 0) is not listed. |
A Loved One's lists carry onPhone: false on each one switched off;
PATCH with { "onPhone": true | false } on a memory, photo, or video
switches it, and an upload sends onPhone=0 to start off. Backups write
onPhone: no on such an item, and a restore keeps it off.
Who sees which words¶
A memory carries several pieces of text, and only the memory detail and the song's name are on the senior's screen. The page says so under Who sees which words, closed at its foot until pressed, on each card, and in the explanation behind the (i) beside each field of the form.
| Text | Who gets it on the phone | Where it comes from |
|---|---|---|
| The picture | The senior: it fills the screen, shown whole. | The app, or a Loved One's photo. |
| The title | A screen reader reads it aloud. The screen does not show it. | The app (prompt in the senior's questions file). |
| The memory detail | The senior reads it after tapping the picture, in the panel with Restart and Next. | The app (memoryContext). A list gives several, and each session shows one at random. Without one, the panel quotes the senior's own words. |
| The song | The senior hears it behind the memory, and reads its name under the memory detail. | The app (song), or the Loved One's choice from the music search. |
| The description | A screen reader reads it aloud, as "Photo: ...", for someone who cannot see the picture. The screen does not show it. | The app, or the Loved One's form. Required. |
| The year | Nobody on the phone. The web page lists memories by it and filters them by decade. | The app (year), approximate when only the decade is known, with a comment saying what it rests on. An uploaded photo or video has the date the family gave it. |
Once a senior's memories are in the bank (Stage 2, below), Edit words on each card changes its title, memory details, the senior's own words, and its year; Add a memory writes a new one, which joins the senior's sessions once it has a photo or video; Take out leaves an app memory out of the senior's sessions (it is listed under Taken out, with Put back), and Delete memory removes one written on the web with its picture and song. Until then the page shows the app's own list, and its words cannot be changed.
The same holds on the Photos and videos page, where each photo becomes a memory of its own: its title and description are read aloud by a screen reader and the screen shows only the picture. "Where it came from" stays on the web page.
Tags stay on the web page too. A photo or video can carry up to 20 short
categories, typed as one line separated by commas ("Kids, Childhood, Work,
College"), for the family to sort and find memories by. The senior's phone
never shows them. They are stored as that comma-separated text in
media_assets.tags (migration 0013); parseTags in
packages/shared/src/tags.ts tidies the spaces, drops empty tags and repeats,
and caps each tag at 40 characters. The add form asks for them, and each card
has Add tags or Edit tags; PATCH with { "tags": "" } clears them.
Choosing a song¶
The music search asks Apple's iTunes Search API, the source of every song the app plays. Each result is a 30-second preview, which is what the phone plays behind the memory, looping, with the line "Title, Artist" (the title, a comma, then the artist) under the memory detail.
- The search runs from the Loved One's browser, not through the Worker. Apple limits searches per address, and a Worker shares its addresses with every other Worker. The words typed go to Apple; nothing about the senior or the session does.
- Nothing is downloaded from Apple until someone presses play on a preview.
- Only the song's words and its two Apple links are stored. The Worker
refuses a preview that is not on
itunes.apple.comor artwork that is not onmzstatic.com, and the phone checks again before playing, so a memory can never play a file from anywhere else. - A chosen song wins over the song the memory ships with. A phone that cannot reach the Worker plays the last songs it fetched.
How it works¶
| Piece | Role |
|---|---|
packages/shared/src/memory-screens.generated.json |
Frozen: the memories the app shipped until October 2026, which pnpm memories:migrate copied into each bank. The web reads it only for an app picture's kind and a taken-out memory's title. |
apps/mobile/tests/memory-screens-export.test.ts |
Rebuilds the export and fails when the committed file is out of date. |
memory_photos table (migration 0004) |
Which memory shows which photo or video (since migration 0015), one per memory per bank. The file is an ordinary media_assets row in R2, kept out of the bank's Photos and Videos lists. |
/banks/:bankId/memory-photos |
GET lists them (view access). PUT /:memoryId uploads a photo and replaces any earlier one, deleting it. DELETE /:memoryId goes back to the app's picture (both manage access). |
withMemoryPhotos (mobile) |
Puts each fetched photo on the bundled memory with the same id. The photos are cached with the rest of the bank content, so they keep showing offline. |
memory_removed_pictures table (migration 0007) |
Which memories had the app's own picture removed, one row per memory per bank. Nothing is deleted from the app; the phone stops showing the picture. A new photo clears the row. |
/:memoryId/app-picture under memory-photos |
DELETE removes the app's picture (and any photo put there); PUT brings it back (both manage access). GET /memory-photos lists the removed ones as removedPictures. |
withoutRemovedPictures (mobile) |
Takes the bundled picture off each removed memory, so the Memories screen leaves it out. The list is cached on its own, so a removed picture stays away offline. |
memory_songs table (migration 0006) |
Which memory plays which song, one per memory per bank: title, artist, album, and the Apple preview and artwork links. |
/banks/:bankId/memory-songs |
GET lists them (view access). PUT /:memoryId takes a song as JSON and replaces any earlier choice. DELETE /:memoryId goes back to the app's song (both manage access). |
apps/web/src/song-search.ts |
The music search, from the browser to itunes.apple.com/search. |
apps/web/src/decades.ts |
The decade filter's arithmetic: a year's decade, the decades a list spans, and the order memories come in (by year, undated last). |
withMemorySongs (mobile) |
Puts each fetched song on the bundled memory with the same id (remoteSong), cached on its own so it keeps playing offline. |
Since October 13, 2026, the bank also holds a copy of every picture and video
the app ships (Every memory in the bank,
Stage 1). pnpm memories:migrate Tom (and Nyna) uploads each bundled file
under its memory's id through PUT /memory-photos/:memoryId, with the app's
catalog id as appMediaId, its credit, and the Illustration label
(illustration, migration 0015), and keeps the app's song in
memory_songs where the family chose none. It skips a memory whose picture
the family replaced or removed, and copies only what is missing on a rerun;
--dry-run prints the plan. The web app shows the bank's copy, labelled as
the app's picture. The phone keeps showing its own bundled file for an
unchanged copy (its appMediaId names the memory's mediaId or videoId),
which needs no connection; a picture the family chose replaces it, photo
for video or video for photo. The web app still bundles the app's pictures
through Vite (apps/mobile/assets/1/ and assets/2/) for a memory the
bank holds no copy of.
Changing a memory¶
The app ships no memories since Stage 3 of
Every memory in the bank: a memory
is written and changed on this page (or restored from a backup), and the
phone picks it up at its next fetch. memory-screens.generated.json is
frozen as the record of what the app shipped; nothing regenerates it, and
the export command is gone.
Live, and how the phone connects¶
| What | Where |
|---|---|
| Family web app | https://silver.equalentry.com/ (Cloudflare Pages project senior-health-family, also at its pages.dev address; seniorhealth.equalentry.com until October 22, 2026, which now redirects there), pnpm deploy:web |
| Data API (Worker) | https://senior-health-api.hub-worker.workers.dev, the production environment in apps/api/wrangler.jsonc, pnpm deploy:api |
| Database and photo files | D1 senior-health and R2 senior-health-media on the Equal Entry account; pnpm --filter @senior-health/api migrate:remote |
Only Tom's bank exists in the cloud so far, with Thomas and Lisa as its managers. Cloud passwords are not the local ones and are never committed. The dev seed is never loaded there: its device tokens are public in this repository.
A release build (TestFlight) reads the cloud Worker
(EXPO_PUBLIC_DATA_API_URL in apps/mobile/eas.json) once the phone is
paired: a Loved One opens Connect a phone on the web and makes a
one-time code (30 minutes, single use), and on the phone the gear on the
start screen opens Settings, where Use Code, on the Family photos page after the accessibility pages, takes it. Once paired, that button turns into a green Connected, which opens Use a new code and Disconnect. Until the phone is connected,
that screen also offers Open the family website, a link that opens the
production web app in the phone's browser, so the code can be made on the same phone. The phone keeps its session in the
Keychain for two years and shows the Loved Ones' photos from then on.
Development builds still connect automatically with
EXPO_PUBLIC_DEV_AUTO_LOGIN and the local Worker.
Current limits¶
- A Loved One can listen to a song they chose, but not to the song a memory ships with: the export carries its title only.
- The web app finds the senior's memories by the bank's senior name
(
Tom), because a bank does not carry the app's roster id. - A drawing a Loved One uploads as a memory's photo is shown without the
"Illustration" label; only the bank's copies of the app's own
illustrations carry it (
illustration, migration 0015). The web form has no way to say so yet. - A memory whose decade the family has not given (Tom's skydive, his Poland trip, Wicked, the Wildwood house, his EPA career as a whole) has no year and comes last; Edit words sets one once the memory is in the bank.
The words in the bank (Stage 2)¶
Since October 13, 2026, the bank can keep every memory's words too (Every memory in the bank, Stage 2).
| Piece | Role |
|---|---|
memories table (migration 0016) |
One row per memory: the app's own under its app id (origin app) or one written on the web (web-<uuid>), with title, story, details, year, and topic. An app memory taken out keeps its row with removed_at. |
/banks/:bankId/memories |
GET lists them and the ids taken out (view access). POST writes a new one; PUT /:memoryId writes one under its own id (the copy script and restores); PATCH /:memoryId changes some words; DELETE takes one out; PUT /:memoryId/restore puts it back. |
memory_photos.app_asset_id (0016) |
The bank's copy of the app's own picture, kept behind a picture the family chose, so Use the app's picture and a restored removal bring it back once the app no longer ships the file. |
pnpm memories:migrate <senior> |
Writes every memory's words (Tom 29, Nyna 13, Lisa 2), copies its picture (Stage 1), and keeps the app's song, skipping whatever the bank already has, so the family's edits and removals always stand. |
withBankMemories (mobile) |
Lays the bank's words over each bundled memory, adds the memories written on the web, and leaves out the ones taken out. Cached under bank-memories-v1:<senior>, so it holds offline. |
Backups include a memories/ folder with each memory's words, and restoring
writes them back before their pictures. The web app falls back to the app's
own list, read-only, for a bank the copy script has not reached yet.