SQLessForum

module
v0.0.0-...-6e8831f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2020 License: MIT

README

SQLessForum

A simple decentralized forum powered by SQLess.

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.

Features

  • Static files and database are powered by decentralized database: SQLess.
  • 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

Screenshots

Topics

Create your new Forum

  1. Download and compile the forum binary:
$ go get -u  github.com/SQLess/SQLessForum/cmd/forum
  1. 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.

  1. 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 = ""
  }
}
  1. Run the following command to start the forum web server.
$ forum start
  1. 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>

License

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

Directories

Path Synopsis
Package api provides an HTTP handler that handles the forum REST API requests.
Package api provides an HTTP handler that handles the forum REST API requests.
Package avatar provides a service that manages forum user avatars.
Package avatar provides a service that manages forum user avatars.
cmd
forum
CovenantSQL is a simple discussion board / forum web application.
CovenantSQL is a simple discussion board / forum web application.
Package config provides the forum configuration file structure, initialization and reading.
Package config provides the forum configuration file structure, initialization and reading.
Package filestorage provides a file storage service that manages public web app files e.g.
Package filestorage provides a file storage service that manages public web app files e.g.
Package jwt provides a service to create and verify JWT auth tokens for the forum web app.
Package jwt provides a service to create and verify JWT auth tokens for the forum web app.
Package oauth provides an HTTP handler to handle OAuth2 redirect and callback requests for the bebop web app.
Package oauth provides an HTTP handler to handle OAuth2 redirect and callback requests for the bebop web app.
Package static provides http handlers for serving static files from the embedded filesystem or from a local directory.
Package static provides http handlers for serving static files from the embedded filesystem or from a local directory.
Package store provides a forum data store interface.
Package store provides a forum data store interface.
covenantsql
Package covenantsql provides a CovenantSQL implementation of the forum data store interface.
Package covenantsql provides a CovenantSQL implementation of the forum data store interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL