GoodWeb3-Mono packages GoodDollar's web3 tooling in a Yarn 3 workspace. Keep changes scoped, reproducible, and compatible across the SDK, login, and design layers before merging.
packages/sdkandpackages/sdk-v2expose the core TypeScript SDKs;src/holds modules,dist/andtypes/are generated.packages/login-sdkdelivers authentication helpers; align API changes with the SDKs.packages/good-designis the component library with Storybook config under.storybook/and assets copied intodist/assets.- Root
dev-release/runs scripted releases, whilestorybook-release/anddist/host publishable artifacts. Avoid editing any generated output by hand.
yarninstalls workspace dependencies and runs package-level bootstraps.yarn buildtriggersyarn workspaces foreach --topological-dev run buildto emit all package bundles.yarn workspace @gooddollar/web3sdk build(or analogous package names) rebuilds a single module; addbuild:devwhen you need ctix-generated barrel files.yarn lintandyarn lint:fixenforce the shared ESLint + Prettier rules.yarn storybookserves the design system locally;yarn workspace @gooddollar/good-design build-storybookproduces the static preview.
Follow the root ESLint config and .prettierrc (double quotes, 120-char lines, 2-space indents, trailing commas disabled). Export barrels via ctix, and publish packages under the @gooddollar/* scope. Prefer explicit function and hook names that reflect protocol domains (e.g., useClaimRewards).
Use Jest via each workspace (yarn workspace @gooddollar/web3sdk test, yarn workspace @gooddollar/good-design test). Maintain deterministic mocks for blockchain calls and update Storybook stories alongside UI changes. Snapshot updates must include justification in the PR.
Commit messages follow conventional prefixes (feat, fix, docs, etc.) with concise scopes; release bumps mirror the package name in quotes (e.g., "0.4.24" @gooddollar/good-design). Every PR should link the related issue, describe contract or UI impacts, list test commands, and add screenshots or Storybook URLs for visual tweaks. Run yarn lint and the relevant package build before requesting review.
Local package consumers rely on yalc publish --push; remember to regenerate dist/ and types/ first. Use yarn release:beta for coordinated prereleases, and keep ethers version overrides aligned with the root resolutions entry.