Regen network UI for Cosmos groups module
yarn install- copy over the config
cp .env.local.example .env.localand set any missing variables yarn devto run the repo- (optional)
yarn storybookto see component examples
make install-local-ledger - this will install the regen ledger binary to local-ledger/regen in order to be used by other makefile commands. Note: this will wipe any existing local regen ledger data
Run the following in order for initial project setup, then re-run to wipe local ledger data
make local-clean- wipe prior local ledger datamake local-init- set up local ledger, user wallets / accounts, seed fundsmake local-start- run local nodemake bank-send- send funds to the wallet address listed below
You'll need to import generated wallet info into Keplr in order to test features:
(from USER in the makefile)
high return silly coyote skin trumpet stock bicycle enjoy common exact sure
If you're using VSCode, it's recommended you install the eslint + prettier extensions and copy over the suggested workspace settings:
cp .vscode/settings.suggested.json .vscode/settings.jsonThis project is organized by Atomic Design principals for UI components:
📦src
┣ 📂components
┃ ┣ 📂atoms - elements which can't be reduced to something simpler
┃ ┃ ┗ 📜index.ts
┃ ┣ 📂molecules - collection of atoms
┃ ┣ 📂organisms - more complex elements made up of atoms, molecules, and (sometimes) other organisms
┃ ┗ 📂templates - viewport positioning and layout
┗ 📂pages - implementations of templates
Some relevant notes / Highlights:
- Outer padding and margin should be set by parents components - ie, an
Atomshould not havemarginset on the outer element - instead, it would be set by its parent component Atomshaveindex.tsbarrel files for convenience (ieimport { Box, Button } from '@/atoms'), butMolecules,Organisms,Templates, andPagesdo not. This is to avoid circular imports which can impact code splitting
Ledger calls & typescript types are generated using telescope, and reside in another package
- Because queries are currently handled through REST / LCD clients, property values are
camel_case- this means the types used in this project won't work on RPC clients (relevant cosmos-sdk issue) - Some types are manually combined / modified to ease the use in UI. These are prefixed with
UI(e.g. theUIGrouptype represnts a sdkChainInfowith typedmetadatawhich the UI creates)
- Chakra - UI Components
- Valtio and Jotai - global state
- React Query - API calls / Query caching
- Zod - form validation
yarn lint - format with Prettier, fix linting errors