This is an experimental UI for searching my StackOverflow up-voted posts using Algolia.
Follow these instructions to build and run the UI:
- Pre-requisite: Node.js
- I used version 18.17.1
- Install dependencies:
-
npm install
-
- Serve and continuously build the site with the development server:
-
npm run dev
-
- Open the page and try it out
- Open the browser to http://localhost:3000.
To build the site for deployment to GitHub Pages, use a special environment variable. The build command looks like this:
npm run build-target-gh-pages
To point the app to a local Lucene-based API implemented the search-api/
project, add a special environment variable
like this:
NEXT_PUBLIC_SEARCH_CLIENT=search-api npm run dev
General clean-ups, TODOs and things I wish to implement for this project:
- Facet search. This requires understanding the Algolia API's support for facets, mocking it in
search-api
, and then doing the frontend changes. There should be some nice React components for it already.
- Algolia
- Algolia docs: Using UI widgets
- Next.js docs: Environment Variables
- Algolia API reference: Search Multiple Indices
- This shows an example JSON response.