| paths | |
|---|---|
|
[[schema.graphql]]- the single GraphQL schema from Strawberry
- [[routes.ts]] - has react-router
RouteConfig, usingsrc/urls.tsthat hasexport const urls = { ... }(for use asurls.reviews.list). src/apps/- aims to mirrorserver/neuronhub/apps/- has specialized dirs to match the react-router urls structure, eg has both
/postsandreviews/. - react-router v7
export defaultare in emptyindex.tsxfiles. - when a component or hook are used only by one page - it's placed in same dir as react-router
index.tsx.
- has specialized dirs to match the react-router urls structure, eg has both
src/apps/highlighter- badly written apps.highlighter UI logicsrc/components/- components shared betweensrc/apps/- [[LayoutContainer.tsx]] (and [[LayoutSidebar.tsx]]) used in [[root.tsx]]
forms/- Chakra inputs adapted for react-hook-form.posts/- shared code for allPostreact-hook-forms.posts/form/*.tsx- fields for use inPostforms.posts/form/[[schemas.ts]]- all Zodexport namespace schemasforPostreact-hook-forms, and serializers + deserializers.ui/- deprecated trash "Closed Components" forced by the old @chakra-ui. Do not use unless necessary. Most of them are replaceable with the new@chakra-ui/reactexports.
- GraphQL
- [[mutateAndRefetchMountedQueries.tsx]] - use it instead
client.mutate() - [[useApolloQuery.ts]] - use instead of the broken
useQuery, including itsisLoadingFirstTimeinstead ofloading src/graphql/[[client.ts]]- Apolloexport const clientfor when you need exceptionssrc/[[codegen.ts]]- is only used for TS enums generation - all GraphQL types are handled by gql.tada.
- [[mutateAndRefetchMountedQueries.tsx]] - use it instead
src/theme/- @chakra-ui theme config and semantic tokenssrc/[[env.ts]]- typedexport const enve2e/- Playwright with itse2e/tests
We save all client/ queries to the whitelist at [[server/persisted-queries.json]] with gql.tada CLI (during mise lint) - Strawberry rejects all by default.
Note: toast.error() from [[client/src/utils/toast.tsx]] also calls Sentry.captureException.
- instead of
useStateuse [[useStateValtio.ts]]. Unless there's a significant maintenance/performance benefit in theuseState
- JS ecosystem is trash.
- Playwright adds extreme maintenance cost.
- GraphQL cache is unmaintainable - don't use it.
- React state management became legacy after the
Proxyobjects. - React Router server API, Server Components, and SSR are bad, and aren't used.