https://github.com/searchcraft-inc/searchcraft-javascript-sdks
Monorepo containing framework-specific JavaScript SDKs for use in front-end consuming applications of Searchcraft.
https://github.com/searchcraft-inc/searchcraft-javascript-sdks
javascript react sdk search search-engine searchcraft typescript vue web-components
Last synced: 4 months ago
JSON representation
Monorepo containing framework-specific JavaScript SDKs for use in front-end consuming applications of Searchcraft.
- Host: GitHub
- URL: https://github.com/searchcraft-inc/searchcraft-javascript-sdks
- Owner: searchcraft-inc
- License: apache-2.0
- Created: 2025-10-22T19:04:52.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2026-02-25T02:23:05.000Z (4 months ago)
- Last Synced: 2026-02-25T07:38:57.320Z (4 months ago)
- Topics: javascript, react, sdk, search, search-engine, searchcraft, typescript, vue, web-components
- Language: TypeScript
- Homepage: https://docs.searchcraft.io/sdks/javascript/overview/
- Size: 5.98 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Cla: CLA.md
Awesome Lists containing this project
README
Searchcraft JavaScript SDKs
This project is a monorepo containing framework-specific javascript SDKs for use in front-end consuming applications of Searchcraft, the developer-first vertical search engine.
To use these SDKs, you either install the JS, React or Vue SDK via NPM. Svelte and SolidJS developers may use the JS SDK web components.
## Development Documentation
- [Development Documentation](#development-documentation)
- [Technologies](#technologies)
- [Tooling](#tooling)
- [Local Development](#local-development)
- [Installation](#installation)
- [Building](#building)
- [Building for WordPress](#building-for-wordpress)
- [Storybook](#storybook)
- [Versioning](#versioning)
- [Publishing](#publishing)
- [Project Structure](#project-structure)
- [Core Package](#core-package)
- [Stencil Web Components](#stencil-web-components)
- [Issues](#issues)
---
Each SDK provides the following functionality to the consumer:
- Pre-built components and functionality for the consuming application for the purpose of rendering search forms, search results, and filtering, AI summarization, and more. The SDKs are the quickest way to build a front-end application with Searchcraft.
- Communicates with Searchcraft via the Searchcraft API.
- State management of search results, filtering, and settings.
- Ability to render ads in-line with search results if that ability is enabled (reach out to Searchcraft to enable).
- Analytics events sent to the Searchcraft anaytics platform for viewing on the Vektron dashboard. For self-hosted, this will go to your own Clickhouse cluster via the engine `/measure` endpoint (if enabled).
You may also be interested in our [React](https://github.com/searchcraft-inc/vite-react-searchcraft-template) and [Vue](https://github.com/searchcraft-inc/vite-vue-searchcraft-template) Vite templates, which provide a starting point for building a front-end application with Searchcraft. The templates include the SDKs and all necessary configuration for getting started.
## Technologies
- yarn workspaces (yarn classic)
- Stencil
- Typescript
## Tooling
- Stencil output targets
- typedoc
- vite
- Storybook
- lerna
- biomejs
- nodemon
- Github Actions
- `yalc`
## Local Development
### Installation
Install dependencies with `yarn install`.
### Building
Use the build script for local development. The build script handles all of the necessary build steps and build order. It can also handle watching the files and re-running the build during the course of development
```bash
node build.mjs [package-alias] [--watch] [--yalc]
```
For complete documentation on the build script, refer to the comment header in [build.mjs](build.mjs).
**Note**: To use the `--yalc` flag, you must have yalc installed on your machine.
### Building for WordPress
To build the JavaScript SDK for WordPress, use the `--wordpress` flag. This will exclude the `AdMarketplaceClient` and `NativoClient` from the build. You'll then need to manually copy the `javascript-sdk` dist output to the `wordpress` plugin directory.
### Storybook
The one of the workspaces in the project is `compendium`, which is responsible for managing the storybook stories for the SDKs.
To view storybook, run:
- `yarn storybook:react` (React-based stories)
- `yarn storybook:vue` (Vue-based stories)
Keeping `compendium` up-to-date is crucial and should be continuously referenced during the course of development.
### Versioning
We use [semver](https://semver.org/) (semantic versioning) for our versioning system.
### Publishing
A GitHub action is set up to handle publishing to NPM. `lerna.json` is the source of truth for our versioning system.
To publish:
1. From the `development` branch, create a new branch called `version-x.x.x`.
2. Push this branch upstream.
3. Update CHANGELOG.md with the changes for this version.
4. Run `yarn create-version` and follow the prompts to select a major, minor, or patch version. The script will automatically increment the yarn workspace package's version numbers and push a commit to your branch.
5. On GitHub, pull request to merge the changes up to main: `version-x.x.x` -> `development`, and then `development` -> `main`.
6. When `development` is merged into `main`, the action will run, which will publish the changes to npm.
## Project Structure
### Core Package
- `javascript-sdk` is the core package containing both the shared business logic (SearchcraftCore class) AND the Stencil web components
- The other SDKs (react-sdk, vue-sdk) consume @searchcraft/javascript-sdk
### Stencil Web Components
The stencil web components (`javascript-sdk`) serve as the base UI package for all the other framework SDKs. The components for other frameworks are generated by the stencil build. Output targets are specified by `stencil.config.ts`. The `javascript-sdk` can be thought of as the `core-ui` package.
## Issues
Please file issues in the [Searchcraft Issues](https://github.com/searchcraft-inc/searchcraft-issues) repository.