Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a comprehensive frontend guide for building functional user interfaces for dapps using a terminal user interface (TUI) #655

Open
briwylde08 opened this issue Jun 6, 2024 · 4 comments
Assignees
Labels
Docs Bounty An issue eligible for you to complete for the Docs Bounty!

Comments

@briwylde08
Copy link
Contributor

Get awarded: up to $1,000 worth of XLM
Section: How-To Guides - Dapp Development: https://github.com/stellar/stellar-docs/tree/main/docs/smart-contracts/guides/dapps

@pius
Copy link

pius commented Jun 6, 2024

@briwylde08 thanks for opening this! I'd like to take this on as per the discussion at #612 😀

@ElliotFriend thanks for the vote of approval! you asked:

I'm curious what [“just meant to be served over ssh instead of http”] means "mechanically." Is there some "backend" service that the TUI would interact with (assuming via SSH)? Or, is the TUI interacting directly with contract that's deployed on-chain (like if the TUI is itself building/simulating/submitting transactions, querying rpc, etc.; or maybe kinda like if someone made a "wrapper" around the Soroban-CLI to interact with a specific contract, if that makes sense)?

just to level set for anyone reading, it's good to remember that SSH is the "Secure SHell protocol" — so when we "SSH" into a computer, we're just asking the SSH server to securely present a shell program so that we can interact with the computer. typically that shell program is something like Bash, but it can be any program we want! so at the most basic mechanical level, if one wanted to serve this over SSH, they would just have their SSH server present our custom TUI as the shell.

how precisely the TUI interacts with the contract is really just a design choice. of course, one can certainly just build the transactions from scratch, but the approach I'm going highlight is how to go with the grain of the UNIX philosophy and the Soroban ecosystem.

  • the UNIX philosophy recommends composing small programs that "do one thing and do it well"
  • Soroban has a thoughtfully designed developer affordance to automatically generate just such a small program for each contract

so I'm going to orient my guide around an architecture leveraging the power of that combination =)

@ElliotFriend
Copy link
Contributor

This sounds awesome! I'm really excited to see how it shapes up!!

@silence48
Copy link
Contributor

@briwylde08 I have created a guide for making a Terminal interface for the comet liquidity pool contracts; using typescript and the node library 'inquirer' I also created a repository with the example project so it's easier to follow along at
https://github.com/silence48/Comet-TUI
The pull request is #665
Hoping we see some more examples, would love to see a simple bash script that uses soroban-cli and maybe a python and a ruby implementation! Powershell would be cool too! I also am hoping people who build on top of the typescript one i published will merge back any good updates to my repo :)

Thanks That was fun.

@briwylde08
Copy link
Contributor Author

This is great @silence48! Excited to take a look. @pius please feel free to continue your own work on this prompt!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Bounty An issue eligible for you to complete for the Docs Bounty!
Projects
Status: In Review
Development

No branches or pull requests

5 participants
@pius @ElliotFriend @silence48 @briwylde08 and others