KURE Development Update 4 - Browsing Content and Adding to Communities!

in #utopian-io5 years ago (edited)

This weekend was an intensive round of developing. The much needed ability to browse content from Steem has arrived! And what's more, is that those posts can be added to groups! This is a big step forward to a public release. I can see the light at the end of the tunnel :p

Other improvement were also made, such as verifying the permissions at the server-level for an action a user is trying to perform (not just client side). I also extracted the fetches and validation code from the a few components to make them reusable through out the app. If a post is added manually through the URL on the Manage page, now the real proper title is shown, and not the permlink ;)


Repository

https://github.com/KrNel/kure


Index

  1. What is KURE?
  2. New Features
    2.1 Browsing for Steem Content to Curate
    2.2 Adding Browsed Posts to Communities
  3. Other Changes/Improvements
    3.1 Extracted validation into separate file for reuse
    3.2 Extracted the server fetches into separate file for reuse
    3.3 Permission verification added to server-side processing
    3.4 Adding a post manually via URL grabs the proper title
  4. Pull Request / Latest Commits
  5. Roadmap
  6. Contact

1. What is Kure?

Kindred United to Reward Everyone.

A Community Platform and Curation Network Remedy for Steem

Do you want to find content that other people really value? How?

Upvotes don't do it, because so many upvotes come from autovoting, autobots, or curation trails. You don't know if a vote for content is done by a real person, or some automation. The content isn't being evaluated when it's automated.

Imagine a curation network where people are interacted through community groups to share and value content, and you can really see what they value globally through various communities that people organize and collaborate together to build.

KURE provides a network hub for people to create their own community groups for evaluating content to curate. It will also develop into communities to create posts within.

Create your own communities and have others join to contribute. Make up your own criteria. Manage who can add curation links to your community group. Anyone else can follow your community and engage.

My goal is to make content easier for everyone to find by all of us sharing the content we like trough communities. Others can find communities they are interested in and see what is being curated within that community to also support it with upvotes, resteems and comments.

Maybe you want to share what you value, and get others to see it or support it, but don't want to resteem it, or want more people to see it. On KURE, the community you create and those who are involve din it will popularize content you value and allow others to see it. Another way of thinking about it, is it's kind of like having a custom community feed, based on a community that engages in creating it, rather than just one person.


2. New Features

Video Demonstration


2.1 Browsing for Steem Content to Curate

The ability to view post summaries from the Steem blockchain has finally been implemented. When you go to the Kurate page, the newest posts will load.

Visualized

There is a lot of code to get this done, but the main part that shows the post is divided into Author, Thumbnail, a PostActions components. The Author section displays the author name, reputation, category, posted time and payout value. The thumbnail will show the first image from a post. And the PostActions component will show all the actions you can do, such as likes, votes, comments, dislikes, flags and adding a post to a community. They don't work yet other than the plus button of adding a post.

Code snippet


2.2 Adding Browsed Posts to Communities

Browsing posts was required for this all-important step: ADDING BROWSED POSTS TO COMMUNITIES! Wo0ot!

This is done via the plus circle icon. Click on that for any post, and you get a modal popup window that asks you to Select the community you want to add the post to:. You can then choose one of the groups you either own, or that you have joined, and add it.

Visualized

Boom! Done! That easy. No need to manually add URLs anymore (although you still can) if you want to add a post you found outside of the site. But in the future, there will be a full front-end so you won't need to go anywhere else, and everything you view on Steem can be added to a community easily ;)

Clicking on the button sends data to be saves in state, then a the modal opens and you get to add it to a community, then all the data is sent to the server.

Code snippet



A lot more happens, like validation and fetching which is part of some improvements detailed below ;)


3. Other Changes/Improvements


3.1 Extracted validation into separate file for reuse in app

The validation all still works like before (as I've previously shown), but after separating the functionality out into it's own file, I was able to bring it into the new Kurate section and validate the posts to add.

If you are submitting a post that already exists in a community group, you get a error telling you: Post already in group.

Visualized

When the post is submitted, the server check to see if you or someone else already added it. If you, the processing stops and a response is sent back telling you that the postExists.

Code snippet


3.2 Extracted the server fetches into separate file for reuse in app

I improved how the fetches and calls to the server are made by extracting the functions, and refactoring the code to remove duplication of code. It's a lot more streamlined now making for cleaner code ;)

This is what it looks like without comments:

Code snippet


3.3 Permission verification added to server-side processing

I had previously added verification of access to the client-side, but if someone who owned a group changed another user's permissions, they would still have the same permissions as before as long as they didn't reload the app, since this is a SPA (Single Page Application).

I had to implement server-side verification of permissions as well. This was easier to implement than on the client side. One function does all the checking for the adding or deleting or groups, posts or users. Very simple and elegant if I do say so myself ;)

