A blazingly fast, server-side rendered search application for Steam games, powered by Typesense, Next.js App Router, and React InstantSearch.
- Server-side rendering using Next.js App Router for improved performance and SEO
- Instant search functionality with Typesense
- Faceted search with dynamic filters
- Custom UI components using shadcn/ui
-
Clone the repository:
git clone https://github.com/your-username/typesense-instantsearch-next-ssr.git cd typesense-instantsearch-next-ssr
-
Install dependencies:
pnpm install
-
Set up Typesense:
- Make sure you have Docker installed
- Update the Typesense configuration in
src/lib/typesense.ts
if needed
-
Index the data:
pnpm run index-typesense
-
Start the development server:
pnpm run dev
After starting the development server, open your browser and navigate to http://localhost:3000
. You can now search for Steam games, apply filters, and explore the catalog.
The main configuration files are:
src/lib/typesense.ts
: Typesense client configurationsrc/lib/schema.ts
: Data schema and attribute labelsdocker-compose.yml
: Typesense Docker configurationtailwind.config.ts
: Tailwind CSS configurationcomponents.json
: shadcn/ui configuration
You can modify these files to adjust the search behavior, data structure, Typesense setup, or UI styling.
This project uses custom-styled React Instantsearch components built with shadcn/ui, which combines the accessibility of Radix UI with the utility-first approach of Tailwind CSS. These components are located in the src/components/instantsearch
directory and include:
- Current Refinements
- A Card component for Hits
- Hits Per Page
- Sort By Dropdown Menu
- Facet Menu
- Range Menu with a Slider and a Form
- Numeric Menu with Radio Groups
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a new branch:
git checkout -b feature-branch-name
- Make your changes and commit them:
git commit -m 'Add some feature'
- Push to the branch:
git push origin feature-branch-name
- Submit a pull request
The dataset used in this showcase is from Terenci Claramunt's (@terencicp) public dataset of Steam Games released from 2013 up to 2023 listed here: https://www.kaggle.com/datasets/terencicp/steam-games-december-2023
- Typesense for the search engine
- Next.js for the React framework with App Router
- React InstantSearch for search UI components
- ShadcnUI for beautifully designed components
- Radix UI for accessible UI primitives
- Tailwind CSS for styling
- Lucide React for icons
- Zod for schema validation