Skip to content

typesense/showcase-nba-players-search-flutter

Repository files navigation

🏀 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

├── 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:

cd cli
flutter pub get
#Start typesense server
docker compose up

#Index data into typesense
dart index_typesense.dart

Start developing

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

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:

TYPESENSE_ADMIN_API_KEY=xyz
FORCE_REINDEX=false

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published