2018-04-19 22:52:05 +02:00
# Lighthouse - A lightning fast search for the LBRY blockchain
2018-04-19 22:53:10 +02:00
2018-07-25 19:38:21 +02:00
[![Codacy Badge ](https://api.codacy.com/project/badge/Grade/c73f0c5eba1f4389894d0a0fdd31486f )](https://app.codacy.com/app/fillerix/lighthouse?utm_source=github.com& utm_medium=referral& utm_content=lbryio/lighthouse& utm_campaign=badger)
2018-10-27 08:52:44 +02:00
[![MIT licensed ](https://img.shields.io/dub/l/vibe-d.svg?style=flat )](https://github.com/lbryio/lighthouse/blob/master/LICENSE)
2018-07-25 19:38:21 +02:00
2018-04-19 22:53:10 +02:00
Lighthouse is a lightning-fast advanced search engine API for publications on the lbrycrd with autocomplete capabilities.
2019-07-08 20:00:10 +02:00
The official lighthouse instance is live at https://lighthouse.lbry.com
2017-08-15 22:51:28 +02:00
2018-04-19 22:52:05 +02:00
### What does Lighthouse consist of?
2018-04-19 22:53:10 +02:00
1. Elasticsearch as a backend db server.
2. LBRYimport, an importer that imports the claims into the Elasticsearch database.
3. Lighthouse API server, which serves the API and does all calculations about what to send to the end user.
2019-02-05 11:10:25 +01:00
### API Documentation / Usage example
To make a simple search by string:
```
2019-07-08 20:00:10 +02:00
https://lighthouse.lbry.com/search?s=stringtosearch
2019-02-05 11:10:25 +01:00
```
To get autocomplete suggestions:
```
2019-07-08 20:00:10 +02:00
https://lighthouse.lbry.com/autocomplete?s=stringtocomp
2019-02-05 11:10:25 +01:00
```
2017-10-10 14:42:42 +02:00
[The full API documentation ](https://lbryio.github.io/lighthouse/ )
2017-08-16 19:49:27 +02:00
2018-04-19 22:52:05 +02:00
## Installation
2017-10-16 22:26:13 +02:00
### Prerequisites
2018-10-30 09:22:24 +01:00
* [Node v8 ](https://nodejs.org/en/download/ )
* [Yarn ](https://yarnpkg.com/en/docs/install )
2017-10-16 22:26:13 +02:00
* [Elasticsearch ](https://www.elastic.co/downloads/elasticsearch )
>To get started you should clone the git:
2017-08-16 19:49:27 +02:00
```
2017-10-16 22:26:13 +02:00
git clone https://github.com/lbryio/lighthouse
2017-08-16 19:49:27 +02:00
```
2017-12-19 22:41:11 +01:00
>Make sure elasticsearch is running and run (from the lighthouse dir):
2017-08-16 19:49:27 +02:00
```
2017-10-16 22:26:13 +02:00
./gendb.sh
2017-08-16 19:49:27 +02:00
```
2017-10-16 22:26:13 +02:00
>Install dependencies:
2017-08-16 19:49:27 +02:00
```
2019-07-08 20:00:10 +02:00
npm run install --production=false
2017-08-16 19:49:27 +02:00
```
2017-10-16 22:26:13 +02:00
>Build and run Lighthouse:
```
2019-07-08 20:00:10 +02:00
npm run prod
2017-10-16 22:26:13 +02:00
```
2018-04-19 22:52:05 +02:00
>You are now up and running! You can connect to lighthouse at http://localhost:50005, api documentation is [here ](https://lbryio.github.io/lighthouse/ ).
Lighthouse will continue syncing in the background. It usually takes ~15 minutes before all claims are up to date in the database.
## Contributing
2019-07-08 20:00:10 +02:00
Contributions to this project are welcome, encouraged, and compensated. For more details, see [lbry.com/faq/contributing ](https://lbry.com/faq/contributing )
2017-08-16 19:49:27 +02:00
## License
2018-04-19 22:52:05 +02:00
This project is MIT Licensed © [LBRYio, Filip Nyquist ](https://github.com/lbryio )
2018-07-30 15:33:33 +02:00
## Security
2019-07-08 20:00:10 +02:00
We take security seriously. Please contact security@lbry.com regarding any security issues. Our PGP key is [here ](https://keybase.io/lbry/key.asc ) if you need it.
2018-07-30 15:33:33 +02:00
2018-04-19 22:52:05 +02:00
## Contact
2019-07-08 20:00:10 +02:00
The primary contact for this project is [@tiger5226 ](https://github.com/tiger5226 ) (beamer@lbry.com)