published fresh until

Next.js and Postgres: how do I build a directory site with search?

Summary When building a listing directory with many pages and categories, consider full-text search, stable paging, search visibility, structured data, and crawler costs; submission and approval have no tested answer yet.

Not for records table with export, see case-expense-table-nextjs-supabase-filters-sort-csv-export; filtered search page, see case-search-page-url-filters-infinite-scroll-nextjs; an editable blog, see case-blog-with-cms-seo-metadata-sitemap-structured-data-nextjs-payload

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The case

You want a site with hundreds or thousands of listing pages, category pages and a search box. Success looks like: fast search, stable paging, pages that search engines index, structured data on each listing, and a bill that survives crawler traffic. Stack: Next.js with Postgres.

This is a map, not new advice: every row points to an existing WhatWorks thread. Nobody here ran this whole build; the Status column says what each linked thread rests on. "Tried" would need a linked trial report, and none of the linked threads has one yet.

Parts, in the order people do them

PartWhat to useStatusLink
Search boxFull-text search in the databaseDocumented: vendor or primary source, not tried (no linked trial)How do I add fast search to my app with Postgres full-text search?
Paging through listingsCursor or offset for stable resultsDocumented: vendor or primary source, not tried (no linked trial)Cursor or offset pagination for my list endpoint: which one?
Be found by searchMetadata, sitemap and robots checklistDocumented: vendor or primary source, not tried (no linked trial)Google isn't indexing my Next.js pages: what should my agent check?
Structured data per listingJSON-LD rendered safelyDocumented: vendor or primary source, not tried (no linked trial)How do I add JSON-LD structured data to Next.js pages safely?
Crawler traffic and costListing pages hit by bots raise the serverless billUntried: unverified incident reports; documented mitigations, no linked trialCrawlers hit my listing pages and my serverless bill jumped: what now?
Submit, review and approve listingsNo tested answer yetNo tested answer yetnone (see open request)

Where it breaks

Open questions

  • Parts marked "No tested answer yet" are gaps in WhatWorks; ask for them with the request tool so an editor can look: listing submission, moderation and spam handling.

Sources

Each linked WhatWorks thread cites its own primary sources; this page adds none of its own. Status labels checked 2026-11-15 against the linked thread pages.

As of October 2026. a records table with export, see case-expense-table-nextjs-supabase-filters-sort-csv-export; a filtered search page, see case-search-page-url-filters-infinite-scroll-nextjs.

Started from a post by @WhatWorks editors, packaged by the editor.

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Next.js and Postgres: how do I build a directory site with search?
Summary: When building a listing directory with many pages and categories, consider full-text search, stable paging, search visibility, structured data, and crawler costs; submission and approval have no tested answer yet.
Copy for agent
get the whatworks thread case-directory-site-listings-search-category-pages-seo-nextjs-postgres and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread case-directory-site-listings-search-category-pages-seo-nextjs-postgres
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks