Steemauto - backend improvement
![steemauto_bitpizza.gif](https://steemitimages.com/0x0/https://cdn.steemitimages.com/DQmSGoS5BwZvVrWrR1TfbPCSJ31pRbJhDANhyBtgGuHoqw3/steemauto_bitpizza.gif)
GitHub1: https://github.com/mahdiyari/steemauto-backend
PR1: https://github.com/mahdiyari/steemauto-backend/pull/5
PR2: https://github.com/mahdiyari/steemauto-backend/pull/6
PR3: https://github.com/mahdiyari/steemauto-backend/pull/7
GitHub2: https://github.com/mahdiyari/steemauto
PR: https://github.com/mahdiyari/steemauto/pull/33
Commit: https://github.com/mahdiyari/steemauto/commit/409c4c5cb1f3b13c812e09e62ecba4b336d73dd5
Explanation:
As you know, Steemauto is written by PHP and it is hard to add more features to it!
I want to re-code Steemauto with Javascript (backend)(already done) and Angular 6 (frontend)
After re-coding Steemauto with Javascript, anyone will be able to contribute more features! Working with Javascript is easier in the Steemauto!
Today, re-coding backend finished.
New login method:
Now we have a new login method which is secure and faster than the old method.
After login by steemconnect, Steemauto will assign a unique key to each user! We will use that key (access_key) to verify user authorization.
We are using httponly cookies in this method which are secure than usual cookies. This will prevent XSS attacks.
Now all backend methods (except changing 'voting power limitation') are in Javascript and easily we can work to add more features in the coming updates.
New functions:
I just removed 500 lines of PHP codes and used new Javascript backend. We can just add a new feature by just creating a new file or folder and adding 1 line of Javascript!
All functions on the website (https://steemauto.com) (curation trail, fanbase, comment upvote, schedule post, claimreward) are changed to use new backend. (js.php)
Coming updates:
- Blacklist (I'm waiting for @themarkymark to develop global blacklist API)
- Pause button for curation trail owners
- Optional 1% beneficiaries for schedule posts (as a donation to the @steemauto)
- Resteem upvoting (premium)
- Downvote trail (premium and just for known communities)
- Customizable time interval in the claimreward (premium)
- Allow self-upvote for curation trail owners (premium)
- Featured curation trails (premium)
- ...
Donations:
We are still waiting for @curie to respond to our application. If they don't accept helping Steemauto, we may get some troubles according to server costs.
With your great support, we can pass another month. Thanks a lot:)
You can always vote mahdiyari
as a witness by clicking here or through steemit.com/~witnesses
This post is submitted to the https://utopian.io
Regards,
2018-09-16
Thanks for the contribution, @mahdiyari! Did you know a lot about JavaScript before you created SteemAuto with PHP? If not, then how did you go about learning it (just curious)?
As for your code, everything looks good, but there are maybe some minor improvements that could be made. For example, I noticed that you have a lot of nested if statements in places, which could be prevented by switching them around.
Also, there are a lot of comments everywhere, which is fine. However, sometimes it's pretty obvious what the code does, but there are still comments explaining it. In my opinion it would be better to leave the comments for the difficult to understand code and function declarations/docstrings, but that is up to you of course.
Looking forward to seeing more of your contributions in the future!
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? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]
Thanks for your review
Yes. I was a little lazy about that if statements. I just wanted to finish coding. (I will try to improve that codes in the coming update but I prefer to add new features and leave that minor contributions to other users to get a reward by contributing)
Actually, I try to explain what is the purpose of using a code (function, and etc) I started using comments when I had to check my old codes! (a hard job)
Thanks again for your review:)
Let's answer your first question:
No. I learned a lot after developing Steemauto.
I try to learn things by experiment and I learned Javascript by using it in my projects. I think my first server-side app was voter.js (GitHub)
Then I coded the server-side operations of steemauto with Javascript (listening blocks, upvoting, and etc) and I changed those operations many times (really many times)
Then I started learning AngularJS and built some local applications with that for using in the Steem blockchain (just for practice)
Then I found ReactJS! I used React and again developed some applications about Steem (just for practice)
Finally, I moved to Angular v6, Typescript, es6, and etc. It is a long story.
Thanks for your time:)
Thank you for your review, @amosbastian!
So far this week you've reviewed 12 contributions. Keep up the good work!
Thanks for all your doing @mahdiyari going to vote for your witness now.
One thing I am wishing for is a option to select no self votes while following a curation trail, I have taken the pledge to not self vote and have had to remove a few from the multiple trails I follow.
Keep up the good work and good choice with simplifying things!
Posted using Partiko iOS
Of course
We can not force someone to upvote a post
Everything in the Steemauto is optional
Would you consider including a no self votes setting on the user settings? I like the idea of including self votes so our trail will follow the community accounts votes on its own posts but I still do not wish to vote my own posts for any reason.
Posted using Partiko iOS
Yes.
I think that is already fixed (by default and without any settings option)
I will check again.
Ohh awesome I will keep an eye out and let you know after my account recharges
You are the man 💪
Posted using Partiko iOS
Keep up the good work!! You have done so much already.
Cheers.
Steemauto is good for all either bad
Hi @mahdiyari!
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
@mahdiyari I just want to thank you for your awesome SteemAuto. I just started using it, but already I felt that the curation tail and fan-base features are just stroke of genius, especially with the waiting time option. Can't wait for your Angular 6 front-end. Maybe I can contribute after you've finished working on it ;)
why are you remove follow option from steemfollowers?
Hey, @mahdiyari!
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!
OMG, I scheduled a post for tomorrow and your platform is not working. What will happen with my post? Will it be submitted, @mahdiyari?
I will fix problems
I don't know if you needed to do something, but I got my content automatically posted, so, thank you so much. You site is so useful for me. Greetings! If there some way how I can support you so I can keep using it, you should tell me here to consider it. Bye!