algorandfoundation / grow-algorand

Grow Algorand and Earn ALGOs ❤️
90 stars 33 forks source link

Develop new framework integrations with Algorand #41

Closed michielmulders closed 2 years ago

michielmulders commented 3 years ago

Overview

Description

What is this task?

This task involves creating starter projects that combine Algorand SDKs with commonly used frameworks. The bounty hunter should also create an accompanying blog post that describes their work, the integration, and relevant code snippets.

An integration should at least show:

Currently, Algorand supports JavaScript, Python, Java, and Go. Each of these languages is used in many popular frameworks. The goal of this task is to ease the development process for integrating Algorand into these frameworks and providing components to quickly build a new project. Also, integrating wallet managers (available here) is optimal.

Make sure that the solution doesn't exist yet in our tutorials or solutions portal. We already have a React.js starter kit.

Ideas:

What are the requirements for the bounty taker?

The developer should have knowledge of the specific SDK language, the framework being integrated, and the Algorand SDK.

What are the deliverables?

1. GitHub project

Description The developer should provide a complete project on GitHub, with a well-defined readme and code illustrating the solution.

Judging Criteria and Metrics

Submission Procedure

2. Solution Article Description The developer should provide a solution article that is written in markdown that describes how the project was built and how it can be used by developers. This solution article will be posted to the Algorand developer portal.

Judging Criteria and Metrics

Submission Procedure

Submit your blog post following these steps:

Other Requirements

gitcoinbot commented 3 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 500.0 ALGO (515.0 USD @ $1.03/ALGO) attached to it as part of the algorandfoundation fund.

gitcoinbot commented 3 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 6 months, 2 weeks ago. Please review their action plans below:

1) nheingit has started work.

I'm going to create an example app, and relevant blog post that will show a user how to setup a gin rest API that will display a user's algorand information, such as wallet address, balance, etc.

Possible to create a front-end in sveltekit if there is interest in it. 2) slava096 has started work.

I am going to create a rest api demo application and corresponding blog post , based on python fast API running in Algorand blockchain sandbox using py-algorand-sdk , which will display information about Algorand user , such as wallet address , balance , etc. 3) crypblockcode has started work.

I am going to create a rest api demo application and corresponding blog post , based on python fast API running in Algorand blockchain sandbox using py-algorand-sdk , which will display information about Algorand user , such as wallet address , balance , etc.

Hi there, I'm an experienced Node.js developer who loves (like many others) Express.js (https://expressjs.com/). As this is a popular API framework, it would be great to have one with Algorand integration.

I'm planning to develop the following endpoints/features (if not more):

I'll make sure to include relevant filters for these endpoints to provide a rich starter template for other developers. I expect to deliver this project in four weeks time, hopefully sooner (2 weeks). 4) michaelockenden has started work.

A demo wallet built using the Flask framework. This will also include a blog post to walk through integrating the algorand SDK. 5) babcoccl has started work.

Using the Algorand SDK and Spring Boot, I will create a spring-boot-algorand library that will seamlessly standup a wallet and necessary clients to perform Algorand transactions on the network. Default sandbox configurations will be used and will be overridable by the implementer. A blog post will be written about how to quickly configure and run the spring-boot library.

Learn more on the Gitcoin Issue Details page.

ljs49 commented 3 years ago

Hi @michielmulders Can you please point to the reactjs starter kit so that I can understand the exact functionality required?

Thanks

mySoul8012 commented 3 years ago

Where is the Algorand SDK, I'm very sorry, I didn't find it

ipaleka commented 3 years ago

Where is the Algorand SDK, I'm very sorry, I didn't find it

https://developer.algorand.org/docs/reference/sdks/

michielmulders commented 3 years ago

Hi @michielmulders Can you please point to the reactjs starter kit so that I can understand the exact functionality required?

Thanks

That one is in progress at the moment!

crypblockcode commented 3 years ago

I made a small mistake by copying the other poster his proposal as inspiration and not removing it. Sorry! Let me know if you have any questions :)

michielmulders commented 3 years ago

@luisantoniocrag Happy to see your Vue.js work! We have already the following two tutorials that can kickstart you:

  1. Real-Time Block Visualizer with Vue
  2. Build a Web dApp Algorand Wallet Interface Using Reach and Vue

Cheers!

michielmulders commented 3 years ago

I made a small mistake by copying the other poster his proposal as inspiration and not removing it. Sorry! Let me know if you have any questions :)

No worries, thank you for the detailed plan!

michielmulders commented 3 years ago

@nghoa sounds good!

michielmulders commented 3 years ago

@beakersoft I'm sorry that I had to stop you from working on the CLI tool. At the moment, we don't need such a tool although I understand its use and benefits but there are too few people using it. Feel free to submit other ideas!

michielmulders commented 3 years ago

@babcoccl Thank you for starting work on Spring Boot! Make sure to include info like:

User information Asset information User balance Transactions (and user transaction history with filter per asset type)

If you have any updates, feel free to share them here or send over your Discord handle so you can show your progress.

michielmulders commented 3 years ago

@vofswords let me know your status on Algorand with Angular integration. Look at the above comment for the minimal requirements!

babcoccl commented 3 years ago

@michielmulders when you say to include that info, do you mean include it in methods in the spring boot starter to be developed or......?

michielmulders commented 3 years ago

@michielmulders when you say to include that info, do you mean include it in methods in the spring boot starter to be developed or......?

Yes, I mean it should be part of your integration project. The goal is to create a project that shows other developers how you can fetch and display assets, balances, transactions, your profile, etc. So, your project should develop this code and then you can showcase it/describe in the blog post. We want as many possible components/recipes to be part of the project so people can get started easily when they want to use Spring Boot to develop on Algorand.

babcoccl commented 3 years ago

@michielmulders roger! That's what I was planning on

babcoccl commented 3 years ago

@michielmulders In your initial comment to me above, when you say 'User' do you mean account? Otherwise, could you direct me to the part of the SDK to retrieve user details?

michielmulders commented 3 years ago

@michielmulders In your initial comment to me above, when you say 'User' do you mean account? Otherwise, could you direct me to the part of the SDK to retrieve user details?

@babcoccl yes I mean account information, account balance, assets an account owns/opted-in to, ... You can find the SDK here: https://github.com/algorand/java-algorand-sdk Docs for Java SDK here: https://algorand.github.io/java-algorand-sdk/ Also, use the search box on the Developer Portal to look for Java related tutorials, you'll find a lot of information. E.g. this tutorial can be helpful!

beakersoft commented 3 years ago

@michielmulders I've almost done an example github project for go fundme demo application using the algorand sdk, I'm going to create a blog post as well. Where do I create the actual blog post though, I have my own that i can submit it on but is there a standard platform you would like it on?

Mine77 commented 3 years ago

@beakersoft thanks for the contribution. You may submit your blog post via submission form here: https://forms.gle/FRAH9QwEGU7zPJ1h7

You can also publish it on your own blog once we've done reviewing it. Just to keep it error-free.

Thank you.

babcoccl commented 3 years ago

@michielmulders When creating an account, one can either specify a mnemonic or seed (or nothing at all). In the case where a user were to specify both mnemonic and seed (via spring properties) what should the behavior of account creation be? I.E. mnemonic trumps seed or vice versa, or error?

Mine77 commented 3 years ago

@michielmulders When creating an account, one can either specify a mnemonic or seed (or nothing at all). In the case where a user were to specify both mnemonic and seed (via spring properties) what should the behavior of account creation be? I.E. mnemonic trumps seed or vice versa, or error?

An account on Algorand is specified by a private key, which can be converted into a mnemonic, and paired with a public key, which is used to generate account address. I'm not sure what's the "seed" you are referring to here. Can you give an example?

babcoccl commented 3 years ago

@Mine77 For example the Account class in the java SDK has two public constructors:

Account(String mnemonic)
Account(byte[] seed)

Therefore, when building a spring boot integration we would potentially allow a user to configure an account like so:

@Autowired
public Account myAccount;

And specify configuration params via an application.properties file like so:

aglorand:
    account:
        mnemonic:portion never forward pill lunch organ biology weird catch curve isolate plug innocent skin grunt bounce clown mercy hole eagle soul chunk type absorb trim

OR

algorand:
    account:
        seed:AJNNFQN7DSR7QEY766V7JDG35OPM53ZSNF7CU264AWOOUGSZBMLMSKCRIU

But because there is no inherent validation around .properties files a user could theoretically declare:

aglorand:
    account:
        mnemonic:portion never forward pill lunch organ biology weird catch curve isolate plug innocent skin grunt bounce clown mercy hole eagle soul chunk type absorb trim
        seed:AJNNFQN7DSR7QEY766V7JDG35OPM53ZSNF7CU264AWOOUGSZBMLMSKCRIU

Which in turn presents us with a decision to make on behalf of the user. Do we A. call Account(String mnemonic) B. call Account(byte[] seed) C. Throw a validation error?

gitcoinbot commented 3 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 500.0 ALGO (436.89 USD @ $0.9/ALGO) has been submitted by:


beakersoft commented 3 years ago

@michielmulders for info i have submited my repo/blog post algofundme. Let me know if there are any issues with it!

babcoccl commented 3 years ago

@Mine77 code reflecting what I mean can be found here: https://github.com/babcoccl/algorand-spring-boot-starter/blob/main/src/main/java/org/algorand/config/AccountConfig.java

Mine77 commented 3 years ago

@babcoccl I see what you mean here. So first of all, the seed is supposed to be a private key in the format of a byte array. So it will not be a human-readable string. What you put in the seed there is an address, generated from a public key. Considering this is a config file and the user would enter the parameters in here manually, I would suggest you use mnemonic, and mnemonic only, which is a string consisting of 25 words.

Mine77 commented 3 years ago

@michielmulders for info i have submited my repo/blog post algofundme. Let me know if there are any issues with it!

Hi @beakersoft , thanks for the submission and we have received it. We will review it and if there's anything we would like you to improve, we will leave a comment in the article.

babcoccl commented 3 years ago

@babcoccl I see what you mean here. So first of all, the seed is supposed to be a private key in the format of a byte array. So it will not be a human-readable string. What you put in the seed there is an address, generated from a public key. Considering this is a config file and the user would enter the parameters in here manually, I would suggest you use mnemonic, and mnemonic only, which is a string consisting of 25 words.

Ok, I will remove the seed logic. Another question, in the SDK there is a version 2 of some classes and then what I assume is version 1. What version of the classes should I be looking to integrate against.

michielmulders commented 3 years ago

@michielmulders for info i have submited my repo/blog post algofundme. Let me know if there are any issues with it!

@beakersoft We can't accept your submission because it's not really an integration with a framework and we already have someone working on Vue.js. Thanks for your effort! Feel free to apply with other ideas and run them through us

michielmulders commented 3 years ago

@realphi Thank you for your integration proposal using Koa. As we're already covering Express.js, we don't need this integration at the moment. I'll ping you to start work if we get sufficient requests to provide a starterkit using Koa but for now we don't need it sorry. Thanks!

michielmulders commented 3 years ago

@paulohaacke I'm sorry, @michaelockenden is already working on a Flask integration with Algorand. @michaelockenden can you give me an update on the integration status?

Also repeating here the goal of integrations:

The goal is to create a project that shows other developers how you can fetch and display assets, balances, transactions, your profile, etc. So, your project should develop this code and then you can showcase it/describe in the blog post. We want as many possible components/recipes to be part of the project so people can get started easily when they want to use Spring Boot to develop on Algorand.

michielmulders commented 3 years ago

@urajbhandari this bounty is for integrations and we already have someone working on Spring Boot. Sorry!

michaelockenden commented 3 years ago

Hi @michielmulders , so far I've integrated a lot of the algod client API, like checking your balance and creating transactions. Next, I'm going to use the Indexer so I can start displaying users' historic transactions.

paulohaacke commented 3 years ago

Hi @michielmulders, i'm sad to hear that. I'm new to this bounty/gitcoin world and I got under the impression that this bounty was like a contest where I was going to compete with other submissions, so I started working on it last week, and just yesterday, when almost everything was done, that I clicked on the button "Start Work " inside gitcoin. I already created integration with algod, indexer and kmd using a private algorand network. All that is left is to improve some parts of the code, better handle errors and create the blog post.

Although i didn't commit it to the repository yet, you can take a look at the UI in https://algorand-flask-app-dev-paulohaacke.cloud.okteto.net/wallets .

michielmulders commented 3 years ago

