---
title: "Building a searchable photo library on the Neon backend with TanStack"
description: "Atlas is a TanStack Start app on Vercel that stores private photos in Neon Object Storage, metadata and vectors in Lakebase Postgres, identity in Managed Better Auth, and ranks CLIP embeddings with the Lakebase Search `lakebase_ann` index."
url: "https://swe.quest/articles/building-a-searchable-photo-library-on-the-neon-backend-with-tanstack-f091ade391b04611"
canonical: "https://neon.com/blog/building-a-private-searchable-photo-library-on-the-neon-backend"
source: "Neon"
published: "2026-10-05"
difficulty: "medium"
kind: "How-to"
reading_minutes: 9
tags: ["postgres","vector-search","identity-auth","storage-systems","deployment"]
---

# Building a searchable photo library on the Neon backend with TanStack

A post on [Neon](https://swe.quest/sources/neon.md), published 2026-10-05, 9 min read, How-to. Original: [https://neon.com/blog/building-a-private-searchable-photo-library-on-the-neon-backend](https://neon.com/blog/building-a-private-searchable-photo-library-on-the-neon-backend)

## Summary

Atlas is a TanStack Start app on Vercel that stores private photos in Neon Object Storage, metadata and vectors in Lakebase Postgres, identity in Managed Better Auth, and ranks CLIP embeddings with the Lakebase Search \`lakebase\_ann\` index. The build covers a declarative \`neon.ts\` config, uploads via aws4fetch that write bytes before inserting the Postgres row, presigned GET URLs for a private bucket, and a Drizzle schema using a pgvector custom type. Every query is scoped to an owner ID taken from a JWKS-verified JWT. Face search runs exact scans over 1024-d descriptors with Chinese Whispers clustering. Because all of these primitives branch with copy-on-write, one Neon branch gives a preview environment with production data, objects, users and search indexes.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Vector search](https://swe.quest/tags/vector-search.md) (Data & databases)
- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [Storage systems](https://swe.quest/tags/storage-systems.md) (Infrastructure)
- [Deployment](https://swe.quest/tags/deployment.md) (Reliability & operations)

## Prerequisites

- PostgreSQL basics ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))
- S3-compatible object storage ([easy posts on Storage systems](https://swe.quest/tags/storage-systems.md?difficulty=easy))
- JWT authentication ([easy posts on Identity & auth](https://swe.quest/tags/identity-auth.md?difficulty=easy))
- vector embeddings ([easy posts on RAG & retrieval](https://swe.quest/tags/rag.md?difficulty=easy))

## Keywords

Neon, TanStack Start, Lakebase, pgvector, CLIP, Better Auth, Drizzle, aws4fetch

## Related posts

- [Lakebase Search: the retrieval primitive for agents on Neon](https://swe.quest/articles/lakebase-search-the-retrieval-primitive-for-agents-on-neon-08857239ea4fff67.md): Neon · 2026-09-30 · Medium · 6 min read · Vector search, PostgreSQL, Search, RAG & retrieval, AI agents
  Lakebase Search adds vector and BM25 search to Lakebase Postgres through two extensions, lakebase\_vector and lakebase\_text, so agents can query operational data without a separate search system. lakebase\_vector keeps its durable index in object storage, caches hot pages in NVMe and RAM, and combines hierarchical IVF with RaBitQ quantization.
- [Neon Docs search is now built on Neon](https://swe.quest/articles/neon-docs-search-is-now-built-on-neon-6358bcc8a0cf6214.md): Neon · 2026-10-26 · Medium · 6 min read · Search, PostgreSQL, Vector search, Caching, AI agents
  Neon's docs search now runs entirely on its own stack: Lakebase Postgres with the lakebase\_vector (pgvector-compatible ANN) and lakebase\_text (BM25) extensions, a Hono API on Neon Functions, and Neon AI Gateway for embeddings and reranking.
- [Implementing semantic image search with Amazon Titan and Supabase Vector](https://swe.quest/articles/implementing-semantic-image-search-with-amazon-titan-and-supabase-vector-07c13eba94b53a82.md): Supabase · 2024-03-26 · Medium · 5 min read · Vector search, PostgreSQL, Python, Computer vision, Cloud platforms
  Semantic image search can be built in Python by generating 1024-dimensional embeddings for images with the Amazon Titan multimodal embedding model (amazon.titan-embed-image-v1) via Amazon Bedrock, then storing and querying them in Supabase Vector (Postgres with pgvector) using the vecs client.
- [Lakebase Search: vector and BM25 on Neon](https://swe.quest/articles/lakebase-search-vector-and-bm25-on-neon-b760351851c96b48.md): Neon · 2026-07-02 · Medium · 7 min read · Vector search, Search, PostgreSQL, Storage engines
  Neon's Lakebase Search adds two Postgres extensions, lakebase\_vector (IVF partitioning plus RaBitQ quantization, pgvector-compatible) and lakebase\_text (a BM25-native index with Block-Max WAND top-K pushdown), designed for Neon's separated compute and object-storage tiers.
- [Semantic search using OpenAI, pg\_embedding and Neon](https://swe.quest/articles/semantic-search-using-openai-pg-embedding-and-neon-aeafbc27d93ca728.md): Neon · 2023-08-25 · Medium · 9 min read · Vector search, PostgreSQL, LLMs, Serverless, TypeScript
  A YC idea-matcher app implements semantic search by embedding ~4,400 YCombinator company descriptions with OpenAI's text-embedding-ada-002 (1536 dimensions) and storing them as real\[\] columns in Neon Postgres via the pg\_embedding extension.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
