https://github.com/typesense/showcase-guitar-chords-search-svelte-kit
A demo that shows how to implement Typesense in a SvelteKit app
https://github.com/typesense/showcase-guitar-chords-search-svelte-kit
sveltekit typesense
Last synced: 2 months ago
JSON representation
A demo that shows how to implement Typesense in a SvelteKit app
- Host: GitHub
- URL: https://github.com/typesense/showcase-guitar-chords-search-svelte-kit
- Owner: typesense
- License: apache-2.0
- Created: 2024-02-05T17:31:47.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-05T00:52:23.000Z (8 months ago)
- Last Synced: 2025-04-22T17:12:27.975Z (6 months ago)
- Topics: sveltekit, typesense
- Language: Svelte
- Homepage: https://guitar-chords-search-svelte-kit.typesense.org
- Size: 163 KB
- Stars: 12
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
🎸 Instant Guitar Chord Positions Search, powered by Typesense - Sveltekit
Other versions
NuxtJS |
NextJS |
Angular 15 |
Vanilla JS |
Astro |
SolidJS |
Remix |
Sveltekit |
Qwik |
React Native## Tech Stack
- Typesense
- Sveltekit
- Typescript
- [typesense-instantsearch-adapter](https://github.com/typesense/typesense-instantsearch-adapter) & instantsearch.js
- 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
/
├── cypress/
│ └── e2e tests...
├── scripts/
│ ├── data/
│ │ ├── guitar.json
│ │ └── schema.json
│ └── indexTypesense.ts # script that index data from guitar.json into typesense server
└── src/
├── components/
│ └── UI components...
├── lib/
│ ├── reactChords.ts # draw guitar chord svg
│ └── typesense.ts # typesense-instantsearch-adapter config
└── routes/
└── +page.svelte # guitar chords search
```
## DevelopmentTo run this project locally, make sure you have docker and nodejs, install the dependencies and run the local server:
Installation
```shell
git clone https://github.com/typesense/showcase-guitar-chords-search-svelte-kit.gitcd showcase-guitar-chords-search-svelte-kit
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:5173/ to see the app ✌️
## Deployment
Set env variables to point the app to the Typesense Cluster```env
PUBLIC_TYPESENSE_SEARCH_ONLY_API_KEY=xxx
PUBLIC_TYPESENSE_HOST=xxx.typesense.net
PUBLIC_TYPESENSE_PORT=443
PUBLIC_TYPESENSE_PROTOCOL=https
```> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.