Reference architecture for Cursor IDE projects: directory structure, rules organization, indexing
strategy, and team configuration patterns. Triggers on "cursor architecture", "cursor project structure",
"cursor best practices", "cursor file structure".
Instrucciones de origen · Vista previa de solo lectura
name
cursor-reference-architecture
description
Reference architecture for Cursor IDE projects: directory structure, rules organization, indexing
strategy, and team configuration patterns. Triggers on "cursor architecture", "cursor project structure",
"cursor best practices", "cursor file structure".
allowed-tools
Read, Write, Edit, Bash(cmd:*)
version
1.0.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
compatible-with
claude-code, codex, openclaw
tags
["saas","cursor","cursor-reference"]
Cursor Reference Architecture
Reference architecture patterns for optimizing Cursor IDE project setup. Covers directory structure, rules organization, indexing strategy, and multi-project configuration for maximum AI effectiveness.
Project Layout for Cursor
A well-structured project makes AI features significantly more effective:
# .cursor/rules/project.mdc---description:"Core project context and conventions"globs:""alwaysApply:true---# SaaS Dashboard ApplicationStack:Next.js15(AppRouter),TypeScript5.7
,
PostgreSQL
16
,
Prisma
6
Auth:
NextAuth.js
v5
with
GitHub
OAuth
Styling:
Tailwind
CSS
4
Testing:
Vitest
+
Playwright
Package manager:
pnpm
## Architecture Decisions
-
Server
Components
by
default,
"use client"
only
when
needed
-
Repository
pattern
for
database
access
-
Zod
schemas
for
all
external
input
validation
-
Result
types
for
error
handling
(never
throw
from
services)
Layer 2: Security (Always-On)
# .cursor/rules/security.mdc---description:"Security constraints for all AI-generated code"globs:""alwaysApply:true---# Security Requirements-NEVERhardcodesecrets,APIkeys,orpasswords-ALWAYSuseparameterizedqueries(nostringinterpolationinSQL)-ALWAYSvalidateandsanitizeuserinputwithZod-NEVERdisableCORS,CSRFprotection,orTLSverification-UsehttpOnly,secure,sameSitecookiesforauthtokens-RatelimitallpublicAPIendpoints