lbryio / spee.ch

An image hosting service on top of the LBRY protocol.
https://spee.ch
MIT License
186 stars 78 forks source link
blockchain lbry mysql nodejs

Spee.ch

spee.ch provides a user-friendly, custom-designed, image and video hosting site backed by a decentralized network and blockchain (LBRY). Via just a small set of config files, you can spin your an entire spee.ch site back up including assets.

Please note: the spee.ch code base and setup instructions are no longer actively maintained now that we have lbry.tv. Proceed at your own caution. Setup will require dev ops skills.

App GIF

For a completely open, unrestricted example of a spee.ch site, check out https://www.spee.ch.

For a closed, custom-hosted and branded example, check out https://lbry.theantimedia.com/.

Installation

Ubuntu Step-by-Step

Step-by-step Ubuntu Install Guide

Full Instructions

Get some information ready:

Install and Set Up Dependencies

Clone spee.ch

$ git clone -b release https://github.com/lbryio/spee.ch.git
$ git clone https://github.com/lbryio/spee.ch.git

Change directory into your project

$ cd spee.ch

Install node dependencies

$ npm install

Create the config files using the built-in CLI

Make sure lbrynet is running in the background before proceeding.

note: If you are opt to run a local chainquery, such as from lbry-docker/chainquery you will need to specify connection details at this time in: ~/spee.ch/docs/setup/conf/speech/chainqueryConfig.json

$ npm run configure

Build & start the app

$ npm run build

$ npm run start

View in browser

Customize your app

Check out the customization guide to change your app's appearance and components

(optional) add custom components and update the styles

(optional) install your own chainquery

Instructions are coming at [lbry-docker] to install your own chainquery instance using docker-compose. This will require 50GB of preferably SSD space and at least 10 minutes to download, possibly much longer.

Settings

There are a number of settings available for customizing the behavior of your installation.
Here is some documentation on them.

API

/api/claim/publish

method: POST

example:

curl -F 'name=MyPictureName' -F 'file=@/path/to/myPicture.jpeg' https://spee.ch/api/claim/publish

Parameters:

response:

{
    "success": <bool>,
    "message": <string>,
    "data": {
        "name": <string>,
        "claimId": <string>,
        "url": <string>,
        "showUrl": <string>,
        "serveUrl": <string>,
        "lbryTx": {
            "claim_address": <string>,
            "claim_id": <string>,
            "fee": <number>,
            "nout": <number>,
            "tx": <string>,
            "value": <number>
        }
    }
}

/api/claim/availability/:name

method: GET

example:

curl https://spee.ch/api/claim/availability/doitlive

response:

{
    "success": <bool>,  // `true` if spee.ch successfully checked the claim availability
    "data": <bool>, // `true` if claim is available, false if it is not available
    "message": <string> // human readable message of whether claim was available or not
}

Contribute

Stack

The spee.ch stack is MySQL, Express.js, Node.js, and React.js. Spee.ch also runs lbrynet on its server, and it uses the lbrynet API to make requests -- such as publish, create_channel, and get -- on the LBRY network.

Spee.ch also runs a sync tool, which decodes blocks from the LBRY blockchain as they are mined, and stores the information in MySQL. It stores all claims in the Claims table, and all channel claims in the Certificates table.

Architecture

Tests

URL formats

Spee.ch has a few types of URL formats that return different assets from the LBRY network. Below is a list of all possible URLs for the content on spee.ch. You can learn more about LBRY URLs here.

Dependencies

Spee.ch depends on two other lbry technologies:

Bugs

If you find a bug or experience a problem, please report your issue here on GitHub and find us in the lbry discord!

License

This project is MIT licensed. For the full license, see LICENSE.

Security

We take security seriously. Please contact security@lbry.com regarding any security issues. Our GPG key is here if you need it.

Contact

The primary contact for this project is @jessopb.