I'm sorry! @paulohaacke If you want to do another integration, please ask first and check what submissions we've already received or if they exist in the Developer Portal. You can easily port your knowledge for other integrations :)

mwood77 commented 3 years ago

Hi @michielmulders , are you still accepting proposals/submissions this late? I see on GitCoin that this bounty is about to expire. Shame I saw it so late. Thanks!

babcoccl commented 3 years ago

@michielmulders are there any examples of how to use the execute command to query the AccountInformation object in the Java SDK? I notice that the C# SDK provides some nice pre-canned methods for retrieving data but the Java SDK 'execute' method is a bit ambigous.

realphi commented 3 years ago

@realphi Thank you for your integration proposal using Koa. As we're already covering Express.js, we don't need this integration at the moment. I'll ping you to start work if we get sufficient requests to provide a starterkit using Koa but for now we don't need it sorry. Thanks!

OK, thanks for notifying me. I am looking forward to other ways to contribute.

gitcoinbot commented 3 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 500.0 ALGO (461.92 USD @ $0.94/ALGO) has been submitted by:

  1. @beakersoft
  2. @shumin
  3. @slava096
  4. @babcoccl

@michielmulders please take a look at the submitted work:


babcoccl commented 3 years ago

@michielmulders I have updated my repos with a spring-boot-starter and demo project. Will be adding tutorial documentation tomorrow. Have examples of things you requested back here (https://github.com/algorandfoundation/grow-algorand/issues/41#issuecomment-867640050) Links to repos: https://github.com/babcoccl/algorand-spring-boot-starter https://github.com/babcoccl/algorandStarterdemo

michaelockenden commented 3 years ago

Hi @michielmulders , I've mostly finished my work on the Flask integrated demo wallet so I've made that repository public. I've also started working on the blog post and should have it done tomorrow.

babcoccl commented 3 years ago

@michielmulders I have submitted my work. Spring boot starter: https://github.com/babcoccl/algorand-spring-boot-starter Demo Spring Web API: https://github.com/babcoccl/algorandStarterdemo Tutorial Blog Article: https://developer.algorand.org/tutorials/restful-algorand-api-with-spring-boot/

Let me know if you would like any additional detail or integrations shown. I was going to do submitting a transaction but given the other tutorials in Java explaining transaction I thought it was moot to just repackage it as an API call.

michielmulders commented 3 years ago

Hi @michielmulders , are you still accepting proposals/submissions this late? I see on GitCoin that this bounty is about to expire. Shame I saw it so late. Thanks!

Yes we are still accepting submissions, let me know which framework you would like to integrate?

michielmulders commented 3 years ago

@michielmulders I have submitted my work. Spring boot starter: https://github.com/babcoccl/algorand-spring-boot-starter Demo Spring Web API: https://github.com/babcoccl/algorandStarterdemo Tutorial Blog Article: https://developer.algorand.org/tutorials/restful-algorand-api-with-spring-boot/

Let me know if you would like any additional detail or integrations shown. I was going to do submitting a transaction but given the other tutorials in Java explaining transaction I thought it was moot to just repackage it as an API call.

Received, it's assigned to one of the team members

michielmulders commented 3 years ago

Hi @michielmulders , I've mostly finished my work on the Flask integrated demo wallet so I've made that repository public. I've also started working on the blog post and should have it done tomorrow.

Let me know once it's complete. Submit it via Gitcoin + dev portal please

NoelJacob commented 3 years ago

Hi @michielmulders , are you still accepting proposals/submissions this late? I see on GitCoin that this bounty is about to expire. Shame I saw it so late. Thanks!

Yes we are still accepting submissions, let me know which framework you would like to integrate?

Thank you, I'm still working on my Svelte integration.

michielmulders commented 3 years ago

@shumin we already have people working on Flask sorry!

michaelockenden commented 3 years ago

Hi @michielmulders , I've mostly finished my work on the Flask integrated demo wallet so I've made that repository public. I've also started working on the blog post and should have it done tomorrow.

Let me know once it's complete. Submit it via Gitcoin + dev portal please

I submitted on Gitcoin and the dev portal. Here's the link for the blog post: https://developer.algorand.org/solutions/creating-a-demo-wallet-using-flask/

michielmulders commented 3 years ago

@michaelockenden I've provided you with some feedback in the developer portal on your blog submission!