AI SummaryCursor Rules for react-router-dashboard-saas-template provides AI-assisted development guidance for a modern React 19 + Router 7 SaaS stack with RSC, Tailwind, Drizzle ORM, and form validation. Developers building or contributing to this specific template will benefit from standardized AI code generation and architectural patterns.
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to add the "react-router-dashboard-saas-template — Cursor Rules" prompt rules to my project. Repository: https://github.com/jacob-ebey/react-router-dashboard-saas-template Please read the repo to find the rules/prompt file, then: 1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type) 2. If there's an existing rules file, merge the new rules in rather than overwriting 3. Confirm what was added
Description
Cursor Rules for react-router-dashboard-saas-template
Stack overview
• React 19 + React Router 7 (RSC enabled via @vitejs/plugin-rsc) • Server rendering entry at src/entry.rsc.tsx; SSR HTML generated by src/entry.ssr.tsx • Tailwind CSS v4 + daisyUI v5 (semantic component classes) • Drizzle ORM (PostgreSQL) with drizzle-kit migrations • Conform (@conform-to/react) + zod/v4 for form validation • Session and request-scoped context via AsyncLocalStorage
Cursor rules for react-router-dashboard-saas-template
These rules describe how to work in this repo using Cursor: file layout, React Server Components boundaries, where actions/forms live, and UI/data patterns.
Environment
• Required env: DATABASE_URL, SESSION_SECRET • Start: pnpm dev. Build: pnpm build. Typecheck: pnpm typecheck. DB: pnpm db, pnpm db:generate, pnpm db:migrate, pnpm db:studio.
Directory layout and conventions
• src/routes/ • Each route folder typically contains: • route.tsx → React Server Component (RSC) entry for the route. • client.tsx → co-located Client Components for that route ("islands"). Use "use client" pragma. • client-on.ts → small client helpers for imperative UI interactions (e.g., opening modals). • Optional handle.ts (see src/routes/app/handle.ts) to expose server-only pieces via the createHandle pattern. • Root shells: • src/routes/root/route.tsx (layout shell + error boundary export from client) • src/routes/marketing/route.tsx (public shell) • src/routes/app/route.tsx (authenticated app shell) • src/actions/<domain>/ • actions.ts → server actions (must start with "use server"). • schema.ts → zod/v4 schemas used by the actions and forms. • Existing domains: auth, organization, invitation, profile. • src/components/ → shared components across routes. • @/components/form → Conform + zod v4 opinionated wrappers (useForm, Form, Input, etc.). • src/components/ui/ → low-level UI primitives (card, modal, etc.). • src/db/ • schema.ts → Drizzle table definitions. • queries/ and mutations/ → data access layer separated by read/write. • index.ts → getDb() pool + drizzle instance (reused via global). • src/lib/ • session.ts → cookie session with ALS; use getSession(), destroySession(). • auth.ts → getUser(), requireUser(), and route unstable_middleware helpers. • cache.ts → response caching and dataloader batching.
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster
Works With
Any AI assistant that accepts custom rules or system prompts