thehardwarestore.ai

where AI agents shop for the right tools

── 98892 repos indexed ── | filtered by tag: #react-query
TanStack/query ★ 50396 4248 APPLICATION

TanStack Query is a multi-framework, protocol-agnostic library for managing asynchronous server state in web applications. It provides a robust caching layer, automatic background refetching, pagination (infinite queries), optimistic updates, and mutation management. The core engine (`@tanstack/query-core`) implements a generic observer pattern with subscribable caches (`QueryCache`, `MutationCache`), retry logic with exponential backoff, network/focus awareness, and a pluggable timeout system. Framework-specific adapters (React, Vue, Svelte, Solid, Preact, Lit, Angular) wrap the core with idiomatic hooks, composables, controllers, or signals, enabling seamless integration into each ecosystem. The architecture follows a layered design: the core package is framework-agnostic and handles all state management, caching, and scheduling. Each adapter provides thin bindings that map the core's observer-based subscription model to the framework's reactivity system (e.g., React's `useSyncExternalStore`, Vue's `computed`/`watch`, Svelte's `$state` runes, Angular's signals). Key entry points include `useQuery`/`useMutation` (React), `createQuery`/`createMutation` (Svelte), `injectQuery`/`injectMutation` (Angular), and their infinite variants. The library also ships with devtools (Solid-based UI), an ESLint plugin for best practices, codemods for major version migrations, and persistence plugins for offline support. Data flows are driven by query keys (serializable arrays) that uniquely identify cached data. Observers subscribe to queries, triggering fetches via user-defined `queryFn` callbacks. The cache manages stale time, garbage collection, and structural sharing to minimize re-renders. Mutations follow a lifecycle (pending → success/error) with optimistic updates and rollback support. SSR hydration/dehydration serializes cache state into the server response and restores it on the client, supporting streaming and suspense. External dependencies are minimal: the core has zero runtime dependencies; adapters depend only on their respective framework and the core package.

RATING: 9.9/10 MAINT: active DRIFT: low
▸ 6 reusable components found
trpc/trpc ★ 40667 1691 APPLICATION

tRPC is a TypeScript framework for building end-to-end type-safe APIs without code generation or schema definition. It provides a server package with composable adapters (Express, Fastify, Next.js, WebSocket, AWS Lambda, Fetch, standalone), a client package with a composable link system (HTTP batch/stream, WebSocket, SSE, retry, logger, split), and integration packages for React Query (both classic and TanStack variants) and Next.js (Pages and App Router). The server uses a builder pattern with procedures, middleware, routers, and error formatting; the client creates a fully typed proxy that mirrors the server router structure. tRPC also supports data transformers (SuperJSON, etc.), server-side rendering helpers, static site generation, streaming (SSE, JSON-Lines for batch responses), and OpenAPI document generation from tRPC routers. The monorepo contains extensive test suites, regression tests, and example applications covering various runtimes and integrations. Its architecture is highly modular, leveraging advanced TypeScript type inference and proxy patterns to deliver a seamless developer experience.

RATING: 9.9/10 MAINT: active DRIFT: low
▸ 4 reusable components found
openapi-ts/openapi-typescript ★ 8400 672 APPLICATION

openapi-typescript is a monorepo of developer tools for consuming OpenAPI 3.x schemas in TypeScript. It provides a CLI and Node.js API to convert any valid OpenAPI specification (3.0/3.1) into TypeScript type definitions (interfaces, unions, enums) with zero runtime overhead. The generated types are used by companion packages: openapi-fetch, a tiny (~6 kB) type-safe fetch client with full parameter serialization, middleware pipeline, and custom serializer support; and openapi-react-query, a ~1 kB wrapper around @tanstack/react-query that provides typed hooks (useQuery, useMutation, useInfiniteQuery, useSuspenseQuery) with automatic query key inference. The monorepo also includes openapi-typescript-helpers, a shared package of utility types (Readable, Writable, FilterKeys, etc.) consumed by the other packages. The architecture is a pnpm workspace with Turborepo orchestration, Biome for linting/formatting, unbuild for package building, and Changesets for versioning. The core code generator (packages/openapi-typescript) uses the TypeScript Compiler API to build AST nodes directly, supporting an extensive set of options (enums, immutable types, path-params-as-types, read/write markers, root types, etc.). The fetch client (packages/openapi-fetch) implements full OpenAPI parameter serialization styles, a middleware system with onRequest/onResponse/onError lifecycle hooks, and a path-based client proxy for ergonomic endpoint access. All packages are thoroughly tested with unit tests, snapshot tests against real-world APIs (GitHub, Stripe, DigitalOcean), and e2e tests using Playwright. The repository includes comprehensive documentation (English, Japanese, Chinese) with a VitePress site, framework examples (Next.js, SvelteKit, Vue 3), and benchmarking against alternatives. The project is actively maintained with a large community (8.4k stars, 287 open issues, 672 forks) and is used in production by companies such as Netlify, Supabase, Google Firebase CLI, and GitHub Octokit.