Code snippet


3.4 Adding a post manually via URL grabs the proper title

Before, when a post was manually added via URL, the permlink was used as the title, because I wasn't yet hooking into the blockchain to get the title. Now I am, so I fixed the title displayed when manually adding a post ;)

If adding a post like https://steemit.com/philosophy/@krnel/reduced-to-ashes, the title used to be shown as reduced-to-ashes. Now, it shows the real title as Reduced to ashes....

Visualized


When the URL is submitted to be added, a call is made to the Steem blockchain to get the post details, and the author, category, permlink and title are kept, being sent back to the client view and server backend.

Code snippet


4. Pull Request / Latest Commits


5. Roadmap

Coming up:

  • Browse Steem content by hot and trending if desired
  • Browse by tags
  • Infinite scroll
  • Viewing content details in full

You can see the longer roadmap in a previous post.


6. Contact

If you want to contact me, you can reach me on Discord at https://discord.gg/ApUp4jJ, or email at [email protected]. I'm not really on steem.chat, but I think I get emails if you send me a message.


Thank you for your time, attention and support! I appreciate it!

Peace.

Sort:  
  • Great post with structure, images, code samples and a video.
  • Think about making smaller commits to help with separation of concerns. (Then grouping them in a pull request for good practice)
  • You may want to get rid of dead code, it's in git anyway if you need it back.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Ah, I thought you wanted one commit, but I guess that was for the one pull request. I'll try to do some periodic commits as I go along, even if something isn't completed ;)

The commented code is for what I'm still working on, but I should have deleted it, saved the file, pushed to github, then just did an undo and it would have been back and not be in github ;) I'll try to keep it cleaner next time. Or you just mean more commits, and then delete it on later commits, and I can always go find it later, gotcha.

I see you want more description in commits. I'll make sure not to forget that next time.

Thanks for the tips once again!

Thank you for your review, @helo! Keep up the good work!

Any ETA on when it will be on-boarding users? I am curious how it will work and looking forward to reading users praise and complaints on it. I recently began toying with the idea of a second account and it occurred to me I could use it for testing things I am wary of like Steemconnect. I wouldn't mind testing your site out as well, although not sure if any communities would accept me as I will be keeping the other account separate from this one.

You have a knack for this stuff. I remember tinkering on a very basic level with my WordPress sites, and looking at your screen shots brings back memories of me destroying code I shouldn't have and having to reset my entire site to how it looked initially. The stuff of nightmares.

I can make u an account. @practicalthought2 ? What u want?

That's kind of you to offer. I am wanting to keep it separate from this account (as in no one will know) because I am considering using Steem monsters to get the second account using fiat as my entry. It seems like it is much easier than hassling with the exchanges, but I don't want to out myself, which using fiat would do. Without saying to much, I notice some weird things going on in my personal life that I assume might be tied to the things I write about. It has made me wary to say the least.

I figured though when I get the account in the near future it would be perfect for testing out many of the things I steer away from like Steemconnect. If they jack that account it won't sting as much, lol.

Well tonight I spent 2 hours making vegan general tso/tao, but I was hoping to maybe get a release out by the weekend, except on Saturday I have a family thing to do to... So maybe I can still get it live for Sunday, or else next week...

Yeah, a second account is a good idea with your trust issues :P

Yeah, with wordpress if you make a mistake in your db or code and don't know how to undo it... well you have to use a backup hehe. Even upgrades of WP in the past have messed up my site, and I had to restore from a backup.

I can hardly wait for this. Love how you show some of the code. This will be one of the best Steemit apps yet.

Posted using Partiko iOS

I'm glad you value the project already! Thanks! I hope it becomes great indeed.

Looking good man, the pics of the work are great, shows open source and decentralization when you share it instead of keeping to yourself. Will this be available on chrome or Firefox?

The picture also looks awesome lol

Posted using Partiko iOS

Thanks! It's a website, so it'll be available on any browser ;)

This is looking great!

Thanks!

Thanks :)

Good luck with that.

Posted using Partiko Android

Hi @krnel!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

This post has been included in the latest edition of SoS Daily News - a digest of all you need to know about the State of Steem.

I'm excited about what you're doing here... particularly because I know you have a great understanding of what this ecosystem could be, if only we had the right tools.

I've been asking for the ability to somehow "group" people I follow by their predominant type of content, or frequency of posting, or whether they are active curators and so forth... so it's exciting to see aspects of this become part of what you're developing!

Hey, @krnel!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Coin Marketplace

STEEM 0.27
TRX 0.11
JST 0.033
BTC 63900.26
ETH 3063.07
USDT 1.00
SBD 4.21