Lorcan O'Shanahan
← Index

Personal · Agent-led build · Vision models · Self-hosted

Bravo the O'Shanahan photo archive

Year
2026
Role
Product & interface design
Agent-led engineering
ML pipeline
Hosting & infrastructure
Synopsis
My grandfather's lifetime of photographs of Gran Canaria, more than 30,000 of them, rebuilt with agents into an archive you can search by meaning, by face and by place, hosted at home behind a Cloudflare Tunnel.
Jaime O'Shanahan in a cardigan, standing on a planted slope in the Jardín Canario
Jaime O'Shanahan at the planting of a drago donated by a Japanese visitor, 1984. View in archive

My grandfather photographed Gran Canaria for sixty years. I wanted a way to explore those photographs, and to learn more about the life and the career he lived.

A gift, and the work that made it usable

Jaime O'Shanahan donated his archive of more than 30,000 photographs to the ULPGC while he was alive, so that anyone could see it. Then the university did the hard part. For several years before he died, they spent their weekends with him, hundreds of hours, going through the photographs and cataloguing as much as they could. I am very, very grateful to them. Everything on this page is built on their work.

What they catalogued is his professional collection: 33,411 photographs in 10,795 albums, from 1940 to 2009, filed under seven themes from the environment and urban landscape to archaeology, ethnography and his travels. His personal photographs are not in it yet. I hope to do those one day.

What I wanted from it

The catalogue only answers a search for the words in a title, and most titles are an album name repeated down the roll. I wanted something the family could move through on their phones. Type what you remember and get the photo. Follow one person across fifty years. See where a picture was taken when it never had a location. Everything below is in service of those three questions.

bravo.lorcanoshanahan.com →

Built with agents

I built Bravo the way I build most things now: I set the direction and coding agents wrote most of the code. I split the work into small parts that each made sense alone, such as the face pass, the embeddings, the location parser, search, and the map. Each part got a written spec, and I reviewed what came back before the next part started. The parts were then joined into one pipeline and one app.

My job was the decisions an agent can't make. That meant choosing what to ask of a vision model, judging whether search results were actually right, deciding where people should be able to correct the data, and checking everything against photos I know. The agents made it cheap to try ideas and throw them away. The direction stayed with me.

The pipeline

Nothing in the catalogue was enough on its own, so every photo goes through one offline pass that adds what the catalogue is missing. The GPU work runs on an RTX 4080 at home. The Pi only serves the results.

  1. Source
    ULPGC archive · 33,411 photos · 10,795 albums · 1940–2009
  2. Phase 1 · per photo, on the GPU
    Faces · InsightFace→ 72,320 faces
    Image embeddings · SigLIP 2→ 33,403 vectors
    Keywords and text · Qwen2.5-VL→ 17,296 photos so far
  3. Phase 2 · locations
    Filename and folder tokens → geocoder → human review
  4. Phase 3 · post-processing on CPU
    Face clustering (HDBSCAN)→ 29 people named
    Dates consolidated→ 29,047 dated
    Locations propagated→ 11,850 on the map
  5. Store
    Postgres + pgvector
  6. Serve · on the Raspberry Pi
    Search by meaning (SigLIP text tower) · by face · by place
  • Faces. InsightFace finds and embeds every face (72,320 of them). HDBSCAN clusters the embeddings, so one person can be followed across decades before anyone types a name.
  • Image embeddings. SigLIP 2 (siglip2-so400m) turns each photo into a 1152-dimension vector, stored in Postgres with pgvector and an HNSW index.
  • Keywords and visible text. Qwen2.5-VL reads each photo for what it shows and any writing in the frame: shop signs, labels, captions on a slide mount. 17,296 photos so far.
  • Locations. Filenames and folder names carry places. A tokenizer pulls them out and sends them to a geocoder, and a curated list of places he kept returning to (the Jardín Canario, the Tafira campus, the municipalities) catches the dozen ways each one was spelled. 11,850 photos are now on the map.

Search that blends two kinds of match

The home search box runs two queries at once and merges them in the client.

  • Semantic. The query goes through the SigLIP 2 text tower and the database returns the nearest image vectors. Text-to-image cosine distances are tightly bunched, so a fixed "top k" is wrong for half the queries. Instead the API returns everything within a small margin (0.03) of the best match: a narrow query returns a few photos and a broad one returns many.
  • Text. Postgres trigram search over titles, albums, places, named people and the vision model's extracted text. It tolerates typos, so "Sventeniuz" still finds Sventenius.

Semantic results carry full weight and text adds 0.7 × text_score on top. A weak substring hit (the "pig" inside Spanish espigas) scores around 0.1, so it can't bury a real match. Every photo also has a "more like this" strip, a plain nearest-neighbour lookup on its own vector with no model inference at request time.

This is what made the stories possible. Only two photos have "jeep" in the title. A semantic search for "jeep" returns dozens.

Prueba de sulfatadoras en tomateros
1971Prueba de sulfatadoras en tomateros
Descarga de vapam en almacén de SERAGRI en Hoya Parrado
1972Descarga de vapam en almacén de SERAGRI en Hoya Parrado
Drago de las magnolias tras su caída
1988Drago de las magnolias tras su caída
Jeep de empresa con distintos productos de venta
1992Jeep de empresa con distintos productos de venta

Photographs: Archivo fotográfico Jaime O'Shanahan, ULPGC. Captions are the catalogue titles.