RATING: 9.6/10 MAINT: active DRIFT: low
▸ 3 reusable components found
draftswithea/react-query-key-manager ★ 200 3 APPLICATION

react-query-key-manager is a small, dependency-free TypeScript library that provides type-safe, composable, and collision-free query key management for @tanstack/react-query. It exposes two main functions: `key()` wraps a function returning a query key array, augmenting it to support both direct invocation and zero-argument composition calls; `defineQueryKeys()` creates namespaced key collections with recursive nesting, compile-time validation that all functions are wrapped with `key()`, and runtime duplicate-registration detection in development. The library uses advanced TypeScript techniques (const type parameters, mapped types, conditional types) to enforce API usage at build time and to produce precise IntelliSense types. The code is concise (~60 lines of core logic), well-structured, and fully self-contained. It solves a common pain point in large React Query applications—preventing magic string keys, collisions, and poor type safety—through a clever combination of type-level constraints and runtime utilities. The design philosophy emphasizes zero overhead and copy-pasteability, making it easy to vendor into any project. It is framework-agnostic and works with TypeScript 5.0+ and React Query v4/v5. However, the library is in an early stage (version 0.0.2) and lacks a test suite. The registry and keyNames are module-level singletons, which could cause issues in extreme edge cases like multiple library copies, but for typical usage it is solid. Overall, it is a well-crafted utility that delivers on its promises with a clean, type-safe API.

RATING: 8.5/10 MAINT: active DRIFT: low
▸ 1 reusable components found
Privoce/Bot-Studio ★ 299 48 APPLICATION

Bot Studio is a Next.js-based web application designed for testing and managing OpenAI models through an interactive chat interface. The application allows users to configure API credentials, manage files for fine-tuning, create and monitor fine-tuning jobs, list and delete custom models, and interact with multiple chat windows to test model responses with configurable parameters. The architecture follows a modular approach with React contexts for global state (OpenAI configuration), Zustand stores for domain-specific state (chats, files, fine-tunes, models), and React Query for data fetching and synchronization with the OpenAI API. The user interface is built using Tailwind CSS and Headless UI, with a collection of custom, reusable components for forms, buttons, modals, and toast notifications. Key features include streaming responses from the OpenAI API via a custom hook, file upload/download utilities, and a responsive layout with a persistent navigation sidebar. The application demonstrates strong engineering practices through its use of TypeScript, strict linting, and well-encapsulated components. Several components, such as the toast notification system, the OpenAI streaming hook, and the form input components, are designed with reusability in mind and could be extracted for use in other projects with minimal modification. The codebase is actively maintained and shows no significant signs of technical debt or dependency decay.

RATING: 8.4/10 MAINT: maintained DRIFT: low
▸ 3 reusable components found
zuiidea/antd-admin ★ 9765 2467 APPLICATION

The antd-admin repository is a monorepo providing two production-ready admin application templates (basic and with-lingui) and a CLI tool for scaffolding new projects from these templates. Built with React 19, Ant Design 6, TanStack Router & Query, Zustand, Zod, Vite+, MSW, and Playwright, it includes features like JWT authentication, role-based access control, CRUD operations with optimistic updates, URL-synchronized table state, dark theming, and optional i18n via Lingui. The architecture emphasizes modularity, with reusable hooks, components, and mocking utilities that encapsulate complex patterns such as data fetching mutations, schema-aware API mocking, and persistent state management.

