---
title: "Next.js Book Inventory"
description: "An example of searching, filtering, and pagination."
url: "https://vercel.com/templates/next.js/next-book-inventory"
links:
  repository: "https://github.com/vercel-labs/book-inventory"
  demo: "https://next-books-search.vercel.app/"
  deploy: "https://vercel.com/new/clone?demo-title=Next.js+Book+Inventory&demo-description=An+example+of+searching%2C+filtering%2C+and+pagination.&demo-url=https%3A%2F%2Fnext-books-search.vercel.app%2F&project-name=Next.js+Book+Inventory&repository-name=next-book-inventory&repository-url=https%3A%2F%2Fgithub.com%2Fvercel-labs%2Fbook-inventory&demo-image=%2F%2Fimages.ctfassets.net%2Fe5382hct74si%2F59ZSCrEk6kmQ7cyJVwrX30%2Fadfff3f624c2a7f92bddf66cdb9a1dee%2FCleanShot_2024-08-11_at_15.52.41_2x.png&from=templates&stores=%5B%7B%22type%22%3A%22postgres%22%7D%5D"
---

# Next.js Book Inventory

An example of searching, filtering, and pagination.

# Next.js Book Inventory

Demo: https://next-books-search.vercel.app

This is a book inventory app built with Next.js, Drizzle, and PostgreSQL. The database contains over 2,000,000 books from Goodreads. [Full dataset here](https://mengtingwan.github.io/data/goodreads.html).

## Database Setup

This is currently using a Postgres extension called `unaccent` to remove accents from the book titles. This also uses the pgvector extension to use Postgres as a vector store. To install these extensions, run the following command on your database:

```sql
CREATE EXTENSION IF NOT EXISTS unaccent;
CREATE EXTENSION IF NOT EXISTS vector;
```

## Deploy on Vercel

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/templates/next.js/next-book-inventory)

## Related Templates

### [Next.js Commerce](https://vercel.com/templates/next.js/nextjs-commerce)

Starter kit for high-performance commerce with Shopify.

### [Next.js Boilerplate](https://vercel.com/templates/next.js/nextjs-boilerplate)

Get started with Next.js and React in seconds.

### [Your Next Store — Commerce with Next.js and Stripe](https://vercel.com/templates/next.js/yournextstore)

Your Next Store is a modern, ultra-fast commerce storefront with Stripe as the backend, using shadcn UI components.

---

## Additional documentation

The [Vercel Knowledge Base](https://vercel.com/kb) contains guides and answers to common questions about Vercel, including deployment, framework configuration, domains, caching, and troubleshooting.
