Skip to content

Add Ship with AI rules: Next.js 15 + shadcn/ui, FastAPI + SQLAlchemy 2.0, React Native + Expo#303

Open
thebuilderlabs wants to merge 1 commit into
PatrickJS:mainfrom
thebuilderlabs:main
Open

Add Ship with AI rules: Next.js 15 + shadcn/ui, FastAPI + SQLAlchemy 2.0, React Native + Expo#303
thebuilderlabs wants to merge 1 commit into
PatrickJS:mainfrom
thebuilderlabs:main

Conversation

@thebuilderlabs

@thebuilderlabs thebuilderlabs commented Jun 5, 2026

Copy link
Copy Markdown

What this adds

Three stack-specific rule sets from Ship with AI — production-tested rules with DO/DON'T code examples targeting version-specific patterns that AI models frequently get wrong.

1. Next.js 15 + shadcn/ui + Tailwind v4 + Drizzle (380 lines, 8 rules)

  • Async params (Next.js 15 breaking change: params is now a Promise)
  • RSC by default — push "use client" to leaves
  • Server actions with Zod validation + ActionState pattern
  • shadcn/ui wrap-don't-edit composition
  • Tailwind v4 CSS-first @theme config (no tailwind.config.js)
  • Drizzle 0.38+ $inferSelect types + relational queries
  • cn() utility for class merging with CVA
  • loading.tsx / error.tsx per route segment

2. Python FastAPI + SQLAlchemy 2.0 + Pydantic v2 (374 lines, 8 rules)

  • SQLAlchemy 2.0 Mapped[] columns (not legacy Column())
  • Pydantic v2 ConfigDict (not class Config)
  • Separate Create/Update/Response schemas
  • Async sessions with expire_on_commit=False
  • Service-layer architecture with thin routers
  • Typed route responses — never dict
  • async def vs def — blocking I/O rules
  • pydantic-settings for config management

3. React Native Expo SDK 52 + Router v4 (388 lines, 8 rules)

  • Pressable over TouchableOpacity
  • FlashList over FlatList (with estimatedItemSize)
  • expo-image over RN Image (blurhash, caching)
  • Expo Router v4 file-based routing with auth-gated groups
  • Gesture API v2 (Gesture.Pan() + GestureDetector)
  • SafeAreaView from react-native-safe-area-context
  • TanStack Query for server state, Zustand for UI state
  • Reanimated shared values for jank-free animations

Why this is useful

Each rule targets a specific framework version and its real patterns — not generic advice. Every rule includes actual code showing the wrong pattern and the correct one, so AI can pattern-match correctly.

The full open-source rule set (24 rules across 3 stacks) is at thebuilderlabs/ship-with-ai (MIT).

Format

  • All three .mdc files include proper frontmatter (description, globs, alwaysApply)
  • README entries follow existing style and are placed in the correct categories
  • Descriptions are neutral and practical

Summary by CodeRabbit

  • Documentation
    • Added three new Cursor Project Rules to the catalog:
      • Next.js 15 rule with shadcn/ui, Tailwind v4, and Drizzle
      • FastAPI production rule with SQLAlchemy 2.0 and Pydantic v2
      • React Native Expo SDK 52 rule with Expo Router v4

…2.0, React Native + Expo

Adds three stack-specific rule sets from Ship with AI — production-tested
rules with DO/DON'T code examples for each framework version.

- Next.js 15 (shadcn/ui, Tailwind v4, Drizzle): async params, RSC, server
  actions, cn() utility, loading/error boundaries
- Python FastAPI (SQLAlchemy 2.0, Pydantic v2): Mapped columns, ConfigDict,
  async sessions, service-layer architecture, typed routes
- React Native Expo (SDK 52, Router v4): Pressable, FlashList, expo-image,
  Gesture API v2, Reanimated shared values, TanStack Query

Each file is ~380 lines with 8 rules targeting version-specific patterns
that AI models trained on older framework versions frequently get wrong.
@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 89355ca1-8b38-452b-855e-c25c092f4978

📥 Commits

Reviewing files that changed from the base of the PR and between b044f95 and 40a8821.

📒 Files selected for processing (4)
  • README.md
  • rules/nextjs15-shadcn-tailwindv4-drizzle-cursorrules-prompt-file.mdc
  • rules/python-fastapi-sqlalchemy2-pydantic2-cursorrules-prompt-file.mdc
  • rules/react-native-expo-sdk52-cursorrules-prompt-file.mdc

📝 Walkthrough

Walkthrough

This PR expands the awesome-cursorrules catalog by adding three new Cursor rules prompt files and updating the README. Three technology stacks receive production-focused guidance: Next.js 15 with shadcn/ui and Tailwind v4, FastAPI with SQLAlchemy 2.0 and Pydantic v2, and React Native Expo with SDK 52.

Changes

Cursor Rules Catalog Expansion

Layer / File(s) Summary
Catalog entries for three new rule sets
README.md
README updated with three new bullet-point entries linking to Next.js 15, FastAPI, and Expo rules files with stack descriptions.
Next.js 15 production rules
rules/nextjs15-shadcn-tailwindv4-drizzle-cursorrules-prompt-file.mdc
8-rule checklist for Next.js 15 App Router: async params/searchParams, Server Components isolation, "use server" mutations with Zod, shadcn/ui wrapping patterns, Tailwind v4 CSS-first config, Drizzle ORM typed queries, cn() class composition, and per-route loading/error boundaries.
FastAPI production rules
rules/python-fastapi-sqlalchemy2-pydantic2-cursorrules-prompt-file.mdc
8-rule checklist for FastAPI with SQLAlchemy 2.0 and Pydantic v2: Mapped/mapped_column typing, ConfigDict configuration, schema separation, async session setup, service-layer routing, typed responses, async/sync function guidance, and pydantic-settings patterns.
React Native Expo production rules
rules/react-native-expo-sdk52-cursorrules-prompt-file.mdc
8-rule checklist for Expo SDK 52 with Expo Router v4: Pressable components, FlashList with estimatedItemSize, expo-image, file-based routing, Gesture Handler v2, SafeAreaView, Zustand + TanStack Query state separation, and Reanimated animations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • PatrickJS

🐰 Rules refined, stacks aligned,
Next, Fast, and Native—now well-designed.
Three checklists bloom in markdown's light,
To guide each code through day and night.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding three stack-specific rule sets (Next.js 15, FastAPI, React Native/Expo) to the repository.
Description check ✅ Passed The description includes all required sections: summary, contribution type, value proposition, files changed, quality checklist items, and notes. It is detailed, neutral, and thoroughly documented.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant