

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1234## React Router567- You are using the latest version of React Router (v7).8- Always include the suffix `Page` when naming the default export of a route.9- 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`.10- Use `href("/products/:id", { id: "abc123" })` to generate a url path for a route managed by the application.11 - Look at [routes.ts](mdc:web/app/routes.ts) to determine what routes and path parameters exist.12- Use `export async function clientLoader(loaderArgs: Route.ClientLoaderArgs)` to define a `clientLoader` on a route.13- Do not define `Route.*` types, these are autogenerated and can be imported from `import type { Route } from "./+types/routeFileName"`14- 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`15- Never worry about generating types using `pnpm`16- Use [`<AllMeta />`](web/app/components/shared/AllMeta.tsx) instead of MetaFunction or individual `<meta />` tags17- Use the following pattern to reference query string values (i.e. `?theQueryStringParam=value`)1819```typescript20const [searchParams, _setSearchParams] = useSearchParams()21// searchParams contains the value of all query string parameters22const queryStringValue = searchParams.get("theQueryStringParam")23```2425### Loading Mock Data2627Don't load mock data in the component function with `useEffect`. Instead, load data in a `clientLoader`:2829```typescript30// in mock.ts31export async function getServerData(options: any) {32 // ...33}3435// in web/app/routes/**/*.ts36export async function clientLoader(loaderArgs: Route.ClientLoaderArgs) {37 // no error reporting is needed, this will be handled by the `getServerData`38 // mock loading functions should return result in a `data` key39 const { data } = await getServerData({40 /* ... */41 });4243 // the return result here is available in `loaderData`44 return data;45}46```4748### How to Use `clientLoader`4950- `export async function clientLoader(loaderArgs: Route.ClientLoaderArgs) {`51- Load any server data required for page load here, not in the component function.52- Use `return redirect(href("/the/url"))` to redirect users53- Use [getQueryParam](web/app/lib/utils.ts) to get query string variables54- `throw new Response` if you need to mimic a 400, 500, etc error55- `loaderArgs` and all sub-objects are all fully typed56- `loaderArgs.params.id` to get URL parameters5758### Loading Backend Data5960- `~/configuration/client` re-exports all types and functions from `client/*`. Import from `~/configuration/client` instead of anything you find in the `client/` folder/package.61- 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.62 - Do not generate types for API parameters or responses. Reference the autogenerated types that are re-exported in `~/configuration/client`63 - For instance, the `getSignedUrl` function in [web/client/sdk.gen.ts] has a `SignedUrlResponse` type in [web/client/types.gen.ts]64 - This same type is used in the function signature, i.e. `type SignedUrlResponse = Awaited<ReturnType<typeof getSignedUrl>>["data"]`6566- When using an import from `~/configuration/client`:67 - use `body:` for request params68 - always `const { data, error } = await theCall()`6970`clientLoader` can only be used on initial page load within a route. If you need to load additional server data on component mount:7172```tsx73import { useQuery } from "@tanstack/react-query"74import {75 // these options correspond to the server route76 createCheckoutSessionOptions,77 publicClient,78} from "~/configuration/client"7980function TheComponent() {81 const { data, error } = useQuery({82 enabled: open,83 ...createCheckoutSessionOptions({84 // or `client` if authenticated85 client: publicClient,86 body: { /* API parameters here */ },87 }),88 })8990 // remember to display errors by checking `error`91}92```93
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-router.mdc · 13 | Cursor rules | testing-strategy | 57/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 |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| pytorch/pytorch.github/copilot-instructions.md · 102k | Copilot instructions | setupbuildteststyle+5 | 100/100 | 14 days ago | |
| hiyouga/LlamaFactory.github/copilot-instructions.md · 74k | Copilot instructions | setupbuildtestlint-format+5 | 97/100 | 13 days ago | |
| darkmatter/nixmac.github/copilot-instructions.md · 25 | Copilot instructions | setupbuildtestlint-format+8 | 96/100 | 14 days ago | |
| doubts-suplab/eeik-bootstrap.github/instructions/cdk-terraform.instructions.md · 1 | Copilot instructions | teststylearchtypes+2 | 96/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/java-quality.instructions.md · 1 | Copilot instructions | testlint-formatstyletesting-strategy+3 | 93/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/python.instructions.md · 1 | Copilot instructions | testlint-formatstyletypes+3 | 93/100 | today | |
| iloveitaly/llm-ide-rules.github/copilot-instructions.md · 13 | Copilot instructions | teststyledo-notagent-behaviour+1 | 92/100 | 14 days ago | |
| gasbasd/mtg-utils.github/copilot-instructions.md · 0 | Copilot instructions | setupbuildtestlint-format+3 | 89/100 | 8 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-github-instructions-react-router-instructions)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.