Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/kagisearch/kite-public/llms.txt

Use this file to discover all available pages before exploring further.

Kagi News is a SvelteKit application configured with the @sveltejs/adapter-node adapter, which means it compiles to a self-contained Node.js server you can run anywhere. The front-end itself is stateless — it fetches all news data at request time from the Kagi-operated API at https://kite.kagi.com — so deployment is straightforward and requires no database or server-side storage. You can also target fully static hosts (Netlify, Vercel, GitHub Pages) by switching to a static adapter in svelte.config.js.

Architecture Overview

┌───────────────────────────────────────┐
│         Browser / Client              │
└──────────────┬────────────────────────┘
               │ HTTP
┌──────────────▼────────────────────────┐
│    SvelteKit App  (build/ directory)  │
│    Node adapter  — npm run start      │
└──────────────┬────────────────────────┘
               │ HTTPS (VITE_BASE_PATH)
┌──────────────▼────────────────────────┐
│        kite.kagi.com  (Kagi API)      │
│  /kite.json  •  /static/*             │
└───────────────────────────────────────┘
The two environment variables VITE_BASE_PATH and VITE_STATIC_PATH tell the app where to fetch data and assets. Both are baked into the bundle at build time by Vite, so changing them always requires a rebuild.

Deployment Steps

1

Clone the Repository and Install Dependencies

git clone https://github.com/kagisearch/kite-public.git
cd kite-public
npm install
Ensure you are using Node.js LTS (node -v). All other dependencies are managed by npm.
2

Configure Environment Variables

Copy or edit the .env file in the project root. The defaults point at the official Kagi News data API:
.env
VITE_BASE_PATH=https://kite.kagi.com
VITE_STATIC_PATH=https://kite.kagi.com/static
VariableDefaultDescription
VITE_BASE_PATHhttps://kite.kagi.comBase URL for the Kagi News data API — the app fetches kite.json and story files relative to this path
VITE_STATIC_PATHhttps://kite.kagi.com/staticURL for static assets such as publisher logos and images
If you are building against a different data source or a locally mirrored copy of the API, update these values before running npm run build.
kite.json and all files referenced by it are served from kite.kagi.com and are licensed under CC BY-NC 4.0. Attribution is required, and the data may only be used for non-commercial purposes under the terms of that license.
3

Build for Production

Compile the application into the build/ directory:
npm run build
This runs vite build, which invokes the SvelteKit adapter. The Node adapter (@sveltejs/adapter-node) packages everything needed to run a production Node.js server into build/.Optionally, verify the build locally before deploying:
npm run preview
4

Serve the Application

Start the compiled Node.js server directly:
npm run start
This runs node build, launching the production server. By default it listens on PORT (environment variable) or 3000. You can front it with any reverse proxy (nginx, Caddy, etc.).

Static Hosting (Netlify, Vercel, GitHub Pages, etc.)

For purely static deployments you will need to switch the SvelteKit adapter to a static adapter (e.g. @sveltejs/adapter-static) in svelte.config.js. Once configured, the build/ output can be deployed directly to any CDN or static host.Refer to the Vite static deploy guide for platform-specific instructions covering Netlify, Vercel, GitHub Pages, Cloudflare Pages, and others.
Commercial use of the news data served from kite.kagi.com is not permitted under the default CC BY-NC 4.0 license. If you intend to use Kagi News data in a commercial product or service, you must obtain a separate commercial license. Contact support@kagi.com to discuss licensing options.

Available npm Scripts

The full set of scripts defined in package.json:
ScriptCommandDescription
devvite devStart the Vite development server with HMR at localhost:5173
buildvite buildCompile a production build into build/
previewvite previewPreview the production build locally
startnode buildStart the compiled Node.js production server
checksvelte-kit sync && svelte-checkSync generated types and run full TypeScript diagnostics
testvitestRun the Vitest test suite in watch mode
test:allvitest runRun the full test suite once (CI-friendly)
lintbiome lint .Lint all source files with Biome
formatbiome format --write .Auto-format all source files with Biome

Environment Variable Reference

VariableDefaultDescription
VITE_BASE_PATHhttps://kite.kagi.comBase URL for the Kagi News data API
VITE_STATIC_PATHhttps://kite.kagi.com/staticURL for static assets (logos, images)
Both variables are prefixed with VITE_ so that Vite exposes them to client-side code at build time. They must be set before running npm run build — changing them in .env after the fact has no effect on an already-compiled bundle.

Configuration Files

FilePurpose
svelte.config.jsSvelteKit config — adapter selection, CSRF trusted origins
vite.config.tsVite config — plugins (SvelteKit, Tailwind CSS), Vitest resolver
.envProduction environment variables (VITE_BASE_PATH, VITE_STATIC_PATH)
.env.developmentDevelopment overrides — sets VITE_BASE_PATH to /backend/prod for local data

Next Steps

Quickstart

Run Kagi News locally in development mode in under five minutes.

Contributing Feeds

Add RSS sources and new community categories to the feed index.

Build docs developers (and LLMs) love