paritytech / capi

[WIP] A framework for crafting interactions with Substrate chains
https://docs.capi.dev
Apache License 2.0
104 stars 10 forks source link

An interesting experiment #1144

Open statictype opened 1 year ago

statictype commented 1 year ago

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:

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!

harrysolovay commented 1 year ago

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