Over 25+ curated rules

Cursor & Windsurf
AI Rules Directory

Discover production-ready .cursorrules and .windsurfrules configurations for Next.js, FastAPI, Flutter, React, and more. Boost your AI assistant productivity with expert-crafted rules.

25+
Rules
6+
Frameworks
10K+
Developers
5K+
Daily Views

Featured Rules

Hand-picked rules from top open source maintainers

NEXTJS
98%

Next.js App Router Server Components First

Prioritize React Server Components for data fetching and static content. Client components only when interactivity is required.

server-componentsapp-routerperformance
'use server';

import { db } from '@/lib/database';
import { cache } from 'react';

export const getProjects = cache(async () => {
  return db.project...
Jan 15, 2024by Vercel Engineering
View Rule
FASTAPI
95%

FastAPI Dependency Injection Pattern

Use FastAPI's dependency injection system for authentication, database sessions, and shared business logic.

dependency-injectionauthenticationarchitecture
from fastapi import Depends, HTTPException, status
from fastapi.security import OAuth2PasswordBearer
from sqlalchemy.orm import Session
from typing im...
Feb 20, 2024by Sebastián Ramírez
View Rule
FLUTTER
92%

Flutter State Management with Riverpod

Use Riverpod for reactive state management with compile-time safety and testable provider architecture.

state-managementriverpodarchitecture
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import '../models/todo.dart';
im...
Mar 10, 2024by Remi Rousselet
View Rule
REACT
94%

React Component Testing with Testing Library

Test behavior over implementation. Use Testing Library queries to interact with components as users would.

testingreacttesting-library
import { render, screen, fireEvent, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { LoginForm }...
Jan 28, 2024by Kent C. Dodds
View Rule
VUE
91%

Vue 3 Composition API Patterns

Prefer Composition API with script setup for better TypeScript support and reusable logic patterns.

vue3composition-apitypescript
<script setup lang="ts">
import { ref, computed, onMounted, watch } from 'vue';
import { useAuth } from '@/composables/useAuth';
import { useTodos } f...
Feb 14, 2024by Evan You
View Rule
DJANGO
89%

Django REST Framework Serializer Validation

Implement multi-layer validation in DRF serializers for robust API input handling and security.

djangorest-frameworkvalidation
from rest_framework import serializers
from django.contrib.auth import get_user_model
from django.utils import timezone
from .models import Project, T...
Mar 5, 2024by Tom Christie
View Rule

Supported Frameworks

Find rules tailored for your favorite frameworks

Browse by Category

Find rules organized by focus area

Ready to boost your AI workflow?

Join thousands of developers using DevRules to enhance their Cursor and Windsurf AI assistants with production-ready configurations.

How It Works

Get started with AI rules in minutes

01

Browse Rules

Explore our curated collection of .cursorrules and .windsurfrules for your framework.

02

Copy Rule

Use our one-click copy feature to grab the rule configuration instantly.

03

Configure AI

Add the rules to your Cursor or Windsurf configuration and boost productivity.