2024-07-09 - Distriator - Business Management APIs are ready

in #hive-1395312 months ago

Hello Hive Community Members,

Welcome to daily updates from @sagarkothari88 - a Hive Witness & mobile-app-developer. I daily invest my time with my skillset in #Hive & I daily hive-power-up.

Project Distriator

developing APIs for business management

  • So far, we are adding businesses in an excel sheet shared internally.
  • From that excel sheet, data is exported to csv, converted to JSON & mapped to business entities.
  • And to do all of these, we've scripts.
  • This needs to go away.
  • This solution was for supporting via excelshet till we have UX to manage business.
  • As you can see in the screenshot above, we've added 3 more APIs to manage businesses.

Merge & Deploy

raised the pull request

  • After developing APIs, we tested it locally & it worked fine.
  • Immediate actions which we took = raise PR, review again & merge.

deploy it on production

  • We accessed the Distriator server, pull all changes
  • After that we restarted services of Distriator
  • By completing all of these steps, we successfully deployed new APIs of business management.

API Documentation

api documentation

  • API documentation isn't up-to-the-mark. However it gives you the bird-eye-view of available APIs & usage.
  • Following code snippet is an example cURL of getting all businesses.
curl --location 'http://localhost:3000/business/' \
--header 'Authorization: eyJh....'

get all businesses

Update A business

Following is a cURL for updating existing business

curl --location --request PUT 'http://localhost:3000/business/667bf8393d2ea02d35e34419' \
--header 'Authorization: ey...' \
--header 'Content-Type: application/json' \
--data '    {
        "distrion": {
            "guides": [
                {
                    "name": "edmundochauran",
                    "percent": 3333
                },
                {
                    "name": "jonsnow1983",
                    "percent": 3333
                },
                {
                    "name": "aksurevm89",
                    "percent": 3334
                }
            ],
            "owner": "econoquesos",
            "creator": "jonsnow1983",
            "expiry": "2024-09-24T11:14:41.856Z",
            "subscriptionStatus": "whitelisted",
            "paymentMethods": [
                "HBD",
                "SATS"
            ],
            "spendHBDLink": "https://spendhbd.social.gifts/object/djy-econoquesos?breadbrumbs=owo-business-directory/56ew21-venezuela/6dthjw-sucre/djy-econoquesos"
        },
        "profile": {
            "displayName": "Econoquesos",
            "displayImage": "https://ipfs-3speak.b-cdn.net/ipfs/bafkreiglrhxswntjabjqrc3amp37ryva5jifwb4vl2klgxvp4ts4orzkjq",
            "businessType": "Grocery Store",
            "images": [
                "https://ipfs-3speak.b-cdn.net/ipfs/bafkreiglrhxswntjabjqrc3amp37ryva5jifwb4vl2klgxvp4ts4orzkjq",
                "https://ipfs-3speak.b-cdn.net/ipfs/bafkreiadnodvurck3v2ty3saol4fyk2kezrv7pcbll7mnpcvll7fvvw3j4",
                "https://ipfs-3speak.b-cdn.net/ipfs/bafkreiemelmyrfr6rnytf3fk2pkxxf6lb4ubc3edtuafwaeukusf7phau4",
                "https://ipfs-3speak.b-cdn.net/ipfs/bafkreihj56cubri5es3ddqo4va52dz5h6g4o3jaoy2b4w55lyv5pjiyxwu",
                "https://ipfs-3speak.b-cdn.net/ipfs/bafkreiegn5lvegbfk5qs3mljrc7okhbg3hqiyggm4eq4nueay3jmc7xdsu"
            ]
        },
        "contact": {
            "instagram": "https://www.instagram.com/econoquesos/"
        },
        "location": {
            "pin": {
                "latitude": -64.16648324920536,
                "longitude": 10.472244007409754
            },
            "address": {
                "address1": "5° Transversal",
                "address2": "Av Santa Rosa, Cumana 6101",
                "city": "Sucre",
                "state": "Sucre",
                "country": "Venezuela"
            }
        }
    }'

