Giter Club home page Giter Club logo

kooder's Introduction

Intro

Kooder is an open source code search project, offering code, repositories and issues search service for code hosting platforms including Gitee, GitLab and Gitea.

UI

Kooder ScreenShot

There are two modules, gateway and indexer. Gateway is integrated inside gateway under default config.

Gateway:

  • Accept index tasks from HTTP requests and put them in the queue after examing it
  • Accept search requests and return their results back to the client

Indexer:

  • Monitor the index tasks inside the queue
  • Update these add, delete and update index tasks back to the index library

Modules

  • core Core object and public class
  • gateway Accept index and search requests from HTTP requests
  • indexer A service to construct, update and delete index

Logic Flow

Kooder Flow

Install source code

1.Dependencies

  • openjdk >= 8
  • maven > 3

2.Download source code

$ git clone https://gitee.com/koode/kooder.git
$ cd kooder

Configuration

Config file: core/src/main/resources/kooder.properties

Config kooder's url http.url. It will be injected into Git service as the webhook URL, must be accessible for Git service, such as:

http.url = http://<kooder-host>:8080

Click here to see more config options configuration.md

Install Docker

Dependencies

  • docker-ce environment
  • docker-compose

After cloning this repo, in a machine with docker compose installed, run the following command:

### Run containers in the background
docker-compose up -d 

### Stop and remove containers
docker-compose down

This is how it will look like:

Kooder docker-ha

After modifing the config file core/src/main/resources/kooder.properties, run the following commands; delete local kooder image and rebuid it.

docker-compose down
docker-compose up -d

version:March 2021

The mirror remains active and updated, always ensuring the latest version

Use it in Gitlab

Config following properties:

http.startup.tasks = indexer,gitlab
gitlab.url = http://gitlab-host:gitlab-port/  
gitlab.personal_access_token = <root user personal access token>  
git.username = root  
git.password =  

Kooder will use access token as the password if you don't offer one.

Use it in Gitee

Config following properties:

http.startup.tasks = indexer,gitee
gitee.url = https://gitee.com/  
gitee.personal_access_token = <root user personal access token>  
git.username = root  
git.password =  

Kooder will use access token as the password if you don't offer one.

Use it in Gitea

1.Site Administration

2.Add Gitea Webhook

3.Set up Webhook

  • Set Target URL to http://kooder-ip:kooder-port/gitea
  • Set POST Content Type to POST + application/json
  • CheckAll Event or Custom Events for the Trigger On option. ( If you choose Custom Events, you need to check Repo, Push and Issue)

2.Config following properties.

http.startup.tasks = indexer,gitea
gitea.secret_token = <webhook secret token>
gitea.url = http://gitea-ip:prot/
gitea.personal_access_token = <admin user personal access token>
git.username = <admin username>
git.password = <admin password>

Index repository from file

Config kooder.properties

//Enable index repository from file

http.startup.tasks = indexer,file  //Add file field

file.index.path = C:/Documents/Kooder/file.txt	 //Config file path of file.txt

Content of file.txt

// Add repositories URL
http://gitee.com/koode/kooder.git
https://gitee.com/ld/J2Cache.git
...

Build and Run

$ cd Kooder
$ mvn install
### Run gateway
$ bin/gateway.sh
### Brower visits http://localhost:8080

kooder's People

Contributors

gitoschina avatar hujianli94 avatar tenngoxars avatar cranberryyam avatar jaxwyz avatar huixisheng avatar jacksonluang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.