GitHub repo: https://github.com/mahdiyari/dblog-backend
Recently I announced a new opensource project: https://steemit.com/onsteem/@mahdiyari/announcement-onsteem-a-better-interface-on-the-steem-blockchain
A demo will be available here: https://dev.onsteem.com (back-end and front-end connected)
Note: if you are not a developer, you can skip this part!
Explaining the structure of dblog-backend:
Main server file is api.js which will be started with
The config file is config.js which includes all needed variables!
/conf/ folder, needed configurations will be added. Currently, we have
steemconnect/index.jsfor initializing steemconnect and
/mysql/index.jsfor creating a MySql connection.
/blockchain_apis/needed RPC calls will be added. Currently, there is a database API
/login_apis/needed functions for the login process will be added. Currently, we added a
confirm_process.jsfor assigning a unique hex string (called
hashKey) to the logged in users.
We will keep that unique
access_token(access_token provided by steemconnect and used to upvote, comment, and etc) in the database for validating other operations which will help to reduce security concerns.
confirm_processwill check to see there is any
hashKeyin the request, then it will check that
hashKeyagainst the database. if there was not a
hashKeyin the request, confirm_process will assign a new
hashKeyfor that user after checking login credentials.
We will use
dynamic_global_propertiesin the front-end for some calculations. Like converting VESTS to the STEEM
All semicolons removed (semicolons are optional at the end of lines)
Variable names modified
More comments added
All functions converted to arrow functions
HTTP status codes updated
Better error handlings added
In the next update, Dblog will sync the user's data after the first login!
These data will be used in the blog page to categorize contents, provide similar contents, enable better searching in the contents, and managing blog page.
This contribution submitted to the https://utopian.io
Support this new project by your upvotes. Thanks for your great support.