RATING: 8.3/10 MAINT: active DRIFT: low
▸ 3 reusable components found
sushi-labs/sushiswap ★ 1941 1480 APPLICATION

SushiSwap 2.0 is a multi-chain decentralized exchange (DEX) frontend built as a monorepo (pnpm, Turborepo) with Next.js App Router, React, and a shared UI library. It provides swap (simple, limit, DCA, TWAP), cross-chain swap (via LI.FI and Near Intents), perpetual futures (Hyperliquid-based), liquidity pools (V2/V3/Blade/Steer vaults), a token launchpad, staking (xSUSHI), and a developer portal (Zitadel auth, team management, API keys). The codebase supports EVM, SVM (Solana), Stellar, and Aptos chains, with namespace-aware wallet providers (Wagmi, Privy, Stellar Wallets Kit) and unified data fetching via TanStack Query and a custom GraphQL client. The architecture is heavily componentized, with reusable patterns like the Checker system (guards for connect/network/amounts), Provider composition (balance, price, trade state), and a design system in packages/ui. Testing includes Vitest unit tests and Playwright e2e with Anvil forks. The repo is actively maintained but carries moderate technical drift due to multi-chain duplication, hardcoded external API endpoints, and deprecated features (Blade pools, Arbitrum Nova minimization).

RATING: 8.3/10 MAINT: active DRIFT: medium
▸ 5 reusable components found
towfiqi/serpbear ★ 2065 292 APPLICATION

SerpBear is a search engine position tracking and keyword research application built with Next.js (React) and TypeScript. It allows users to monitor keyword rankings for their domains in Google, integrate with Google Search Console for actual performance data, and leverage Google Ads for keyword ideas. The application features a modular architecture with separate frontend UI, backend API routes (`/pages/api/`), background scraping jobs via cron, and a SQLite database managed by Sequelize ORM. Key functionalities include SERP scraping through multiple third-party services, position history tracking, email notifications for ranking changes, insight analytics, and configurable settings for API keys and scraper selection. The system is containerized with Docker and supports PWA deployment for mobile access.

RATING: 8.2/10 MAINT: active DRIFT: medium
▸ 4 reusable components found
TkDodo/blog ★ 206 132 APPLICATION

This repository is the source code for TkDodo's blog (https://tkdodo.eu), a static Astro site publishing in-depth articles about React, TypeScript, TanStack Query, Zustand, state management, design systems, and software refactoring. In production it is a content platform: Astro converts MDX posts under content/posts into static HTML pages, served through Netlify under /blog, with client-side React islands for comments, interactive slide decks, and search. The README is a copy of an upstream theme and does not accurately describe this repository; the real structure is defined by astro.config.ts, src/pages, and src/components, with content schemas in src/content.config.ts.

RATING: 7.7/10 MAINT: active DRIFT: medium
▸ 4 reusable components found
midudev/aprendiendo-react ★ 9000 1197 APPLICATION

This repository is a collection of 14 small to medium React projects, built as part of a popular Spanish YouTube course (midudev). Each project focuses on a specific React concept or real-world pattern: from basic component state and effects (Twitter follow card, tic-tac-toe, mouse follower) to advanced topics like custom hooks, fetching data, complex state management with useReducer and useContext, TypeScript integration, routing (including a custom router), Redux Toolkit, React Query, Zustand, and CSS-in-JS with vanilla-extract. The projects are self-contained, well-structured, and progressively build complexity, making this an excellent learning resource for intermediate React developers. The code quality is professional: modern React (18), functional components, hooks, TypeScript in later projects, and some tests (Playwright, Vitest). The custom router (midu-router) is published as an npm package and demonstrates non-trivial patterns like dynamic route matching with path-to-regexp, lazy loading, and i18n. Other reusable gems include a generic debounce hook, a Redux middleware for optimistic updates with rollback, and a Zustand store with persistence. While not a single production application, the repository serves as a practical textbook of React patterns. Developers can extract individual components or hooks into their own projects with minimal adaptation.

RATING: 7.6/10 MAINT: active DRIFT: low
▸ 5 reusable components found
── end of results ──
$ submit: