This project is a boilerplate for rapid development on top of the steem network. This project is a starting point and is not intended to be feature complete or na off-the-self app.
This boilerplate includes.
config.example.js
and rename to config.js
enter your client_id
from steemconnect and redirect uri to 'http://localhost:3000/auth/', update the session secret to a new secure random stringI recommend incorporating your package manager of choice and bundling these together for production.
The included css and use of bootstrap is intended to be as minimal as possible and only to help demonstrate the completed features. You should restructure the examples using your framework or styling methodology of choice. Refraining from building completely on-top of a framework keeps this project open to as many users as possible.
Yes. You'll notice many of the API calls are fired from a page specific tag on the <main>
element. This is to demonstrate which views need which information from the STEEM api and not necessarily the design pattern you have to follow.
When making calls to the STEEM API you will need to additional filter by your specific tag. e.g
function getTrending(query, initial){
steem.api.getDiscussionsByTrending(query, (err, result) => {
if (err) return console.log(err);
result = result.filter(post => post.parent_permlink === 'review')
displayContent(result,initial)
getaccounts(result.map(post => post.author))
});
}
Note you will need to query the steem API for many more posts depending on the frequency of your tags appearance.
Many apps opt to maintain their own database for a reference to posts created on their platforms specifically. Alternatively you can check the custom JSON data associated with posts. (/routes/post.js) You'll notice we are specifying the custom data 'boilerplate.app'
this can be checked when querying STEEM API as with the Tag example above. This second option is not bulletproof and people could submit posts via tools like steem.js with your app name easily.