DBlog.io - Decentralized Blogging Platform - Backend development for the new project

inaction-1767700_640.jpg
source: pixabay.com

GitHub repo: https://github.com/mahdiyari/dblog-backend
PR: https://github.com/mahdiyari/dblog-backend/commit/6cdd695fd9301edfd1d9fed15b2906b07faaec73

20 days ago, I announced a new opensource project: https://steemit.com/onsteem/@mahdiyari/announcement-onsteem-a-better-interface-on-the-steem-blockchain

I started developing back-end for this project called Dblog.io (new name)!
We will have a back-end here and a front-end here

A demo will be available here: https://dev.onsteem.com (back-end and front-end connected)


Codes

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 npm start
The config file is config.js which includes all needed variables!
Under the /conf/ folder, needed configurations will be added. Currently, we have steemconnect/index.js for initializing steemconnect and /mysql/index.js for creating a MySql connection.

Under the /blockchain_apis/ needed RPC calls will be added. Currently, there is a database API get_dynamic_global_properties.js

Under the /login_apis/ needed functions for the login process will be added. Currently, we added a confirm_process.js for assigning a unique hex string (called hash_key) to the logged in users.
We will keep that unique hash_key instead of access_token in the database for next operations which will help to reduce security concerns.
confirm_process will check to see there is any hash_key in the request, then it will check that hash_key against the database if that user already was in the database. if there was not a hash_key in the request, confirm_process will assign a new hash_key for that user after checking login credentials.

We will use dynamic_global_properties in the front-end for some calculations. Like converting VESTS to the STEEM

All codes are explained by comments. (a Javascript developer will perfectly understand how this back-end works)


This contribution submitted to the https://utopian.io
Support this new project by your upvotes. Thanks for your great support.

Regards,
2018-07-05

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now
Logo
Center