Instructions for agents working on erp-ui
These are the building blocks every brick's screens use. A change here reaches every product.
- Build on Radix. Use
@radix-ui/themescomponents and tokens; no other UI library, no hard-coded colours, sizes or fonts — a client rebrands through the theme, and that only works if nothing bypasses it. - Money is a string. Never
Number(),parseFloator arithmetic on an amount; format and compare withlib/format.ts. - Every component handles its own loading, empty and error states, and has a test with the axe check
(
tests/helpers.tsx). A test for a guarantee (exact sorting, disabled-with-reason) must fail when the guarantee is broken — check it by breaking it. - The contract (
src/contract.ts) is what lets assembly be monolithic, federated or standalone. Change it only additively; a brick UI built against 0.1 must still load. - After changing a component:
npm test,npm run typecheck,npx shadcn build --output public/r. @dodilio/ui-design-lib(GitHub) is inspiration only; development happens in Dodil Git. Don't add it as a dependency.