What's next?

  • Now that, we have business management APIs, we'll focus on UX.
  • We'll support adding & editing businesses from Distriator App.
  • While integrating APIs, if we find something missing in API, we'll update APIs.
  • After that, we'll switch our focus to BTC-SATS rewards

Bird Eye View of what's going on, On Project Distriator

( ⏳ = In Progress, ✅ = Done)

  • API for Setting limits for by country ✅
  • FrontEnd to set limits for country ✅
  • Complete UX for managing users ✅
  • Support Localization / Multi language support ⏳
  • Complete Add-A-Business API ✅
  • Complete Edit-A-Business API ✅
  • Fixing issues suggested by @starkerz
  • Adding improvements suggested by @starkerz
  • Migrate existing excel-sheet-based-businesses to database using add-a-business-api ⏳
  • Once migration is done, we'll integrate update-a-business-API ⏳
  • Add support for setting percentage for each-trusted-business-guide on a business ⏳
  • Reward onboarders ✅
  • Rewarding BTC - V4V - SATS payments ⏳

My contributions on projects on Hive Blockchain

Rewarding Hive Content Creators

  • I support several contests hosted by different communities.
  • I reward them with Hive-Power-up for the contribution that they have made on communities on Hive.
  • We keep transferring portion of hive power to different users on Hive for encouraging them for their contribution on Hive.
  • Those who respond to our replies, we also reward them with different tokens like PIZZA, BEER
  • Today, we sent power-ups to these amazing content creators - @sunshine29, @yummycruz1, @madilyn02, @lanoican, @popurri, @virgilio07, @josdelmi, @actioncats, @yessi08, @mercmarg
  • Here is the screenshot indicating same.

Hive power up report

Dedicated Resources for Hive Eco-System

Resource NameResource DescriptionApprox Cost of ResourceStatus
Hive WitnessHive Witness Node$50
VSCRunning a VSC witness node$5
Discord BotHive Curators Discord Bot Node$5
HP RewardsHive Curators HP reward Bot Node$5
12 NodesPowerful video encoder nodes for 3Speak $20 on average$240
Bandwidth3 internet connections$50
DistriatorHive-Distriator Backend node$50
Community ContributorsRewarding community contributors in INR$60
Additional DevelopersAdditional Contributing Developers$1500
--------
TotalApprox$1965--

Updates: Video Encoder Nodes

  • I'm running 12 powerful video encoder nodes for 3Speak Community Members.
  • Monthly internet bandwidth usage which exceeds 15 TB, Maintenance cost, Electricity backup, Internet backup, Depreciation cost - it's all on me.
  • On 2024-07-09, 3Speak published total 147 videos.
  • My video encoder nodes encoded 92 videos from 147 videos published.
  • It means, my encoder nodes encoded 62.59 % of total videos published on 2024-07-09
  • Here is visual representation of above data.

2024-07-09-encoder-data

My Daily Hive Investment Report for 2024-07-09

ValueInvestment Type
0.000 HiveHive Power Up
24.947 HiveWitness Rewards in Hive Power
78.183 HiveCuration Rewards as Hive Power
8.272 HiveBenefactor Rewards as Hive Power
----
111.402 HiveTotal Hive Power Invested
----

Curation Report for 2024-07-09

NOTE:

  • If you don't like tagging you under curation report, let me know in comment section & I'll exclude you from the curation report.
  • If you think that I should not attach curation report in the post, let me know in the comment section.

We've curated total 37 & motivated content creators for their contributions on Hive.

