- TypeScript 63.7%
- Svelte 32%
- JavaScript 3.8%
- Dockerfile 0.4%
|
|
||
|---|---|---|
| .cursor | ||
| .forgejo/workflows | ||
| .vscode | ||
| drizzle | ||
| messages | ||
| project.inlang | ||
| scripts | ||
| src | ||
| static | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| .npmrc | ||
| .prettierignore | ||
| .prettierrc | ||
| AGENTS.md | ||
| CONTRIBUTING.md | ||
| docker-compose.prod.yml | ||
| docker-compose.yml | ||
| Dockerfile | ||
| drizzle.config.ts | ||
| eslint.config.js | ||
| LICENSE | ||
| package.json | ||
| playwright.config.ts | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| README.md | ||
| SECURITY.md | ||
| svelte.config.js | ||
| tsconfig.json | ||
| vite.config.ts | ||
🪁 Kite
Kite is a self-hosted file-sharing application built with SvelteKit and PostgreSQL (Drizzle ORM). It provides secure, link-based shares, share requests, admin controls, and an API for integrations.
Quick Overview
- Create password-protected, expiring share links with download limits.
- Upload files and folders (per-file progress, deduplication, ZIP download).
- Create and manage share requests where third parties can upload files.
- Authentication: email/password, optional passkeys, and anonymous flows.
- Admin UI: user management, branding, impersonation, and app settings.
- REST API with OpenAPI generation for external integrations.
Tech Stack
- SvelteKit (frontend & server routes)
- TailwindCSS + DaisyUI
- PostgreSQL + Drizzle ORM
- BullMQ + Redis (background jobs)
- OpenAPI (auto-generated)
- Vitest + Playwright for tests
Requirements
- Node.js (recommended v18+ or compatible with the repo tooling)
- pnpm (or npm/yarn) for installing dependencies
- Docker & Docker Compose (recommended for local DB/Redis in development)
Local Development (fast start)
-
Install dependencies:
pnpm install -
Copy environment sample and set values (create
.env):cp .env.example .env # edit .env for DB, REDIS, DRIZZLE_GATEWAY, etc. -
Start local DB services with Docker (recommended):
./scripts/start-local-db.sh # optional helper script -
Run the app in dev mode:
pnpm dev
The site will be available at http://localhost:5173 (or the port vite reports).
Database & Migrations
-
Migrations are managed with
drizzle-kit. Migration files live in thedrizzle/folder. -
Common commands (see
package.jsonscripts):pnpm run db:migrate— run migrationspnpm run db:generate— generate migration from schemapnpm run db:push— push schema changes
The app runs scripts/migrate.mjs during container startup when applicable.
Running in Docker
-
Development infra only (Postgres + Redis):
docker compose up -d -
Production env setup:
cp .env.prod.example .env # edit .env and replace all CHANGE_ME_* values before first start -
Production stack (app + db + redis):
docker compose -f docker-compose.prod.yml up --build -d -
Production stack with worker:
docker compose -f docker-compose.prod.yml --profile worker up --build -d
Notes:
docker-compose.ymlis now development-only (DB + Redis).docker-compose.prod.ymlis the production stack.- Drizzle Gateway in production compose is opt-in via
--profile opsand requiresDRIZZLE_GATEWAY_MASTERPASS. - Gateway defaults to
http://localhost:4983(override withDRIZZLE_GATEWAY_PORT). - Required prod vars include:
DATABASE_URL,ORIGIN, andPOSTGRES_PASSWORD.
Scripts
Key scripts are exposed in package.json:
pnpm dev— start dev server (Vite + SvelteKit)pnpm build— build for productionpnpm start— run built apppnpm test— run unit & e2e tests (vitest+playwright)pnpm run openapi:generate— regenerate OpenAPI specpnpm run worker— start the background worker processpnpm run prod:up— start production compose stackpnpm run prod:up:worker— start production compose stack with worker profile
Testing
- Unit tests:
pnpm run test:unit - End-to-end:
pnpm run test:e2e(requires Playwright and browsers installed)
OpenAPI
The project generates an OpenAPI spec (see scripts/generate-openapi.mjs). The generated spec is available under static/openapi.json and build/client/openapi.json after build.
Contributing
- Follow the existing code style (Prettier + ESLint + Tailwind order plugin).
- Run
pnpm formatandpnpm lintbefore submitting PRs.
Troubleshooting
- If migrations fail, inspect
drizzle/and the migration logs fromscripts/migrate.mjs. - Use
docker compose logsto inspect services (db, redis, worker).