Rapini

screenshot of Rapini
nextjs
react
remix
tanstack

:leafy_green: OpenAPI to React Query (or SWR) & Axios

Overview

Rapini is a CLI tool that generates React Query (or SWR) hooks, Axios requests, and Typescript types based on an OpenAPI spec file. The generated code is conveniently packaged so that it can be published as an NPM package.

Features

  • Generates Axios calls for every endpoint: Generates typed payload for each endpoint in the OpenAPI spec file.
  • Generates custom react hooks using React Query: Generates custom hooks that use React Query's useQuery and useMutation hooks for each axios call. Optional to generate custom hooks that use SWR's useSWR hook.
  • Generates query keys for every hook: Generates query keys for every hook to identify and track the requests.
  • Generates strong Typescript types: Generates strong Typescript types for all inputs, outputs, and options.

Summary

Rapini is a CLI tool that simplifies the process of generating React Query (or SWR) hooks, Axios requests, and Typescript types based on an OpenAPI spec file. It automates the generation of code and package configuration, making it easier to integrate API functionalities into React projects. With its features like generating query keys and strong Typescript types, Rapini streamlines the development process and improves code quality.

nextjs
Next.js

Next.js is a React-based web framework that enables server-side rendering, static site generation, and other powerful features for building modern web applications.

react
React

React is a widely used JavaScript library for building user interfaces and single-page applications. It follows a component-based architecture and uses a virtual DOM to efficiently update and render UI components

remix
Remix

Remix is a modern JavaScript framework that focuses on building fast and performant web applications. It emphasizes a combination of server-rendered content and client-side interactivity, offering a robust architecture for creating scalable and maintainable projects.

tanstack
TanStack

TanStack is a collection of high-quality, framework-agnostic libraries including TanStack Query for data fetching, TanStack Router for routing, TanStack Table for tables, and more. These tools provide powerful, type-safe solutions for common web development challenges.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.