🧑‍💻 Author📝 Post❤️ HiveCurator👥 Community
@mamaemigrantehttps://ecency.com/@mamaemigrante/cheesecake-a-sweet-temptation-cheesecake-una-dulce-tentacion@soyunasantacruzHive Food
@florian-glechnerhttps://ecency.com/@florian-glechner/show-me-a-photo-contest-round-174-free-theme-nest-building-with-the-great-crested-grebes@dimascastillo90Feathered Friends
@erikahhttps://ecency.com/@erikah/self-portraits-at-the-gallery@dimascastillo90Photography Lovers
@gwajnberghttps://ecency.com/@gwajnberg/my-nomination-for-the-hivepizza-june-contest-of-the-month-2qp@hivecuratorsHive Pizza
@tarazkphttps://ecency.com/@tarazkp/summer-reflection-11-tall-order@dimascastillo90Reflections
@mnurhiverhttps://ecency.com/@mnurhiver/people-enjoying-the-beauty-on@dimascastillo90Visual Shots
@fermentedphilhttps://ecency.com/@fermentedphil/freezing-a-rare-and-fleeting-moment-in-time@dimascastillo90Feathered Friends
@bitcoinfloodhttps://ecency.com/@bitcoinflood/userfriendly-a-word-that-still-eludes-web3-7jn@bhattgLeoFinance
@josediccushttps://ecency.com/@josediccus/are-you-bullish-on-life-8vp@bhattgThe City of Neoxian
@codingdefinedhttps://ecency.com/@codingdefined/is-silver-the-new-gold-9dv@bhattgLeoFinance
@sacra97https://ecency.com/@sacra97/los-talentos-en-cada-pantalla@angelica7EmpowerTalent
@karlex77https://ecency.com/@karlex77/espeng-un-oeste-cerrado-y-lleno-de-emociones-opinin-bph@fermionicoFull Deportes
@ahmadmangahttps://ecency.com/@ahmadmanga/ivfspaha@reeta0119Hive Gaming
@vikisecretshttps://ecency.com/@vikisecrets/french-democracy-is-flawed-undemocratic-winner-takes-it-all-leads-to-bizarre-outcomes-how-the-party-with-the-most-votes-placed-t@reeta0119Deutsch D-A-CH
@kawsar8035https://ecency.com/@kawsar8035/beautiful-view-of-the-clouds-floating-in-the-sky@reeta0119Amazing Nature
@arvenohttps://ecency.com/@arveno/which-better-between-urban-living-and-rural-living@reeta0119ASEAN HIVE COMMUNITY
@alokkumar121https://ecency.com/@alokkumar121/lpud-is-approaching-in-less-than-a-week-jtn@reeta0119LeoFinance
@tatdthttps://ecency.com/@tatdt/foundry-bridge-summer-garden-and-hidden-art@equipodeltaDiscovery-it
@sanjeevmhttps://ecency.com/@sanjeevm/passing-the-knowldege-to-future@equipodeltaHiveGarden
@jobelieverhttps://ecency.com/@jobeliever/is-it-worth-the-stop@palomap3Hive PH
@enraizarhttps://ecency.com/@enraizar/el-buen-vivir-sobre-la-generosidad-good-living-about-generosity-cce@palomap3Humanitas
@toluwanispecialhttps://ecency.com/@toluwanispecial/the-complexity-of-love@palomap3Reflections
@belkyscabrerahttps://ecency.com/@belkyscabrera/my-visit-to-the-gina@palomap3Architecture+Design
@glorydeehttps://ecency.com/@glorydee/why-i-love-being-a@palomap3Hive Learners
@nurseanne84https://ecency.com/@nurseanne84/just-walk@palomap3Inner Blocks
@bulliontoolshttps://ecency.com/@bulliontools/the-curse-of-glorious-summer@gwajnbergFreeCompliments
@idiosyncratic1https://ecency.com/@idiosyncratic1/are-we-at-the-bottom-ash@alokkumar121LeoFinance
@stefano.massarihttps://ecency.com/@stefano.massari/09-07-2024-energy-systems-the-condenser-in-steam-systems-en-it@alokkumar121Olio di Balena
@underlockhttps://ecency.com/@underlock/throwing-a-party-in-the-backline-hpk@alokkumar121The City of Neoxian
@wongihttps://ecency.com/@wongi/the-intense-defense@bhattgThe Ink Well
@aleisterhttps://ecency.com/@aleister/inlaid-details-macro-photography-session@bhattgPhotography Lovers
@newmanjosuehttps://ecency.com/@newmanjosue/fotografias-mariposas-del-jardin@bhattgGEMS
@daltonohttps://ecency.com/@daltono/photographs-of-my-gac-maverick-custom-design-in-gran-turismo-7@bhattgGaming Photography
@guurry123https://ecency.com/@guurry123/hey-i-am-a-dolphin-now-9vx@bhattgOCD
@idea-make-richhttps://ecency.com/@idea-make-rich/gossip-on-my-favorite-season@bhattgIndiaunited
@amiegeoffreyhttps://ecency.com/@amiegeoffrey/a-new-dawn-kfi@bhattgThe Ink Well
@b0shttps://ecency.com/@b0s/cexs-and-the-government-fvs@bhattgHive Naija

