Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/typesense/showcase-guitar-chords-search-next-js
A demo that shows how to implement Typesense in a Next.js app
https://github.com/typesense/showcase-guitar-chords-search-next-js
instantsearch nextjs react react-instantsearch typesense typesense-instantsearch-adapter typesense-showcase
Last synced: 3 months ago
JSON representation
A demo that shows how to implement Typesense in a Next.js app
- Host: GitHub
- URL: https://github.com/typesense/showcase-guitar-chords-search-next-js
- Owner: typesense
- License: apache-2.0
- Created: 2024-01-15T22:56:54.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-05-28T20:40:27.000Z (8 months ago)
- Last Synced: 2024-05-29T11:33:25.350Z (8 months ago)
- Topics: instantsearch, nextjs, react, react-instantsearch, typesense, typesense-instantsearch-adapter, typesense-showcase
- Language: TypeScript
- Homepage: https://guitar-chords-search-next-js.typesense.org
- Size: 267 KB
- Stars: 11
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
🎸 Instant Guitar Chord Positions Search, powered by Typesense - NextJS
Other versions
NuxtJS |
NextJS |
Angular 15 |
Vanilla JS |
Astro |
SolidJS |
Remix |
Sveltekit |
Qwik |
React Native## Tech Stack
- Typesense
- NextJS
- Typescript
- Sass
- Vitest
- CypressAll make for a blazingly fast search experience 🔥🔥🔥
The guitar chord dataset & chord svg generation is from tombatossals which contains 2141 chord shapes of 552 chords.
## Project Structure
```bash
/
├── scripts/
│ ├── data/
│ │ ├── guitar.json
│ │ └── schema.json
│ └── indexTypesense.ts # script that index data from guitar.json into typesense server
└── src/
├── app/
│ └── page.tsx # guitar chords search
├── components/
│ └── UI components...
└── lib/
└── typesense.ts # typesense-instantsearch-adapter config
```## Development
To run this project locally, make sure you have docker and nodejs, install dependencies and start the dev server:
Installation
```shell
git clone https://github.com/typesense/showcase-guitar-chords-search-next-js.gitcd showcase-guitar-chords-search-next-js
npm i
```Start typesense server
```shell
npm run start:typesense # or: docker compose up
```Index data into typesense
```shell
npm run index:typesense
```Start the dev web app
```shell
npm run dev
```Open http://localhost:3000 to see the app ✌️
## Deployment
Set env variables to point the app to the Typesense Cluster
```env
NEXT_PUBLIC_TYPESENSE_SEARCH_ONLY_API_KEY=xxx
NEXT_PUBLIC_TYPESENSE_HOST=xxx.typesense.net
NEXT_PUBLIC_TYPESENSE_PORT=443
NEXT_PUBLIC_TYPESENSE_PROTOCOL=https
```