- Notifications
You must be signed in to change notification settings - Fork26
klask.dev is an open source search engine for source code, live demo
License
klask-dev/klask-dev
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
| Branch | Build | Coverage |
|---|---|---|
| master |
Klask is a modern, high-performance search engine for source code. Built with Rust and React, it provides fast, accurate code search across multiple Git repositories with advanced filtering and syntax highlighting.
The latest version of Klask uses cutting-edge technologies for performance and developer experience:
- Rust - High-performance, memory-safe systems programming
- Axum - Modern async web framework
- Tantivy - Full-text search engine (Rust equivalent of Lucene)
- PostgreSQL - Robust relational database
- SQLx - Compile-time SQL verification
- React 18 - Modern UI library with concurrent features
- TypeScript - Type-safe JavaScript
- Vite - Lightning-fast build tool
- TailwindCSS - Utility-first CSS framework
- React Query - Powerful data fetching and caching
- ✅ Multi-repository indexing (Git, GitLab, GitHub)
- ✅ Real-time full-text search with Tantivy
- ✅ JWT-based authentication
- ✅ Syntax highlighting for 100+ languages
- ✅ Advanced filtering (branches, projects, file types)
- ✅ Scheduled auto-crawling with cron
- ✅ Admin dashboard with metrics
- ✅ Docker and Kubernetes ready
The fastest way to run Klask locally:
# Clone the repositorygit clone https://github.com/klask-dev/klask-dev.gitcd klask-dev# Start all services with docker-composedocker-compose up -d# Access Klask at http://localhost:5173# Backend API at http://localhost:3000
Seedocker-compose.yml for full configuration.
- Rust 1.70+ (install via rustup)
- Node.js 18+ and npm
- PostgreSQL 14+
- Docker (optional, for database)
# Using Docker (recommended)docker-compose -f docker-compose.dev.yml up -d# Or use your own PostgreSQL instance# Make sure to create a database named 'klask'
cd klask-rs# Install dependencies and run migrationscargo buildsqlx migrate run# Start the backend servercargo run --bin klask-rs# Backend will be available at http://localhost:3000
cd klask-react# Install dependenciesnpm install# Start the development servernpm run dev# Frontend will be available at http://localhost:5173
# Pull and start servicesdocker-compose up -d# View logsdocker-compose logs -f# Stop servicesdocker-compose down
# Backenddocker pull klask/klask-backend:latestdocker run -p 3000:3000 -e DATABASE_URL=postgres://... klask/klask-backend:latest# Frontenddocker pull klask/klask-frontend:latestdocker run -p 5173:80 klask/klask-frontend:latest
# Add Klask Helm repository (if available)helm repo add klask https://charts.klask.devhelm repo update# Install with default valueshelm install klask klask/klask# Install with custom valueshelm install klask klask/klask -f my-values.yaml
Create avalues.yaml:
backend:replicaCount:2image:repository:klask/klask-backendtag:"2.1.0"resources:requests:memory:"512Mi"cpu:"500m"limits:memory:"1Gi"cpu:"1000m"frontend:replicaCount:2image:repository:klask/klask-frontendtag:"2.1.0"postgresql:enabled:trueauth:username:klaskpassword:changemedatabase:klaskingress:enabled:trueclassName:nginxhosts: -host:klask.example.compaths: -path:/pathType:Prefixtls: -secretName:klask-tlshosts: -klask.example.com
Then install:
helm install klask ./charts/klask -f values.yaml
See full Helm documentation:charts/klask/README.md
klask-dev/├── klask-rs/ # Rust backend (Axum + Tantivy + PostgreSQL)│ ├── src/│ │ ├── api/ # REST API endpoints│ │ ├── models/ # Database models│ │ ├── services/ # Business logic (crawler, search, etc.)│ │ └── repositories/ # Database queries│ ├── migrations/ # SQL migrations (SQLx)│ └── Cargo.toml│├── klask-react/ # React frontend (TypeScript + Vite + TailwindCSS)│ ├── src/│ │ ├── api/ # API client (React Query)│ │ ├── components/ # Reusable UI components│ │ ├── features/ # Feature modules (search, admin, etc.)│ │ └── hooks/ # Custom React hooks│ └── package.json│├── charts/klask/ # Helm chart for Kubernetes deployment├── .claude/ # AI-assisted development tools└── docker-compose.yml # Local development environment# Backend tests (Rust)cd klask-rscargotest# Frontend tests (React)cd klask-reactnpmtest# Integration testsnpm run test:integration
# Backendcd klask-rscargo build --release# Frontendcd klask-reactnpm run build# Docker imagesdocker build -t klask/klask-backend:latest -f klask-rs/Dockerfile.docker build -t klask/klask-frontend:latest -f klask-react/Dockerfile.
- Development Guide - Comprehensive guide for contributors
- Helm Deployment - Kubernetes deployment guide
- API Documentation - REST API reference
- Architecture - System architecture overview
Contributions are welcome! Please read ourcontributing guide before submitting pull requests.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests (
cargo test && npm test) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the Apache License 2.0 - see theLICENSE file for details.
- Website:klask.dev
- Documentation:docs.klask.dev
- Issue Tracker:GitHub Issues
- Discussions:GitHub Discussions
Built with powerful open-source technologies:
About
klask.dev is an open source search engine for source code, live demo
Topics
Resources
License
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.