An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

Searchcraft

vite-react-searchcraft-template



A minimal React + TypeScript template powered by Searchcraft – the developer-first vertical search engine.



Vite


React


TypeScript


Searchcraft SDK


ESLint


Node.js

## 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