https://github.com/searchcraft-inc/vite-react-searchcraft-template
Provides a minimal Vite + React + Searchcraft starter template.
https://github.com/searchcraft-inc/vite-react-searchcraft-template
ai api database elasticsearch enterprise-search full-text-search fuzzy-search react search search-as-you-type search-engine searchcraft site-search typescript typo-tolerance vite vite-react-typescript vite-starter vite-template
Last synced: 5 months ago
JSON representation
Provides a minimal Vite + React + Searchcraft starter template.
- Host: GitHub
- URL: https://github.com/searchcraft-inc/vite-react-searchcraft-template
- Owner: searchcraft-inc
- License: apache-2.0
- Created: 2025-05-20T16:57:48.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-12-28T11:33:44.000Z (6 months ago)
- Last Synced: 2025-12-30T22:12:55.454Z (6 months ago)
- Topics: ai, api, database, elasticsearch, enterprise-search, full-text-search, fuzzy-search, react, search, search-as-you-type, search-engine, searchcraft, site-search, typescript, typo-tolerance, vite, vite-react-typescript, vite-starter, vite-template
- Language: TypeScript
- Homepage: https://searchcraft.io
- Size: 1.36 MB
- Stars: 5
- Watchers: 4
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
vite-react-searchcraft-template
A minimal React + TypeScript template powered by Searchcraft β the developer-first vertical search engine.
## Table of Contents
- [Purpose](#purpose)
- [Features](#features)
- [π§° Template Features](#-template-features)
- [π Searchcraft SDK Features](#-searchcraft-sdk-features)
- [Getting Started](#getting-started)
- [Available Scripts](#available-scripts)
- [Requirements](#requirements)
- [Resources](#resources)
- [License](#license)
## Purpose
Modern apps need fast, relevant, typo-tolerant search β but building it from scratch or with legacy tools is expensive, complex, and backend-heavy. Thatβs where **[Searchcraft](https://searchcraft.io)** comes in: a zero-config, front-end focused vertical search engine built to drop into your product in minutes.
This template exists to make that even easier. It provides:
- A minimal but complete **Vite + React + TypeScript** frontend, bootstrapped with `npm create vite@latest`
- Out-of-the-box **Searchcraft SDK integration**
- Clean environment variable config and instant dev startup
Whether you're building search for a publisher, SaaS app, ecommerce experience, or anything content-heavy β this gets you from zero to search fast.
## Features
### π§° Template Features
- βοΈ **React 19 + TypeScript** β The latest versions for modern development
- β‘ **Vite 6** β Lightning-fast builds, HMR, and DX
- π§ͺ **Minimal boilerplate** β Just enough structure to get started
- π **Environment-based configuration** β No hardcoded secrets
- β
**ESLint 9** β Preconfigured for code quality
### π Searchcraft SDK Features
- π **Typo-tolerant, relevance-tuned search** with zero backend setup
- π§© **Built-in UI components** for search inputs, result lists, and pagination
- π§ **Smart ranking** with support for field weighting, stopwords, and synonyms
- π **Analytics-ready** with built-in hooks for usage insights via [Vektron](https://vektron.searchcraft.io)
- π°οΈ **Fully managed** β No need to stand up infrastructure
## Getting Started
You can either click "[Use this template](https://github.com/searchcraft-inc/vite-react-searchcraft-template/generate)" on GitHub, or use `degit` from the command line:
```
npx degit searchcraft-inc/vite-react-searchcraft-template
```
Install dependencies:
```
yarn
```
Then, add a `.env` file in the root of your project with your Searchcraft credentials, which can be found in your [Searchcraft Vektron Dashboard](https://vektron.searchcraft.io):
```
VITE_ENDPOINT_URL=
VITE_INDEX_NAME=
VITE_READ_KEY=
```
Run the app in development mode:
```
yarn dev
```
## Available Scripts
This project includes a few helpful npm/yarn scripts to streamline development:
| Command | Description |
|-----------------|--------------------------------------------------------------|
| `yarn dev` | Starts the Vite development server with hot module reload. |
| `yarn build` | Builds the project using TypeScript and Vite for production. |
| `yarn preview` | Serves the production build locally. |
| `yarn lint` | Runs ESLint across the codebase to catch errors and bad patterns. |
## Requirements
- [Node.js](https://nodejs.org/) v18+
- [Yarn](https://yarnpkg.com/) (or npm)
- A [Searchcraft](https://searchcraft.io) account with a configured index
## Resources
- π [Searchcraft Docs](https://docs.searchcraft.io)
- π°οΈ [Vektron Dashboard](https://vektron.searchcraft.io)
- π¬ [Searchcraft Discord](https://discord.gg/RQnGD63qWw)
- π§ [Searchcraft Reddit](https://www.reddit.com/r/searchcraft/)
- π§ͺ [Searchcraft SDK on npm](https://www.npmjs.com/package/@searchcraft/react-sdk)
## License
Licensed under the [Apache 2.0 License](LICENSE).
Built with π°οΈ by the Searchcraft team