

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
123456## React Router789- You are using the latest version of React Router (v7).10- Always include the suffix `Page` when naming the default export of a route.11- The primary export in a routes file should specify `loaderData` like `export default function RouteNamePage({ loaderData }: Route.ComponentProps)`. `loaderData` is the return value from `clientLoader`.12- Use `href("/products/:id", { id: "abc123" })` to generate a url path for a route managed by the application.13 - Look at [routes.ts](mdc:web/app/routes.ts) to determine what routes and path parameters exist.14- Use `export async function clientLoader(loaderArgs: Route.ClientLoaderArgs)` to define a `clientLoader` on a route.15- Do not define `Route.*` types, these are autogenerated and can be imported from `import type { Route } from "./+types/routeFileName"`16- If URL parameters or query string values need to be checked before rendering the page, do this in a `clientLoader` and not in a `useEffect`17- Never worry about generating types using `pnpm`18- Use [`<AllMeta />`](web/app/components/shared/AllMeta.tsx) instead of MetaFunction or individual `<meta />` tags19- Use the following pattern to reference query string values (i.e. `?theQueryStringParam=value`)2021```typescript22const [searchParams, _setSearchParams] = useSearchParams()23// searchParams contains the value of all query string parameters24const queryStringValue = searchParams.get("theQueryStringParam")25```2627### Loading Mock Data2829Don't load mock data in the component function with `useEffect`. Instead, load data in a `clientLoader`:3031```typescript32// in mock.ts33export async function getServerData(options: any) {34 // ...35}3637// in web/app/routes/**/*.ts38export async function clientLoader(loaderArgs: Route.ClientLoaderArgs) {39 // no error reporting is needed, this will be handled by the `getServerData`40 // mock loading functions should return result in a `data` key41 const { data } = await getServerData({42 /* ... */43 });4445 // the return result here is available in `loaderData`46 return data;47}48```4950### How to Use `clientLoader`5152- `export async function clientLoader(loaderArgs: Route.ClientLoaderArgs) {`53- Load any server data required for page load here, not in the component function.54- Use `return redirect(href("/the/url"))` to redirect users55- Use [getQueryParam](web/app/lib/utils.ts) to get query string variables56- `throw new Response` if you need to mimic a 400, 500, etc error57- `loaderArgs` and all sub-objects are all fully typed58- `loaderArgs.params.id` to get URL parameters5960### Loading Backend Data6162- `~/configuration/client` re-exports all types and functions from `client/*`. Import from `~/configuration/client` instead of anything you find in the `client/` folder/package.63- For each API endpoint, there's a fully typed async function that can be used to call it. Never attempt to call an API endpoint directly.64 - Do not generate types for API parameters or responses. Reference the autogenerated types that are re-exported in `~/configuration/client`65 - For instance, the `getSignedUrl` function in [web/client/sdk.gen.ts] has a `SignedUrlResponse` type in [web/client/types.gen.ts]66 - This same type is used in the function signature, i.e. `type SignedUrlResponse = Awaited<ReturnType<typeof getSignedUrl>>["data"]`6768- When using an import from `~/configuration/client`:69 - use `body:` for request params70 - always `const { data, error } = await theCall()`7172`clientLoader` can only be used on initial page load within a route. If you need to load additional server data on component mount:7374```tsx75import { useQuery } from "@tanstack/react-query"76import {77 // these options correspond to the server route78 createCheckoutSessionOptions,79 publicClient,80} from "~/configuration/client"8182function TheComponent() {83 const { data, error } = useQuery({84 enabled: open,85 ...createCheckoutSessionOptions({86 // or `client` if authenticated87 client: publicClient,88 body: { /* API parameters here */ },89 }),90 })9192 // remember to display errors by checking `error`93}94```95
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| iloveitaly/llm-ide-rules.cursor/rules/python.mdc · 13 | Cursor rules | setupstyletypesdo-not | 88/100 | 14 days ago | |
| iloveitaly/llm-ide-rules.cursor/rules/alembic-migrations.mdc · 13 | Cursor rules | no sections | 50/100 | 14 days ago | |
| iloveitaly/llm-ide-rules.cursor/rules/fastapi.mdc · 13 | Cursor rules | no sections | 24/100 | 14 days ago | |
| iloveitaly/llm-ide-rules.cursor/rules/general.mdc · 13 | Cursor rules | teststyledo-notagent-behaviour+1 | 92/100 | 14 days ago | |
| iloveitaly/llm-ide-rules.cursor/rules/justfiles.mdc · 13 | Cursor rules | do-not | 31/100 | 14 days ago | |
| iloveitaly/llm-ide-rules.cursor/rules/pytest-integration-tests.mdc · 13 | Cursor rules | teststyletesting-strategy | 73/100 | 14 days ago | |
| iloveitaly/llm-ide-rules.cursor/rules/pytest-tests.mdc · 13 | Cursor rules | testarchtesting-strategyapi+1 | 61/100 | 14 days ago | |
| iloveitaly/llm-ide-rules.cursor/rules/python-app.mdc · 13 | Cursor rules | styledatabasedocs | 61/100 | 14 days ago | |
| iloveitaly/llm-ide-rules.cursor/rules/python-route-tests.mdc · 13 | Cursor rules | api | 24/100 | 14 days ago | |
| iloveitaly/llm-ide-rules.cursor/rules/react.mdc · 13 | Cursor rules | styletesting-strategyuido-not | 60/100 | 14 days ago | |
| iloveitaly/llm-ide-rules.cursor/rules/shell.mdc · 13 | Cursor rules | no sections | 4/100 | 14 days ago | |
| iloveitaly/llm-ide-rules.cursor/rules/typescript.mdc · 13 | Cursor rules | styletypessecurity | 63/100 | 14 days ago | |
| iloveitaly/llm-ide-rules.github/copilot-instructions.md · 13 | Copilot instructions | teststyledo-notagent-behaviour+1 | 92/100 | 14 days ago | |
| iloveitaly/llm-ide-rules.github/instructions/alembic-migrations.instructions.md · 13 | Copilot instructions | no sections | 50/100 | 14 days ago | |
| iloveitaly/llm-ide-rules.github/instructions/fastapi.instructions.md · 13 | Copilot instructions | no sections | 16/100 | 14 days ago | |
| iloveitaly/llm-ide-rules.github/instructions/justfiles.instructions.md · 13 | Copilot instructions | do-not | 31/100 | 14 days ago | |
| iloveitaly/llm-ide-rules.github/instructions/pytest-integration-tests.instructions.md · 13 | Copilot instructions | teststyletesting-strategy | 65/100 | 14 days ago | |
| iloveitaly/llm-ide-rules.github/instructions/pytest-tests.instructions.md · 13 | Copilot instructions | testarchtesting-strategyapi+1 | 53/100 | 14 days ago | |
| iloveitaly/llm-ide-rules.github/instructions/python-app.instructions.md · 13 | Copilot instructions | styledatabasedocs | 61/100 | 14 days ago | |
| iloveitaly/llm-ide-rules.github/instructions/python-route-tests.instructions.md · 13 | Copilot instructions | api | 16/100 | 14 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 46 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 14 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 46 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 14 days ago | |
| nerds-odd-e/doughnut.cursor/rules/cli.mdc · 49 | Cursor rules | setupbuildteststyle+4 | 96/100 | 14 days ago | |
| enuno/unifi-mcp-server.cursor/rules/common-mistakes.mdc · 226 | Cursor rules | testlint-formatgitdo-not | 93/100 | today | |
| iloveitaly/llm-ide-rules.cursor/rules/general.mdc · 13 | Cursor rules | teststyledo-notagent-behaviour+1 | 92/100 | 14 days ago | |
| dotCMS/core.cursor/rules/e2e-rules.mdc · 949 | Cursor rules | setupteststylearch+5 | 89/100 | 14 days ago | |
| danielvm-git/bigpowers.cursor/rules/guard-git.mdc · 139 | Cursor rules | stylearchgitsecurity+2 | 89/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/iloveitaly-llm-ide-rules-cursor-rules-react-router)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.