@@ -4,18 +4,20 @@ globs: *.tsx
44alwaysApply: false
55---
66
7- 1. Do not write any backend code. Just frontend logic.
8- 2. For any backend requirements, create mock responses. Use a function to return mock data so I can easily swap it out later.
9- 3. When creating mock data, always specify it in a dedicated `mock.ts` file
10- 4. Load mock data using a react router `clientLoader`. Use the Skeleton component to present a loading state.
11- 5. Store components for each major page or workflow in `src/components/$WORKFLOW_OR_PAGE_NAME`.
12- 6. Use lowercase dash separated words for file names.
13- 8. Use React 19, TypeScript, Tailwind CSS, and ShadCN components.
14- 9. Prefer functional components, hooks over classes.
15- 10. Break up large components into smaller components, but keep them in the same file unless they can be generalized.
16- 11. Put any "magic" strings like API keys, hosts, etc into a "constants.ts" file.
17- 12. Only use a separate interface for component props if there are more than 4 props.
18- 13. Internally, store all currency values as integers and convert them to floats when rendering visually
19- 14. use `pnpm` not `npm`
20- 15. Node libraries are not available
21- 16. Never edit the `components/ui/*.tsx` files
7+ - Do not write any backend code. Just frontend logic.
8+ - For any backend requirements, create mock responses. Use a function to return mock data so I can easily swap it out later.
9+ - When creating mock data, always specify it in a dedicated `mock.ts` file
10+ - Load mock data using a react router `clientLoader`. Use the Skeleton component to present a loading state.
11+ - If a complex skeleton is needed, create a component function `LoadingSkeleton` in the same file.
12+ - Store components for each major page or workflow in `src/components/$WORKFLOW_OR_PAGE_NAME`.
13+ - Use lowercase dash separated words for file names.
14+ - Use React 19, TypeScript, Tailwind CSS, and ShadCN components.
15+ - Prefer functional components, hooks over classes.
16+ - Break up large components into smaller components, but keep them in the same file unless they can be generalized.
17+ - Put any "magic" strings like API keys, hosts, etc into a "constants.ts" file.
18+ - Only use a separate interface for component props if there are more than 4 props.
19+ - Internally, store all currency values as integers and convert them to floats when rendering visually
20+ - Never edit the `components/ui/*.tsx` files
21+ - When building forms use React Hook Form.
22+ - Include a two line breaks between any `useHook()` calls and any `useState()` definitions for a component.
23+
0 commit comments