Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

klask.dev is an open source search engine for source code, live demo

License

NotificationsYou must be signed in to change notification settings

klask-dev/klask-dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

klask.dev

BranchBuildCoverage
masterCI/CD PipelineCoverage Status

Docker

Docker StarsDocker pullsDocker build

What is Klask?

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.

🚀 Modern Architecture (v2.x)

The latest version of Klask uses cutting-edge technologies for performance and developer experience:

Backend

  • 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

Frontend

  • 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

Features

  • ✅ 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

📦 Quick Start

Local Development (Docker Compose)

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.

Manual Development Setup

Prerequisites

  • Rust 1.70+ (install via rustup)
  • Node.js 18+ and npm
  • PostgreSQL 14+
  • Docker (optional, for database)

1. Start PostgreSQL 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'

2. Start Backend (Rust)

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

3. Start Frontend (React)

cd klask-react# Install dependenciesnpm install# Start the development servernpm run dev# Frontend will be available at http://localhost:5173

🐳 Docker Deployment

Docker Compose (Production)

# Pull and start servicesdocker-compose up -d# View logsdocker-compose logs -f# Stop servicesdocker-compose down

Docker Images

# 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

☸️ Kubernetes Deployment (Helm)

Quick Install

# 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

Basic Configuration Example

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


🛠️ Development

Project Structure

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

Running Tests

# Backend tests (Rust)cd klask-rscargotest# Frontend tests (React)cd klask-reactnpmtest# Integration testsnpm run test:integration

Building for Production

# 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.

📚 Documentation


🤝 Contributing

Contributions are welcome! Please read ourcontributing guide before submitting pull requests.

Development Workflow

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run tests (cargo test && npm test)
  5. Commit your changes (git commit -m 'feat: add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

📄 License

This project is licensed under the Apache License 2.0 - see theLICENSE file for details.


🔗 Links


🙏 Acknowledgments

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

Stars

Watchers

Forks

Packages

 
 
 

Contributors4

  •  
  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp