What it does
A Cursor rules file that sets a layered structure for FastAPI services: router, service, repository, then ORM or external calls. Imports flow downward only, route handlers stay thin, and each layer has stated boundaries. It includes good and bad examples so the AI keeps business logic out of routers.
Use cases
- 01Keep route handlers thin and free of database code
- 02Place business logic in the service layer
- 03Review code for imports that cross layers