Giter VIP home page Giter VIP logo

covenantforum's Introduction

CovenantForum is a simple decentralized forum web app powered by CovenantSQL.

Decentralized forum?

  • Data and files are saved in decentralized database. Anyone with a permission granted private key and the DSN(Database Serial Num) can serve the forum anywhere.
  • Also, all posts related data are saved on an unique SQLChain Block like this.
  • Anyone can create your "blockchain powered forum" with just few steps.

Features

  • Static files and database are powered by decentralized database: CovenantSQL.
  • REST API backend written in Go
  • Vue.js-based frontend
  • Social login (OAuth 2.0) via three providers:
    • Google
    • Facebook
    • Github
  • JSON Web Tokens (JWT) are used for user authentication in the API
  • Single binary deploy. All the static assets (frontend JavaScript & CSS files) are embedded into the binary
  • Markdown comments
  • Avatar upload, including animated GIFs. Auto-generated letter-avatars on user creation

Arch

Comparison between Traditional and Decentralized forum:

Demo

Demo forum

Quick Start

Just one command to start a mirror of Demo forum

$ go get -u github.com/CovenantSQL/CovenantForum/cmd/forum && \
    cd $GOPATH/src/github.com/CovenantSQL/CovenantForum/cmd/forum && \
    $GOPATH/bin/forum start

Create your new Forum

  • Generate a CovenantSQL config and keypair.

  • Get PTC by replying to the topic with your wallet address.

  • Create a new empty CovenantSQL database with cql.

  • Obtain OAuth 2.0 credentials (client_id and secret) from at least one of the providers (Google, Facebook, Github) so users can log into the web application. The OAuth callback url will be <base_url>/oauth/end/<provider>. The <base_url> is where the forum web app will be mounted on your site and the <provider> is the lowercase provider name. For example, if base_url is https://my.website.com/forum/, then the oauth callback url for google will be https://my.website.com/forum/oauth/end/google.

  • Download and compile the forum binary:

    $ go get -u github.com/CovenantSQL/CovenantForum/cmd/forum
    
  • Inside an empty directory run:

    $ forum init
    

    This will generate an initial configuration file "forum.conf" inside the current dir. Edit the configuration file to set the server listen address, the base url, the database and file storage parameters, OAuth credentials, etc.

  • Fill in file_storage and store in the forum.conf:

    file_storage {
      type = "covenant_s3"
      covenant_s3 {
        database  = "covenantsql://e08d944b4ebd69e12aa69..."
        config    = "config.yaml"
        masterkey = ""
      }
    }
    
    store {
      type = "covenantsql"
      covenantsql {
        database  = "covenantsql://e08d944b4ebd69e12aa69..."
        config    = "config.yaml"
        masterkey = ""
      }
    }
    
  • Run the following command to start the forum web server.

    $ forum start
    
  • Sign in into your web application using one of the social login providers. Then run the following command to grant admin privileges to your user.

    $ forum add-admin <your-username>
    

Screenshots

Topics

Topics

Comments on blockchain

Comments

Todo

  • Make creating new forum easier.
  • Grant low permission on forum database.
  • We are working on CovenantSQL.

License

  • CovenantForum is derived from a simple traditional forum disintegration/bebop, but CovenantForum has a totally different purpose. So, we just create a new project.

covenantforum's People

Contributors

disintegration avatar foreseaz avatar

Stargazers

Roman avatar

Watchers

Nouhoum TRAORE avatar James Cloos 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.