irsyad-aulia/nextjs-ai-saas-cursor-rules

20 battle-tested .mdc Cursor rules for Next.js AI SaaS — Supabase, Clerk, Stripe, Vercel AI SDK, shadcn/ui. Agent Mode c

Stars 0 Language Last updated 2026-06-24 Source on GitHub @irsyad-aulia

Actual rules from this repo

Path in source repo: .cursor/rules/001-project-context.mdc · format: mdc

---
description: Core project context and stack declaration for Next.js AI SaaS
alwaysApply: true
---

# Project Context

This is a Next.js 15 AI SaaS application.

## Core Stack
- Framework: Next.js 15 (App Router, NOT Pages Router)
- Language: TypeScript (strict mode, no `any`)
- Database: Supabase (PostgreSQL + RLS)
- Auth: Clerk (NOT NextAuth or Auth.js)
- Payments: Stripe (subscriptions + one-time)
- AI: Vercel AI SDK (multi-provider)
- UI: shadcn/ui + Tailwind CSS
- Email: Resend + React Email
- Deployment: Vercel

## Absolute Rules
- ALWAYS use App Router (`app/` directory)
- ALWAYS use TypeScript, never plain JS
- ALWAYS use server components by default
- ONLY add `"use client"` when strictly necessary
- ALWAYS validate input with Zod schemas
- NEVER use `any` type — use `unknown` and narrow
- ALWAYS handle errors explicitly, never silent catch

View raw on GitHub

Why this is listed

This repository appears on Cursor Rules Live because it matches the tracker's GitHub Search criteria (cursor-rules) and was active in the recent indexing window. The tracker refreshes every 15 minutes, so the metadata above reflects the state at the most recent index pass. If the data here looks stale, the source repository may have been archived or moved out of the tracked topic; the next cron tick will reconcile.

Similar in this tracker

Explore by category