https://github.com/typesense/showcase-nba-players-search-flutter
https://github.com/typesense/showcase-nba-players-search-flutter
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/typesense/showcase-nba-players-search-flutter
- Owner: typesense
- Created: 2024-06-13T15:00:49.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-16T09:07:36.000Z (about 2 years ago)
- Last Synced: 2025-04-17T07:17:31.842Z (about 1 year ago)
- Language: Dart
- Size: 693 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
🏀 Search NBA players' stats, powered by Typesense & flutter
This search experience is powered by Typesense which is
a blazing-fast, open source typo-tolerant
search-engine. It is an open source alternative to Algolia and an easier-to-use alternative to ElasticSearch.
This demo uses the typesense-dart client and flutter infinite_scroll_pagination.
The dataset is available on Kaggle.
## Project Structure
```bash
├── cli/
│ ├── data/
│ │ └── nba_players.jsonl
│ ├── compose.yml
│ └── index_typesense.dart # index data from nba_players.jsonl into typesense server
└── src/
├── models/
│ └── ...
├── widgets/
│ └── ...
├── utils/
│ └── typesense.dart # typesense client config
└── main.dart # nba players search
```
## Development
To run this project locally, make sure you have flutter SDK installed:
```shell
cd cli
flutter pub get
#Start typesense server
docker compose up
#Index data into typesense
dart index_typesense.dart
```
Start developing
```shell
flutter pub get
flutter run --dart-define-from-file=.env
```
## Environment
Set env variables in `.env` file to point the app to the Typesense Cluster
```env
TYPESENSE_HOST=localhost # use your internet IPv4 address when developing on mobile
TYPESENSE_PORT=8108
TYPESENSE_PROTOCOL=http
TYPESENSE_SEARCH_ONLY_API_KEY=xyz
```
Only for indexing:
```env
TYPESENSE_ADMIN_API_KEY=xyz
FORCE_REINDEX=false
```