Coder Social home page Coder Social logo

filipradicevic / tolstoy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from goloschain/tolstoy

0.0 0.0 0.0 9.86 MB

Golos Blockchain Social Web Application

Home Page: https://golos.io

License: MIT License

JavaScript 95.38% HTML 0.16% CSS 4.36% Shell 0.11%

tolstoy's Introduction

Golos.io

======== Golos.io is the react.js web interface to the world's first and best blockchain-based social media platform. It uses STEEM/Golos, a fork of Steem/Steemit blockchain powered by Graphene 2.0 technology to store JSON-based content for a plethora of web applications.

Why would I want to use Golos.io?

  • Learning how to build blockchain-based web applications using STEEM/Golos as a content storage mechanism in react.js
  • Reviewing the inner workings of the golos.io social media platform
  • Assisting with software development for golos.io

Installation

Clone the repository and make a tmp folder

git clone https://github.com/GolosChain/tolstoy
cd tolstoy
mkdir tmp

Install dependencies

# Install at least Node v6.3 if you don't already have it ([NVM](https://github.com/creationix/nvm) recommended)
sudo nvm install v6

npm install
sudo npm install -g babel-cli

Create config file

cd config
cp example/client-example.js client_config.js
cp example/golos-example.json golos-dev.json
cp example/golos-example.json golos.json

Generate a new crypto_key and save under server_session_secret in ./golos-dev.json.

node
> crypto.randomBytes(32).toString('base64')

(note: it's golos.json in production)

Install mysql server

OS X :

brew update
brew doctor
brew upgrade
brew install mysql
mysql.server restart

Debian based Linux:

sudo apt-get update
sudo apt-get install mysql-server

On Ubuntu 16.04+ you may be unable to connect to mysql without root access, if so update the mysql root user as follows::

mysql -u root
> DROP USER 'root'@'localhost';
> CREATE USER 'root'@'%' IDENTIFIED BY '';
> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';
> FLUSH PRIVILEGES;

Now launch mysql client and create golos_dev database:

mysql -u root
> create database golos_dev;

Install sequelize-cli globally:

sudo npm install -g sequelize sequelize-cli mysql

Run sequelize db:migrate in db/ directory.

Development

npm start

You now have your development front end running at localhost:3002, connected to the main public golos blockchain. You don't need to run golos locally, by default you will connect to wss://ws.golos.io. Use your regular account name and credentials to login -- there is no separate dev login.

Style Guides

File naming and location
  • Prefer CamelCase js and jsx file names
  • Prefer lower case one word directory names
  • Keep stylesheet files close to components
  • Component's stylesheet file name should match component name
Js & Jsx

We are using Airbnb JavaScript Style Guide with some modifications (see .eslintrc). Please run eslint in the working directory before committing your changes and make sure you didn't introduce any new styling issues.

CSS & SCSS

If component requires a css rule, please use its uppercase name for the class, e.g. "Header" class for the header's root div. We adhere to BEM methodology with exception for Foundation classes, here is an example for the Header component:

<!-- Block -->
<ul class="Header">
  ...
  <!-- Element -->
  <li class="Header__menu-item">Menu Item 1</li>
  <!-- Element with modifier -->
  <li class="Header__menu-item--selected">Element with modifier</li>
</ul>

Production

If you want to test it locally in production mode, just run the following commands:

npm run build
npm run prod

or via pm2:

npm run build
sudo npm install -g pm2 # one time
cp example/process-example.json process.json
pm2 start config/process.json

Issues

To report a non-critical issue, please file an issue on this GitHub project.

If you find a security issue please report details to: https://github.com/GolosChain/tolstoy/issues

We will evaluate the risk and make a patch available before filing the issue.

tolstoy's People

Contributors

aaroncox avatar b1acksun avatar bmann avatar bytemaster avatar chiliec avatar cyborgshead avatar dmitry-ship avatar gamerate avatar interestedinsteem avatar leagueofdelegates avatar mguryeva avatar novium avatar oct8cat avatar originated avatar pavq avatar pobedite avatar razchiriac avatar roadscape avatar sneak avatar someguy123 avatar sualex avatar svk31 avatar thebitcoiner avatar tigernd avatar tomarcafe avatar undeadlol1 avatar vitalylvov avatar waffle-iron avatar xanoxt avatar zhe1ka 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.