Git Product home page Git Product logo

sphinx-tribes's Introduction

sphinx-tribes

Tribes

Decentralized message broker for public groups in Sphinx. Anyone can run a sphinx-tribes server, to route group messages.

sphinx-tribes clients can be sphinx-relay nodes, apps, websites, or IoT devices.

How

sphinx-tribes is an MQTT broker that any node can subscribe to. Message topics always have two parts: {receiverPubKey}/{groupUUID}. Only the owner of the group is allowed to publish to it: all messages from group members must be submitted to the owner as an Lightning keysend payment. The group uuid is a timestamp signed by the owner.

Tribes

Authentication

Authentication is handled by sphinx-auth

build

docker build --no-cache -t sphinx-tribes .

docker tag sphinx-tribes sphinxlightning/sphinx-tribes:x

docker push sphinxlightning/sphinx-tribes:x

run against sphinx-stack

To run tribes frontend locally, use these ports:

  • tribes: yarn start:tribes:docker (localhost:23000)
  • people: yarn start:people:docker (localhost:23007)

Run frontend locally against people.sphinx.chat

If you would like to run just the frontend do the following

line 10 in frontend/app/src/config/ModeDispatcher.tsx change 'localhost:3000': Mode.TRIBES -> 'localhost:3000': Mode.COMMUNITY

line 5 in frontend/app/src/config/host.ts return "people.sphinx.chat"

Run Golang backemd

  • Create a .env file and populate the env file with thgitese variables
    TEST_MODE=true
    PORT=  // Server PORT
    DATABASE_URL= // Database URL
    TEST_ASSET_URL= // Test asset URL
  • Build the application by running go build .
  • Run the application with ./sphinx-tribes

Run Golang backend with local database

  • Create a Postgres database
  • Copy the table creation queries from tribes.sql file, and create the tables in the database created
  • Create a .env file and populate the .env files with these variables
    RDS_HOSTNAME =
    RDS_PORT =
    RDS_DB_NAME =
    RDS_USERNAME =
    RDS_PASSWORD =
  • Build and run the Golang server

Run Test

    go test ./...

Enable Relay

If you would like to enable Relay for invoice creation and keysend payment add the relay env key and values to the .env file

    RELAY_URL=
    RELAY_AUTH_KEY=

Enable Meme Image Upload

If you would like to enable Meme image upload for organization's add the meme env key and value to the .env file, Meme image upload works with Relay enabled, so a running Relay is required for Meme to work.

    MEME_URL=

For Contributions

Read the contribution doc here

Stakwork Youtube vidoes download for tribes feed

If you would like to enable Stakwork jobs for Youtube videos download add the Stakwork env key and values to the .env file

    STAKWORK_KEY=

sphinx-tribes's People

Contributors

amitpaliwal-rs avatar bilthon avatar cosmicpotato137 avatar deeksharungta avatar divyank-aggarwal avatar dranoid avatar dylanbathurst avatar ecurrencyhodler avatar elraphty avatar evanfeenstra avatar jeezman avatar kevkevinpal avatar maradondt avatar marvel-ib avatar nebojsatomic avatar omoniyi24 avatar pitoi avatar plell avatar rassl avatar tobi-bams avatar vividhpandey003 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.