TravelFeed dApp: Introducing a Menu for Curators
Until recently, the TravelFeed curation team was using our own Discord bot to curate posts. This involved looking through posts on a Steem frontend like steemit.com and then pasting them to Discord and adding reactions or chat commands to perform curation actions. With curation moving to our dApp and the existing solution having some problems, the demand for a new curation solution within our dApp came up. With the new solution, logged in curators can curate posts directly from travelfeed.io using a menu only visible for curators!
A "star" indicator displays the curation status of a post. Unlike before, posts that have received an honourable upvote are now indicated by a half-filled star in the top right:
If the username in the cookie matches one of our curator's usernames, a click on the "star" icon opens the curation menu:
The curator can select between five different curation actions and is then asked to confirm. The menu and confirmation dialogue both use elements from the Material UI React framework.
Upon confirmation, a custom_json operation is broadcasted to the blockchain through Steemconnect from the curator's account:
This python script streams the blockchain for valid custom_json operations by authorised curators and perform the selected action with the @travelfeed account, e.g. leaving a comment or resteeming, upvoting and commenting on the post:
As with our Discord bot before, the script also checks the blockchain stream for posts tagged with "travelfeed" and leaves a comment if they don't meet our criteria (min. 250 words in English).
Currently, the curator status is determined from the username returned by Steemconnect and saved in a cookie. As soon as our API is integrated into the frontend, the user role will be obtained from our database upon login and saved into a json web token returned to the user and saved as cookie. Instead of defining curators manually within the code, users with the role "curator" in the JWT will then see the curator menu.
Eventually, instead of using custom_json operations, curation actions will be performed directly through the API, but this is not a priority at the moment.