People, named by the people who knew them

The clusters are anonymous until someone recognises a face. Anyone can name a cluster from its page, which either creates a person or merges into an existing one. Naming marks those faces user_confirmed, so re-running the clustering later can't undo a human's work. A single face can be moved to another cluster, another person, or marked as noise. Renaming, merging and deleting people stay admin-only.

Face boxes come back from the API normalised to 0–1, so the overlay on the image page scales with whatever size the photo renders at.

Locations, crowdsourced

Most photos never had a location, and the family knows more than any geocoder does. Signed-in visitors can place a photo on the map. The location goes live straight away and is logged with who placed it, and a leaderboard credits contributors. Free-text corrections are kept for me to review instead. Writes are protected by a honeypot field, server-side validation and a limit of 30 per hour per IP.

Accounts are self-hosted with no outside identity provider: PBKDF2 password hashes and stateless HMAC-signed tokens, with no session table.

Hosted at home, behind cloudflared

Bravo doesn't use cloud servers or a hosting bill. Everything runs on machines in my home. The GPU work runs on my desktop's RTX 4080, and the public site runs on a Raspberry Pi 5 with the 23 GB of originals on local disk.

The Pi reaches the internet through a Cloudflare Tunnel. A cloudflared connector on the Pi opens an outbound connection to Cloudflare. Visitors connect to Cloudflare, Cloudflare passes the request down the tunnel, and nothing on my network accepts an inbound connection. There are no forwarded ports and no public IP. TLS ends at Cloudflare's edge, so the app only ever speaks plain HTTP inside the house. The Pi runs one shared tunnel for all its sites, which routes each public hostname to a container by name. Adding Bravo meant adding one hostname, not running another tunnel.

  1. Edge
    CloudflareTLS ends here
  2. Pi · cloudflared
    Outbound tunnelno open ports
  3. Pi · Caddy
    SPA build · 23 GB of originals · face cropsserved from disk
  4. Pi · Flask
    /api · /thumbone process, port 5001
  5. Pi · Postgres
    pgvector · HNSWtrigram indexes

Small decisions kept it fast and cheap on a small machine:

  • No model on the hot path for browsing. "More like this" is a pure index lookup. Only a typed semantic query runs the text tower, and if it isn't installed the endpoint returns 501 and the client falls back to text search.
  • Thumbnails decoded small. Thumbnails are made on first request and cached on disk. libjpeg's draft mode decodes at 1/2 to 1/8 scale, five to ten times faster than decoding the full scan and resizing it.
  • Public mode is read-only by default. A before_request hook rejects every non-GET with a 403 before it touches the database, except a short allow-list: sign-in, locations, and naming faces.
  • Link previews without server rendering. The app is a single-page React app, and iMessage, Slack and Discord don't run JavaScript. Caddy matches their user agents and sends only those crawlers to a small Flask route that renders a per-photo Open Graph card. People and search engines get the normal app.
  • The real visitor IP. Caddy forwards the client address from the tunnel as X-Real-IP, so rate limits and the contribution log see the visitor, not the proxy.
  • Cache rules that survive a deploy. Hashed assets are cached for a year. index.html is never cached, so a new backend is never paired with an old bundle. Static 404s are returned before the cache header is set, so a file that hasn't synced yet doesn't get cached at the edge for a day.

Designed for the family

The people using it are mostly family, spread across Europe and mostly on Android. So the interface is Material, built on patterns they already use every day: a search bar, filter chips, a timeline slider with a density histogram, and a strip of known faces. Every route deep-links, so a photo can be sent to a cousin and opens on that photo.

What came out of it

Once the archive could be searched, stories started to come out of it. Each one is a devlog of its own.

The Dragon Tree That Wouldn't Die
The Dragon Tree That Wouldn't Die
Sventenius and Jaime at the Jardín Canario
1950Sventenius and Jaime at the Jardín Canario
Viaje a Irlanda y Holanda
1980Viaje a Irlanda y Holanda
  • The Dragon Tree That Wouldn't Die. A giant drago falls across a garden wall in Tafira, and Jaime photographs the twenty years that follow: 402 photographs in 32 albums. It also shows the archive's limits, with the same Land Cruiser in albums dated seven years apart.
  • A lifetime of the Canary Islands, through his lens. Who Jaime was, where the O'Shanahan name came from, and what turned up once I could search: the founding of the Jardín Canario, the family trips back to Ireland, and the jeeps.

Production notes

  • ClientSelf-initiated
  • RoleProduct & interface design, agent-led engineering, ML pipeline, hosting & infrastructure
  • Archive33,411 photographs · 10,795 albums · 1940–2009, donated by Jaime O'Shanahan and catalogued by the ULPGC
  • Built withCoding agents, directed and reviewed by me
  • HostingSelf-hosted at home · Raspberry Pi 5 · Cloudflare Tunnel (cloudflared)
  • SourceArchivo fotográfico Jaime O'Shanahan, Memoria digital de Canarias, ULPGC
  • Year2026
  • Visitbravo.lorcanoshanahan.com

Vite + React + React Router + Leaflet · Flask · Postgres + pgvector + pg_trgm · SigLIP 2 · InsightFace + HDBSCAN · Qwen2.5-VL · RTX 4080 · Caddy · cloudflared · Docker · Raspberry Pi 5 · coding agents

Next888 The New World — trailer

Index

28