https://github.com/typesense/showcase-guitar-chords-search-react-native
A demo that shows how to implement Typesense in a React Native app
https://github.com/typesense/showcase-guitar-chords-search-react-native
react-native typesense
Last synced: about 1 month ago
JSON representation
A demo that shows how to implement Typesense in a React Native app
- Host: GitHub
- URL: https://github.com/typesense/showcase-guitar-chords-search-react-native
- Owner: typesense
- License: apache-2.0
- Created: 2024-02-23T20:09:46.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-05-25T15:37:11.000Z (over 1 year ago)
- Last Synced: 2024-11-08T18:07:17.414Z (12 months ago)
- Topics: react-native, typesense
- Language: TypeScript
- Homepage:
- Size: 273 KB
- Stars: 3
- 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 - React Native
Other versions
NuxtJS |
NextJS |
Angular 15 |
Vanilla JS |
Astro |
SolidJS |
Remix |
Sveltekit |
Qwik |
React Native## Tech Stack
- Typesense
- React Native + Expo Go
- Typescript
- [typesense-instantsearch-adapter](https://github.com/typesense/typesense-instantsearch-adapter) + react-instantsearch-coreAll 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/
│ ├── components/
│ │ └── UI components...
│ └── utils/
│ ├── reactChords.ts # draw guitar chord svg
│ └── typesense.ts # typesense-instantsearch-adapter config
└── App.tsx # guitar chords search
```## Development
To run this project locally, make sure you have docker and nodejs, install the dependencies and start the local server:
Installation
```shell
git clone https://github.com/typesense/showcase-guitar-chords-search-react-native.gitcd showcase-guitar-chords-search-react-native
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 start
# or
npm run android
npm run ios
npm run web
```## Deployment
Set env variables to point the app to the Typesense Cluster
```env
EXPO_PUBLIC_TYPESENSE_SEARCH_ONLY_API_KEY=xxx
EXPO_PUBLIC_TYPESENSE_HOST=xxx.typesense.net
EXPO_PUBLIC_TYPESENSE_PORT=443
EXPO_PUBLIC_TYPESENSE_PROTOCOL=https
```