Kagi News is a SvelteKit application configured with theDocumentation 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.
@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
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
Clone the Repository and Install Dependencies
node -v). All other dependencies are managed by npm.Configure Environment Variables
Copy or edit the
If you are building against a different data source or a locally mirrored copy of the API, update these values before running
.env file in the project root. The defaults point at the official Kagi News data API:.env
| Variable | Default | Description |
|---|---|---|
VITE_BASE_PATH | https://kite.kagi.com | Base URL for the Kagi News data API — the app fetches kite.json and story files relative to this path |
VITE_STATIC_PATH | https://kite.kagi.com/static | URL for static assets such as publisher logos and images |
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.Build for Production
Compile the application into the This runs
build/ directory: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:Serve the Application
Node.js Server (recommended)
Start the compiled Node.js server directly: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.Available npm Scripts
The full set of scripts defined inpackage.json:
| Script | Command | Description |
|---|---|---|
dev | vite dev | Start the Vite development server with HMR at localhost:5173 |
build | vite build | Compile a production build into build/ |
preview | vite preview | Preview the production build locally |
start | node build | Start the compiled Node.js production server |
check | svelte-kit sync && svelte-check | Sync generated types and run full TypeScript diagnostics |
test | vitest | Run the Vitest test suite in watch mode |
test:all | vitest run | Run the full test suite once (CI-friendly) |
lint | biome lint . | Lint all source files with Biome |
format | biome format --write . | Auto-format all source files with Biome |
Environment Variable Reference
| Variable | Default | Description |
|---|---|---|
VITE_BASE_PATH | https://kite.kagi.com | Base URL for the Kagi News data API |
VITE_STATIC_PATH | https://kite.kagi.com/static | URL for static assets (logos, images) |
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
| File | Purpose |
|---|---|
svelte.config.js | SvelteKit config — adapter selection, CSRF trusted origins |
vite.config.ts | Vite config — plugins (SvelteKit, Tailwind CSS), Vitest resolver |
.env | Production environment variables (VITE_BASE_PATH, VITE_STATIC_PATH) |
.env.development | Development 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.