An example of using Tigris Database + Search with a Movie dataset. Built with Next.js and Tailwind CSS.
tigris-move-db-app-22-may-web-720.mp4
The application loads 35,000 movies into a Tigris Database movies
collection,
automatically creating a Tigris Search index for the collection, enabling search
functionality in the application.
The repo contains three branches:
main
- the branch with Database to Search in place with the application refactored and optimized to show best practices with Tigris and Next.js.db-only
- the application with just the basic database functionality. The application is in a raw state and has not been refactored.next
- working branch for updates to be merged intomain
.
npm i
Or the equivalent with other package managers.
Run this only once:
npm run tigris:seed
The following command uses the Tigris CLI to log you into Tigris Cloud (you can
signup if you don't already have an account), create a project, and save your
Tigris project configuration to a .env.local
file.
npm run tigris:init
By default, the name tigris-movie-db
is as the project name. You can override
this by passing in --project={name}
flag. For example:
npm run tigris:init --project awesome-project
Run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
Open http://localhost:3000 with your browser to see the result.
If you'd just like to see Tigris Search added check out the add-search
branch:
git checkout add-search
If you'd like to walk through adding search, follow the Tigris Automatic Database to Search Synchronization video.
To learn more about Tigris, take a look at the following resources:
Deploy the Tigris Movie Database to the Vercel Platform.