witness-profile: A witness profile app

in #utopian-io3 years ago (edited)

I have announced my personal witness page and already a couple of friends asked if it's open-source or not.

I have generally open-source my stuff but that was not. After a couple of clean-ups and fixes on the source code for the reusability, it's now open source.


See the source at github repository.

What is witness-profile, anyways?

It's a simple Flask (really simple) gives information about the witness' intentions, servers, stats, delegations, community involvements.

It's hard to get this information from a single source from a stake-holder/potential voter standpoint. This app is designed to help with that struggle.

Generic configuration

All the data inside the webpage is stored in JSON, and there is nothing hard coded about my witness on the website. Therefore, the app is in a reusable state. (by other witnesses.)

Installation

$ python3.6 -m venv witness-profile-env
$ source witness-profile-env/bin/activate
$ git clone https://github.com/emre/witness-profile.git      
$ cd witness-profile
$ pip install -r requirements.txt

Configuration

All you need to do is creating a file in your path. (Ex: profile.json)

{
  "witness_account": "emrebeyler",
  "witness_name": "emrebeyler",
  "witness_title": "Developer, STEEM Witness, Creator of dpoll.xyz",
  "witness_description": "I am an experienced software developer in Istanbul/Turkey. \n\nI am passionate about the STEEM blockchain. Supporting the network by maintaining a witness node and developing countless applications/tools around it.",
  "servers": [
    {"name": "Primary", "ram": "64 GB DDR4", "bw": "1 GBit/s", "cpu": "Intel i7-6700 Quad-Core", "hdd": "2x2 TB SATA HDD 7200 RPM "}
  ],
  "projects": [
    {
      "name": "dpoll",
      "description": "dpoll.xyz is an experimental application on the top of the STEEM blockchain. It has an account based voting system, where accounts may vote specific questions asked by other STEEM accounts.",
      "url": "https://dpoll.xyz",
      "github_repo": "https://github.com/emre/dpoll.xyz",
      "logo": "https://i.postimg.cc/BvW7cZX3/dpoll-logo.png"
    },
    {
      "name": "lightsteem",
      "description": "Lightsteem is a light python client to interact with the STEEM blockchain. It’s simple and stupid. It doesn’t interfere the process between the developer and the STEEM node.",
      "github_repo": "https://github.com/emre/lightsteem",
      "logo": "https://i.postimg.cc/BbM73xSc/lightsteem-logo.png",
      "url": "https://lightsteem.readthedocs.io/en/latest/"
    },
    {
      "name": "steemconnect-python-client",
      "description": "steemconnect-python-client is a simple yet powerful library to interact with the Steemconnect. Steemconnect is a central-single sign on solution for steem based applications.",
      "url": "https://steemconnect-python-client.readthedocs.io/en/latest/",
      "github_repo": "https://github.com/emre/steemconnect-python-client"
    },
    {
      "name": "transmitter",
      "description": "Transmitter is a CLI tool for STEEM blockchain witnesses. It quickly allows you to enable/disable your witness or set some properties for the new witness_set_properties call introduced in Hard Fork 20.",
      "github_repo": "https://github.com/emre/transmitter",
      "logo": "https://i.postimg.cc/y8NnmgV2/transmitter-logo.png"
    },
    {
      "name": "infestor",
      "description": "infestor is a cross platform CLI app to claim and create discounted accounts on the STEEM blockchain.",
      "github_repo": "https://github.com/emre/infestor",
      "logo": "https://i.postimg.cc/mrBLpsnx/infestor-logo.png"
    }
  ],
  "delegations": [
    {
      "account": "dpoll.curation",
      "amount": 2500
    },
    {
      "account": "sndbox",
      "amount": 100
    },
    {
      "account": "steemflagrewards",
      "amount": 100
    },
    {
      "account": "partiko",
      "amount": 100
    },
    {
      "account": "edebiyat",
      "amount": 100
    }
  ],
  "social_ids": {
    "github": "emre",
    "discord": "emrebeyler#9263"
  },
  "community_involvements": [
    {
      "name": "Sndbox",
      "account": "sndbox",
      "website": "https://sndbox.co/",
      "title": "Steward",
      "description": "I help @sndbox as a curator for organized contests. Also maintain the main discord bot handles registration and curation."
    },
    {
      "name": "The Creative Crypto",
      "account": "creativecrypto",
      "website": "https://thecreativecrypto.com",
      "title": "Developer",
      "description": "I develop and maintain an automated voting bot for the creative content in the STEEM blockchain."
    },
    {
      "name": "Utopian",
      "account": "utopian-io",
      "website": "https://utopian.io",
      "title": "Moderator",
      "description": "I review submissions in the development category."
    }
  ]
}

After creating the file, edit config.py in the project and set WITNESS_PROFILE_JSON_FILE" variable with your profile.json file's path.

Running

in the project's directory:

$ gunicorn app:app

This will start listening on port 8000. You can deploy it via nginx and proxy pass your 80.port to 8000.

A hidden API endpoint

/api/v1/witness_profile route returns the all data related to the witness in JSON format. If we agree on a universal format on that and make other witnesses maintain APIs like that, we could have a "witness catalog" frontend :-) (See emrebeyler.me/api/v1/witness_profile for an example.

This is still an idea in progress and not sure we can reach a good participation level.

Roadmap

I will add a new section called Latest witness updates where the recent witness updates posted by the witness will be shown.

If you have any ideas about what kind of information should be there (or not), feel free to post feedback.

Sort:  

Thank you for your contribution. I can see how witnesses can setup their own witness-profile but it might still be too much work for them to configure e.g. setup ngnix server first.

  1. It is better that the delegation statistics can be accquired/updated realtime instead of being hard-coded in profile.json
  2. I think the project is still at its early stages, but it sounds reasonable to provide customize UI via stylesheets in the future releases and BTW, I don't think a good idea to mixing CSS and HTML and even some of the JS. Have you looked at other lightweight frameworks such as Vue?
  3. I am a Apache fan, is it possible to make this work on Apache?

It is a good idea to make this open source and have you thought about the possibilities to provide more features without setting up servers? something like this:

https://steemyy.com/witness-data/emrebeyler

BTW: I made this, one HTML, pure steem.js but it is a one-page stuff to show some basic information for a steem witness.

I agree that, the commonly-agreed JSON API can be very helpful.

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]

Hey,

Thanks for the review.

It is better that the delegation statistics can be accquired/updated realtime instead of being hard-coded in profile.json

I have thought about this but not every outgoing delegation considered as support to initiatives around the ecosystem. E.g: Me delegating 10 SP to a minnow for RC problems creates noise. That's why I decided to keep it like that.

I think the project is still at its early stages, but it sounds reasonable to provide customize UI via stylesheets in the future releases and BTW, I don't think a good idea to mixing CSS and HTML and even some of the JS. Have you looked at other lightweight frameworks such as Vue?

Agreed. Open-sourcing this was not a plan at first glance, so I didn't want to spend much time on the frontend and took the fastest way for me. My frontend skills are still at 90s.

I am a Apache fan, is it possible to make this work on Apache?

Sure.

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

That‘s great work, @emrebeyler. I sincerely hole we will soon see witness profile pages from many witnesses. Presently I find it hard choosing 30 witnesses to vote for.

Thanks, @thomas. Let's see if we can see more witness profiles in the future.

Hi @emrebeyler!

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

Hey, @emrebeyler!

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!

Haver another happy year, !BEER



Hey @emrebeyler, here is a little bit of BEER from @isnochys for you. Enjoy it!