Skip to content
프로젝트

소개

Browse two million Goodreads books with Next.js 16.3 Instant Navigations.

웹 및 앱 개발

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
기록 수집 중
in 15 days
기록 수집 중
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original
NextBooks

NextBooks

NextBooks is built from a Goodreads dataset of over 2,000,000 books. The live catalog includes books with usable cover images and uses Next.js 16.3, Drizzle, PostgreSQL, and Instant Navigations.

Live demo →


Rebuild of vercel-labs/book-inventory, now archived. Full dataset here.

Instant Navigations

See Ensuring instant navigations.

  • Cache Components cache each query with 'use cache' and cacheLife. See Migrating to Cache Components.
  • Partial Prefetching prefetches the shared App Shell of links entering the viewport.
  • Per-link prefetching prioritizes the initial browsing path: book links on the first catalog page and pagination links use prefetch={true}, while book links on later pages wait for hover or keyboard focus before resolving their URL-dependent content.
  • Fast Link starts eligible mouse navigation on press for book cards, while preserving hover and focus prefetching. Pagination uses Next.js links so its inline loading indicators still work.

Run locally

pnpm install
pnpm dev

POSTGRES_URL is optional. Without it the app serves a small preview catalog.

pnpm lint
pnpm exec tsc --noEmit
pnpm build

Testing

@next/playwright with instant(), asserting navigations stay instant. Runs in CI.

pnpm test:e2e

Database

The original dataset contains more than two million Goodreads books. The schema uses PostgreSQL's unaccent extension for accent-insensitive title search:

CREATE EXTENSION IF NOT EXISTS unaccent;

The source dataset is available from the UCSD Book Graph project.

Set POSTGRES_URL, then create the schema and load the bundled four-book sample:

pnpm db:setup

Optionally generate the cover-image placeholders after seeding:

pnpm db:seed-thumbhash

To import the complete UCSD Goodreads catalog, download the compressed book and author metadata files into the ignored data/ directory. The seeders read gzip files directly, preserve Goodreads IDs, and checkpoint large imports:

mkdir -p data
curl -L https://mcauleylab.ucsd.edu/public_datasets/gdrive/goodreads/goodreads_book_authors.json.gz -o data/authors.json.gz
curl -L https://mcauleylab.ucsd.edu/public_datasets/gdrive/goodreads/goodreads_books.json.gz -o data/books.json.gz

AUTHORS_DATA_PATH=./data/authors.json.gz TOTAL_AUTHORS=829529 pnpm db:seed-authors
BOOKS_DATA_PATH=./data/books.json.gz TOTAL_BOOKS=2360655 pnpm db:seed-books

관련 프로젝트 살펴보기

불러오는 중…