A community-driven directory for AI rules and prompts for Cursor IDE. Browse, share, and discover configurations to enhance your development workflow.
- Browse Rules: Discover community-created Cursor rules
- Categories: Organized by development areas (React, TypeScript, Testing, etc.)
- Submit Rules: Share your own rules with the community
- Copy & Use: One-click copy to use in your Cursor configuration
- Popular Rules: Find the most used and viewed rules
- Search & Filter: Find exactly what you need
- Frontend: Next.js 15, React 19, TypeScript
- Styling: Tailwind CSS, shadcn/ui
- Database: PostgreSQL via Supabase
- ORM: Prisma
- Authentication: None (fully anonymous)
- Node.js 18+
- Supabase account (for PostgreSQL database)
- Your database password from Supabase
- Clone the repository:
git clone https://github.com/yourusername/cursor-rules.git
cd cursor-rules
- Install dependencies:
npm install
- Set up environment variables:
Create a .env.local
file with your Supabase database connection:
# Database URLs for Prisma with Supabase
# Connect to Supabase via connection pooling
DATABASE_URL="postgresql://postgres.yupcziwcupnnbpbrsrur:[YOUR-PASSWORD]@aws-1-us-east-2.pooler.supabase.com:6543/postgres?pgbouncer=true"
# Direct connection to the database. Used for migrations
DIRECT_URL="postgresql://postgres.yupcziwcupnnbpbrsrur:[YOUR-PASSWORD]@aws-1-us-east-2.pooler.supabase.com:5432/postgres"
Important: Replace [YOUR-PASSWORD]
with your actual Supabase database password, and update the connection string with your specific Supabase project details.
- Set up the database:
# Generate Prisma client
npm run db:generate
# Push schema to database
npm run db:push
# Seed with sample data
npm run db:seed
- Run the development server:
npm run dev
Open http://localhost:3000 to see the application.
The application uses the following main models:
- Category: Rule categories (React, TypeScript, Testing, etc.)
- Rule: The actual Cursor rules with content, metadata, and vote counts
- Tag: Tags for better rule organization
- RuleTag: Junction table for many-to-many relationship between rules and tags
No user accounts or authentication - everything is anonymous!
GET /api/rules
- Fetch rules with pagination and filteringPOST /api/rules
- Create a new rule (anonymous)GET /api/rules/[id]
- Get a specific rulePOST /api/rules/[id]/copy
- Increment copy countPOST /api/rules/[id]/vote
- Vote on a rule (upvote/downvote)GET /api/categories
- Get all categories
Contributions are welcome! Please feel free to submit a Pull Request.
MIT
- Push your code to GitHub
- Connect your repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy
- Create a new Supabase project
- Go to Settings → Database → Connection pooling
- Copy the connection string (with pgbouncer=true for DATABASE_URL)
- Copy the direct connection string (port 5432 for DIRECT_URL)
- Update your
.env.local
file with the correct credentials - Run migrations:
npm run db:push
- Seed initial data:
npm run db:seed
✅ Anonymous rule submissions - No sign-up required ✅ Upvote/downvote system - Community-driven quality control ✅ Category browsing - Organized by technology/framework ✅ Search and filtering - Find exactly what you need ✅ One-click copying - Easy integration with Cursor ✅ Responsive design - Works on all devices ✅ Real-time vote counts - See popularity instantly
- Comments and discussions
- Rule versioning
- API for Cursor IDE integration
- Rule collections/playlists
- Export/import functionality
- Advanced tagging system