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

First OKP4 boilerplate, with Vite #2

Merged
merged 26 commits into from
Sep 25, 2023
Merged

Conversation

antho31
Copy link
Owner

@antho31 antho31 commented Sep 20, 2023

Here is the first UI Starter to interact with the OKP4 protocol (with smart contracts).

It provides all the basic pieces of code to:

  • connect with a wallet (Keplr, Leap and even Metamask !)
  • get balance
  • get contracts list
  • get transactions list, decode data
  • create cognitarium (RDF triples data store) & law stone (Prolog program rules store) smart contract instances
  • insert data in a cognitarium instance
  • select data from a cognitarium instance (SPARQL select)
  • evaluate a Prolog rule (law stone query)

A step-by-step tutorial will be published soon based on this boilerplate.

FYI @lolottetheclash @ErikssonJoakim @AnjaMis @Yoj16
I'm not used to coding frontends and am not comfortable with CSS coding. Please provide a better UI if necessary. You can take the opportunity to see how interactions with the OKP4 blockchain are possible.

@antho31 antho31 self-assigned this Sep 20, 2023
@ccamel ccamel requested a review from bdeneux September 20, 2023 13:31
vite/.eslintrc.cjs Outdated Show resolved Hide resolved
vite/package.json Outdated Show resolved Hide resolved
vite/tsconfig.json Outdated Show resolved Hide resolved
vite/vite.config.ts Show resolved Hide resolved
Copy link
Contributor

@bdeneux bdeneux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@antho31 Is this wanted that all sources file are located in a vite folder ?

@antho31
Copy link
Owner Author

antho31 commented Sep 21, 2023

@antho31 Is this wanted that all sources file are located in a vite folder ?

Yes, I propose a monorepo, expect more boilerplates with other frameworks (svelte, ...) later ;)

@antho31
Copy link
Owner Author

antho31 commented Sep 21, 2023

@ErikssonJoakim autoprefixer fixed, thanks for the feedback

vite/README.md Outdated Show resolved Hide resolved
vite/package.json Outdated Show resolved Hide resolved
vite/src/App.css Outdated Show resolved Hide resolved
@antho31
Copy link
Owner Author

antho31 commented Sep 25, 2023

FYI - PR linked to a tutorial (axone-protocol/docs#318)

Copy link
Collaborator

@ccamel ccamel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright. Let's proceed with this initial step.

Copy link

@amimart amimart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx for this first boilerplate, nice to see enhancements to DX 😉

I'll note here some ideas of improvements that should be considered (or not) before going public :):

  • Dedicate this repository as the vite boilerplate instead of making it a monorepo containing all the boilerplates.
  • Consider a CI ensuring code quality, this also means defining the expected quality of boilerplate :).
  • Make configurable some constants like rpc URL.

Copy link
Contributor

@bdeneux bdeneux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@antho31
Copy link
Owner Author

antho31 commented Sep 25, 2023

Thanks for your feedback!

  • Let's rename this repo "okp4-vite-starter" (or any other name)? Thus giving up the mono repo idea would fix the deployment issue, as we can use GitHub Pages easily 🥳

  • @amimart Should I be precise in README that the constants.ts is a configuration file (where you can change RPC URL, ...)? Or use a .env file to avoid misconfiguration? I guess the second option is better. Apart from REST & RPC urls, do you see specific constants to be configurable?

  • I agree with the CI, Is anyone interested in helping me on this? I don't know how to approach this subject

@bdeneux
Copy link
Contributor

bdeneux commented Sep 25, 2023

Thanks for your feedback!

  • Let's rename this repo "okp4-vite-starter" (or any other name)? Thus giving up the mono repo idea would fix the deployment issue, as we can use GitHub Pages easily 🥳
  • @amimart Should I be precise in README that the constants.ts is a configuration file (where you can change RPC URL, ...)? Or use a .env file to avoid misconfiguration? I guess the second option is better. Apart from REST & RPC urls, do you see specific constants to be configurable?
  • I agree with the CI, Is anyone interested in helping me on this? I don't know how to approach this subject

@antho31 I can help you for the CI if you want ;)

@antho31 antho31 force-pushed the feat/vite-step-by-step-tuto branch from 8354ab6 to ab8e533 Compare September 25, 2023 12:51
@antho31 antho31 merged commit 60bfbd5 into main Sep 25, 2023
@antho31 antho31 deleted the feat/vite-step-by-step-tuto branch September 25, 2023 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants