Skip to content

Repository files navigation

Hexn - Personal & Independent Search Engine

Nuxt Nuxt Content DaisyUI License: MIT

Hexn is an open-source search project for building your own independent, privacy-focused search experience.

Index Screenshot

Live Demo

Deploy on Cloudflare Workers Hexn v1 deployed on Cloudflare : [hexnsearch.alihdtech.workers.dev].

Deploy on Vercel Hexn v2 on Vercel : hexn.vercel.app.

Overview

  • Nuxt 3, Vue 3, Tailwind CSS, DaisyUI
  • Nuxt Content for topic pages with Custom weighted search from content/search-data.json

Quick Start

Prerequisites

  • Node.js 18+
  • pnpm (recommended) or npm

Install and run

git clone https://github.com/alihd-tech/hexn.git
cd hexn
pnpm install
pnpm dev

Open http://localhost:3000.

Build and preview

pnpm build
pnpm preview

Project Structure

hexn/
├── app.vue
├── nuxt.config.ts
├── assets/css/main.css
├── components/
├── composables/useContentSearch.js
├── content/
│   ├── search-data.json
│   └── topics/
├── pages/
│   ├── index.vue
│   ├── search.vue
│   └── topics/[slug].vue
└── public/

How It Works

  • Routes are file-based from pages/
  • Topic content lives in content/topics/*.md
  • Search results are loaded and scored on the client from content/search-data.json

For larger datasets, move search to a Nitro API route under server/api/ and keep the UI unchanged.

Search architecture diagrams

Current architecture (client-side index search)

flowchart LR
    A[User enters query in pages/search.vue]
    B[useContentSearch.js]
    C[Load content/search-data.json]
    D[Weighted scoring and filtering]
    E[Sorted top results]
    F[Search scope components render results]

    A --> B --> C --> D --> E --> F
Loading

Scaled architecture (API/server-side search)

flowchart LR
    A[User enters query in UI]
    B[Client calls /api/search]
    C[Nitro handler in server/api/search.ts]
    D[(Search backend: DB / Elasticsearch / SaaS)]
    E[Ranked and paginated response]
    F[UI renders results + filters]

    A --> B --> C --> D --> C --> E --> F
Loading

Extend the Project

  • Add new pages in pages/
  • Add new topic articles in content/topics/
  • Expand search records in content/search-data.json
  • Add shared logic in composables/
  • Add reusable UI in components/

License

This project is licensed under the MIT License.

Overview Screenshot

About

A Search project for building your own independent, privacy-focused search engine.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages