should links expire or be revocable?
The spec explicitly marks this as unresolved.
Families share photo albums through an invite link and get a weekly email digest of new photos.
🎧 Listen instead · Live from the spec: Shared Photo Albums, kick-off to final whistle Sports commentary
Intro
Jordan Good evening and welcome to a packed stadium! Tonight's fixture: Shared Photo Albums. Families create albums, invite relatives by link, and get a weekly digest of new photos.
What it is
Sam Big match, Jordan. Three user stories on the pitch, nine requirements on the bench, and a couple of question marks in the line-up.
Jordan Kick-off! User Story One takes possession: create an album, give it a name, upload photos from phone or desktop. Priority one, and rightly so.
Sam No albums, no uploads, no product. The spec says it, I'll say it louder.
Key decisions
Jordan And look at this build-up play! Photos go straight from the browser to object storage with presigned URLs. Twenty-five megabyte files never touch the API servers!
Sam Lovely footwork. But they passed on resumable uploads. A big HEIC file on a shaky phone connection drops halfway, and it's back to the centre circle.
Jordan The target on the scoreboard: ten photos in under thirty seconds on twenty megabits.
Sam A target the whole architecture is built around, and it's only tested in the very last phase. That's checking the goalposts after the final whistle.
Jordan Meanwhile, the worker is everywhere! Thumbnails, HEIC to JPEG, and it strips GPS location before anyone else sees the photo.
Sam Good defending on privacy. But the original file keeps its location, and how long originals are kept is still undecided.
Jordan Here comes User Story Two, also priority one: invite relatives by link. Anyone with the link can view and add photos.
Sam And there it is, the most dangerous play of the night. One permanent invite token per album, full member rights, for anyone holding the link.
Jordan The reasoning: lowest friction for relatives who aren't technical. Grandma taps the link and she's in.
Sam So does anyone grandma forwards it to. What happens when the link leaks? The spec asks the question itself and leaves it open: should links expire or be revocable?
Jordan That one goes to the referee. A human has to make the call.
Sam And while we wait: the alternatives were on the bench all along. Per-person email invites, expiring links, view-only links with upload approval. None of them got a minute.
Jordan Second open question in this half: when a member leaves the album, do their photos stay or go?
Sam Also unanswered. And can the owner remove photos someone else uploaded? With open upload links, they'll need to. No requirement says so.
Jordan Half time! Into the second half with User Story Three, priority two: the weekly digest email.
Sam The super-sub. Brings people back, but the product plays fine without it.
Jordan Every Monday at eight in the morning, in each member's own timezone. An hourly job picks whoever just hit Monday, eight o'clock.
Sam Clever. Except for members in half-hour timezones, like India. An hourly job never lands on their eight o'clock. They never get the email.
Jordan Ooh, offside by thirty minutes!
Sam And one more: the digest is mandatory. No way to unsubscribe, and recurring email usually needs one.
Jordan Into stoppage time. The storage budget per family? Still a question mark in the plan.
Sam Originals plus converted copies, twenty-five megabytes each, no retention period, no budget. That bill keeps running after the match.
What you must decide
Jordan Full time! Let's go to the analysis desk. Reviewer, here's what's on you.
Jordan One: invite links. Do they expire, can the owner revoke them, given they let people upload?
Jordan Two: what happens to a member's photos when they leave.
Jordan Three: how long originals are kept, and the storage budget per family.
Wrap-up
Sam And credit where it's due: direct uploads and GPS stripping are a strong game plan. Fix the link, and this team goes up a division.
Jordan That's all from the stadium. Goodnight!
The calls this spec leaves to you:
The spec explicitly marks this as unresolved.
The spec explicitly marks this as unresolved.
The spec explicitly marks this as unresolved.
The spec explicitly marks this as unresolved.
Listed as an edge case but no requirement or task covers it; families often upload the same photo twice.
With open upload links, the owner needs a way to remove unwanted content; no requirement says so.
FR-005 makes it mandatory; unsubscribe is usually a legal requirement for recurring email.
One permanent token per album; anyone with the link can view and upload.
Why: Lowest friction for non-technical relatives.
Instead of: Per-person email invites · Expiring links · View-only links plus upload approval
Risk: A leaked link exposes family photos and lets strangers upload; there is no way to revoke it.
Browser uploads to object storage with presigned URLs.
Why: Keeps 25 MB files off the API and meets the 30 s upload goal.
Instead of: Upload through the API · tus resumable uploads
Risk: No resumable uploads: large HEIC files on weak mobile connections may fail and restart.
Originals are kept with EXIF; GPS is removed in the worker before photos are visible.
Why: Privacy for shared photos while keeping the original file.
Risk: Originals with location data are stored indefinitely while retention is undefined.
Celery beat runs hourly and sends to members whose local time is Monday 08:00.
Why: Respects timezones without one scheduled job per user.
Instead of: One job per user · Everyone at 08:00 UTC
Risk: Members with half-hour offsets (e.g. India) never match an exact hour boundary.
Convert server-side and keep the original.
Why: Most browsers cannot render HEIC.
Instead of: Reject HEIC · Convert in the browser
Python 3.12 (API, worker), TypeScript 5 (web)
FastAPI, SQLAlchemy, Celery, React 19
PostgreSQL 16 for metadata, S3-compatible object storage for files
pytest, Playwright
Linux containers on Kubernetes
web
10 photo uploads in under 30 s on 20 Mbps
5k families in the first year
Impact: Anyone with the link can upload arbitrary content to a family album; no moderation or removal flow is specified.
Mitigation: Add link revocation and owner-side photo deletion to P1.
Impact: Originals plus converted copies, 25 MB each, with no retention period or budget.
Mitigation: Decide retention and a per-family quota before launch.
Impact: The 30 s upload goal drives the architecture but is verified only in the final polish phase.
Mitigation: Run a throttled upload spike right after T009.
flowchart LR
owner([Album owner])
relative([Relative with the invite link])
subgraph product["Shared Photo Albums"]
web[Web app<br/>React]
api[REST API<br/>FastAPI]
worker[Background worker<br/>Celery]
end
subgraph data["Data"]
db[(PostgreSQL<br/>albums, photos, members)]
store[(Object storage<br/>photo files)]
end
mail[[Email provider<br/>not specified]]
owner --> web
relative -->|invite link| web
web --> api
web -->|presigned upload| store
api --> db
store -->|new file| worker
worker -->|thumbnails, GPS stripped| store
worker --> db
worker -->|weekly digest| mail
mail --> owner
mail --> relative
flowchart LR
A[Owner creates album] --> B[Uploads photos]
B --> C[Worker makes thumbnails<br/>strips GPS]
A --> D[Owner shares invite link]
D --> E{Relative opens link}
E --> F[Joins as member]
F --> G[Views and uploads photos]
G --> C
C --> H[Monday 08:00 local time]
H --> I[Weekly digest email]
sequenceDiagram actor U as Member participant W as Web app participant API as API participant S as Object storage participant K as Worker U->>W: Pick photos W->>API: Request presigned upload URL API-->>W: Presigned URL W->>S: Upload file directly S-->>K: New file event K->>K: Thumbnail, HEIC to JPEG, strip GPS K-->>API: Photo ready API-->>W: Photo appears in album grid
erDiagram
Album ||--o{ Photo : "has"
Album ||--o{ Membership : "has"
Album {
field name
field owner
field invite_token
field created_at
}
Photo {
field file
field album
field uploader
field taken_at
field uploaded_at
}
Membership {
field user
field album
field role
field joined_at
}
flowchart TB
subgraph g0["1 · Setup"]
direction LR
t_T001["T001 Create backend and frontend project stru…"]
class t_T001 ub_done
t_T002["T002 Configure ruff, mypy and eslint"]
class t_T002 ub_done
class t_T002 ub_parallel
t_T003["T003 Provision PostgreSQL and object storage…"]
class t_T003 ub_parallel
t_T001 --> t_T002
t_T001 --> t_T003
end
subgraph g1["2 · Foundational"]
direction LR
t_T004["T004 Create Album, Photo and Membership model…"]
t_T005["T005 Implement EXIF reader and GPS stripping…"]
class t_T005 ub_parallel
t_T006["T006 Implement thumbnail generation in backen…"]
class t_T006 ub_parallel
t_T004 --> t_T005
t_T004 --> t_T006
end
subgraph g2["3 · US1"]
direction LR
t_T007["T007 Contract test POST /albums in backend/te…"]
t_T008["T008 Implement POST /albums and GET /albums"]
t_T007 --> t_T008
t_T009["T009 Implement presigned upload URL endpoint"]
class t_T009 ub_parallel
t_T010["T010 Worker job: thumbnail, HEIC conversion,…"]
t_T008 --> t_T009
t_T009 --> t_T010
t_T011["T011 Album grid page sorted by date taken in…"]
class t_T011 ub_parallel
t_T010 --> t_T011
end
subgraph g3["4 · US2"]
direction LR
t_T012["T012 Generate invite token on album creation"]
t_T013["T013 Join album via invite link endpoint"]
t_T012 --> t_T013
t_T014["T014 Join page in frontend/src/pages/Join.tsx"]
class t_T014 ub_parallel
t_T013 --> t_T014
end
subgraph g4["5 · US3"]
direction LR
t_T015["T015 Hourly Celery beat job selecting members…"]
t_T016["T016 Digest email template with thumbnails"]
class t_T016 ub_parallel
t_T015 --> t_T016
end
subgraph g5["6 · Polish"]
direction LR
t_T017["T017 Playwright end-to-end test for create, i…"]
class t_T017 ub_parallel
t_T018["T018 Load test 10 parallel uploads on a throt…"]
t_T017 --> t_T018
end
g0 --> g1
g1 --> g2
g2 --> g3
g3 --> g4
g4 --> g5
classDef ub_done opacity:0.55
classDef ub_parallel stroke-dasharray:4 3
A user creates an album, gives it a name and uploads photos from their phone or desktop.
The album owner shares an invite link. Anyone with the link can view and add photos.
Members receive a weekly email with thumbnails of new photos in albums they belong to.