Support @sagarkothari88

Vote sagarkothari88 as Hive Witness

Support @threespeak

Vote for 3Speak as Witness

Get paid for paying in HBD/Hive & SATs

https://distriator.com

Credits to designers - noakmilo & josegrech

image by noakmilo

banner of distriator by josegrech

Swap your HBD/Hive using @ecency

Sort:  

Namaste 🙏 bro, thanks for your support and mentioning me here.

Namaste @idea-make-rich

You are most welcome

Happy weekends

Additional gifts for you

Here is !PIZZA token gift for you

Thanks my friend for mentioning me in this post and for the great work you are doing. Congratulations

Hello @karlex77

You are most welcome
Thank you for motivating words.
I'll keep up my best.

Additional gifts for you

Here is !PIZZA token gift for you

Great update on Distriator brother. Looking forward to seeing more about the Bird Eye View. Sounds pretty helpful.

Hello @theringmaster

Thank you.
I'll keep adding new things & remove done things from bird-eye-view section.

Happy weekends.

Happy weekend big brother you're doing so well for the platform

PIZZA!

$PIZZA slices delivered:
sagarkothari88 tipped soyunasantacruz
sagarkothari88 tipped mnurhiver
sagarkothari88 tipped enraizar
@sagarkothari88(6/10) tipped @stefano.massari
sagarkothari88 tipped idea-make-rich
sagarkothari88 tipped karlex77

Excellent work, thank you for making it possible

Hello @soyunasantacruz

You are most welcome

Additional gifts for you

  • Here is !PIZZA token gift for you
  • Here is !BEER token gift for you

Don't forget to support back

thank you for mentioning me.

Hello @mnurhiver

You are most welcome

Thank you for Ecency based curation

Here is !PIZZA token gift for you

Thank you very much for the mention. And thank you for the great work you do.

Best regards

Hello @enraizar

You are most welcome
I'll keep up my best

Additional gifts for you

Here is !PIZZA token gift for you

🙏🏽

This post has been manually curated by @bhattg from Indiaunited community. Join us on our Discord Server.

Do you know that you can earn a passive income by delegating to @indiaunited. We share more than 100 % of the curation rewards with the delegators in the form of IUC tokens. HP delegators and IUC token holders also get upto 20% additional vote weight.

Here are some handy links for delegations: 100HP, 250HP, 500HP, 1000HP.

image.png

100% of the rewards from this comment goes to the curator for their manual curation efforts. Please encourage the curator @bhattg by upvoting this comment and support the community by voting the posts made by @indiaunited..

This post received an extra 10.00% vote for delegating HP / holding IUC tokens.

Thank you @indiaunited and @bhattg

Thanks for mentioning me and thanks for mentioning one of my posts. Receiving support always make us happy

Hello @stefano.massari

You are most welcome

Additional gifts for you

  • Here is !PIZZA token gift for you
  • Here is !BEER token gift for you

Do not forget to support me back

@sagarkothari88 In particular I congratulate you for the work you do, as it is a great benefit to the entire Hive community. I would also like to humbly thank you for taking my work into account.

Hello @lanoican

You are most welcome
I'll keep up my best for Hive
Happy Sunday