{"id":18071950,"url":"https://github.com/stereobooster/facets","last_synced_at":"2025-07-08T12:35:01.645Z","repository":{"id":208250848,"uuid":"715654032","full_name":"stereobooster/facets","owner":"stereobooster","description":"Client-side faceted search engine","archived":false,"fork":false,"pushed_at":"2024-09-17T22:50:20.000Z","size":2104,"stargazers_count":27,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T11:43:35.847Z","etag":null,"topics":["client-side","faceted","faceted-search","facets","full-text","full-text-search","instantsearch","search"],"latest_commit_sha":null,"homepage":"https://facets-demo.stereobooster.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stereobooster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-07T15:11:38.000Z","updated_at":"2025-03-04T20:32:34.000Z","dependencies_parsed_at":"2024-08-26T12:53:52.986Z","dependency_job_id":"8097dd4e-58e6-47ee-a01c-324fccac733d","html_url":"https://github.com/stereobooster/facets","commit_stats":{"total_commits":95,"total_committers":2,"mean_commits":47.5,"dds":"0.021052631578947323","last_synced_commit":"5cd739a937dcb45384634a00586c3ef76e2fe0cc"},"previous_names":["stereobooster/facets"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stereobooster%2Ffacets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stereobooster%2Ffacets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stereobooster%2Ffacets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stereobooster%2Ffacets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stereobooster","download_url":"https://codeload.github.com/stereobooster/facets/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247601254,"owners_count":20964858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["client-side","faceted","faceted-search","facets","full-text","full-text-search","instantsearch","search"],"created_at":"2024-10-31T09:18:11.641Z","updated_at":"2025-04-12T02:53:22.711Z","avatar_url":"https://github.com/stereobooster.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Facets monorepo\n\n\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"logo/logo-dark.svg\"\u003e\n    \u003cimg alt=\"\" src=\"logo/logo.svg\" width=\"200\" height=\"200\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\nIt is the monorepo repository:\n\n- main package - [facets](/packages/facets/) ![npm version](https://img.shields.io/npm/v/%40stereobooster/facets)\n- [InstantSearch adapter for facets](/packages/facets-instantsearch/) ![npm version](https://img.shields.io/npm/v/%40stereobooster/facets-instantsearch)\n- and [demo site](/packages/demo/README.md)\n\n**Facets** is a client-side (though you can run it on the server) faceted search engine.\n\n\u003e Facet - any of the definable aspects that make up a subject (as of contemplation) or an object (as of consideration)\n\n**Facets** main purpose is to do the faceting aspect of the search. Text search is outsourced to other libraries, for example, you can use:\n\n- [QuickScore](https://github.com/fwextensions/quick-score)\n- [MiniSearch](https://github.com/lucaong/minisearch)\n- [Fuse.js](https://github.com/krisk/fuse)\n- [flexsearch](https://github.com/nextapps-de/flexsearch)\n- and you can write an adapter for any other text search engine\n\nThe main secret ingredient is [TypedFastBitSet.js](https://github.com/lemire/TypedFastBitSet.js/) - a fast set data structure. Using it and standard `Map` allows us to build an inverted-index data structure. From there, it's a pretty straightforward implementation.\n\n## Demo\n\n[![Netlify Status](https://api.netlify.com/api/v1/badges/5a9cb813-8600-4486-b611-8c56015b759a/deploy-status)](https://app.netlify.com/sites/facets-demo/deploys)\n\nIt is easier to show than explain. [See online demo here](https://facets-demo.stereobooster.com/).\n\n## Is it ready for production?\n\nThe demo works, as you can see, but beyond that, there was no exhaustive testing. There are still rough edges. API can change.\n\n## Backstory\n\nThe library inspired by [ItemsJS](https://github.com/itemsapi/itemsjs). There are only three solutions that do faceted searches on the client-side:\n\n- [Tanstack table](https://tanstack.com/table/). It is not a primary purpose of the library, though it's possible\n- [Orama](https://docs.oramasearch.com/open-source/usage/search/facets). It is quite slow in my testing\n- ItemsJS\n\nRead [my article](https://stereobooster.com/posts/faceted-search/) for details.\n\nInitially, I wanted to fork ItemsJS, but I thought - it would be easier to write a library from scratch.\n\n\u003e [!WARNING]  \n\u003e Appearantly pagefind also supports [faceted search](https://pagefind.app/docs/js-api-filtering/) and [loading data from json](https://pagefind.app/docs/node-api/). I found out it only after implemented this library.\n\nSee:\n\n- [pagefind-instantsearch](https://github.com/stereobooster/pagefind-instantsearch)\n- https://github.com/CloudCannon/pagefind/discussions/512\n\n## Development\n\n```sh\npnpm i\npnpm run dev\n```\n\n## Logo\n\nLogo by Pravin Unagar from \u003ca href=\"https://thenounproject.com/browse/icons/term/trillion/\" target=\"_blank\" title=\"trillion Icons\"\u003eNoun Project\u003c/a\u003e (CC BY 3.0)\n\n## TODO\n\n- prettier, eslint\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstereobooster%2Ffacets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstereobooster%2Ffacets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstereobooster%2Ffacets/lists"}