capi icon indicating copy to clipboard operation
capi copied to clipboard

An interesting experiment

Open statictype opened this issue 2 years ago • 1 comments

I would like to urge the maintainers to go through an experiment of their own and use Capi from the perspective of a regular app builder. It can serve as an example for all other developers who are struggling to figure out how to best use Capi in their existing projects and boost confidence in the product. Not to mention it might surface potential improvements to the devx.

For this purpose, the ideal app has the following requirements:

  • it should use React and run on Node.js
  • it should not make use of a web server to communicate with the blockchain
  • it should be reactive and provide feedback to the user
  • it should have multiple pages and make use of a router (preferably react-router)
  • it should work with wallet accounts
  • it should connect to different chains

Features

Real time page

A basic block explorer page, showing latest blocks, recent events and latest finalized block in real-time. Something similar to the polkadot.js explorer

Screenshot 2023-07-06 at 16 14 10

User interaction page

A form to input data for a transaction of your choosing. Can be a balance transfer, but preferably something more complicated. The submit button should be disabled while the transaction is processing. After a completed transaction, the user should be redirected to another page, where information about the submitted transaction is shown (name of the method, params). In case of an error, it should be displayed to the user as well.

Notifications

Toast notifications for ongoing transactions (status and events)

Chain switch

The app should connect to different relay chains and parachains (Polkadot, Kusama and some parachains of your choosing) via a dropdown or URL param containing the rpc node endpoint. (common pattern for dapps)

Looking forward to seeing this live!

statictype avatar Jul 06 '23 16:07 statictype

This is an interesting proposal; we will consider it and follow up here when we can.

harrysolovay avatar Jul 07 '23 17:07 harrysolovay