RuleMembers

FastAPI scalable API Cursor rules with React

This rule file sets Cursor up as an expert in Python FastAPI for scalable APIs, paired with a TypeScript, React, Tailwind and Shadcn frontend. It is for full-stack developers who want concise, typed code on both sides, written in a functional style with little duplication.

What it does

Python uses def for pure functions and async def for asynchronous ones, type hints on every signature, Pydantic models for validation and the RORO pattern, receive an object and return an object. Names use auxiliary verbs such as is_active and hasError. TypeScript prefers interfaces, avoids enums in favor of maps and uses functional components.

How to use it

It applies to all files, covering both the backend routes and the frontend components.

Requirements and limits

Classes are avoided unless absolutely necessary, which may not suit every codebase.

More in Rules and the Cursor library.

What it covers

  • Key Principles
  • Project Structure
  • Code Style and Structure
  • Performance Optimization
  • Project Conventions
  • Testing and Deployment

The full text is in the members library

Book a call and we will give you access to the full Cursor library: every entry in full, search by meaning, copy and download.

Source and license

Source: https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/python-fastapi-scalable-api-cursorrules-prompt-fil.mdc

Author: PatrickJS, Awesome cursorrules. License: CC0-1.0.

Related entries