Skip to content
Prompt

boilerplate-next-zap — Cursor Rules

by kaustubhkagrawal

AI Summary

Cursor Rules for boilerplate-next-zap that enforces consistent project structure, code organization, and best practices for Next.js TypeScript applications using Zap.ts stack (Drizzle ORM, oRPC, Zustand, shadcn/ui). Ideal for teams adopting or maintaining Zap.ts-based projects who want AI-assisted development aligned with their architecture.

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to add the "boilerplate-next-zap — Cursor Rules" prompt rules to my project.
Repository: https://github.com/kaustubhkagrawal/boilerplate-next-zap

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 boilerplate-next-zap

Core Rules for Zap.ts apps/core

Adhere to Zap.ts’s philosophy, using Next.js, TypeScript, Drizzle ORM, oRPC, Zustand, and shadcn/ui.

Configuration

The entry point and all configurations for Zap.ts are specified in zap.config.ts.

Project Structure

• Organize code in src: • Server actions: src/zap/actions/<feature>-<action>.action.ts (e.g., chat.action.ts). • Next.js App Router: src/app/ with: • (api)/(auth-only): Authenticated APIs (e.g., ai/chat/route.ts). • (api)/(public): Public APIs (e.g., auth/[...all]/route.ts). • (pages)/(auth-only): Authenticated pages (e.g., app/page.tsx). • (pages)/(public): Public pages (e.g., (home)/page.tsx). • Components: • src/components/ui/: shadcn/ui components (e.g., Button.tsx). • src/components/common/: General components (e.g., ProfileCard.tsx). • src/zap/components/<feature>/: Feature-specific (e.g., chat/ChatWindow.tsx). • Static data: src/data/ (e.g., settings.ts). • Drizzle schemas: src/zap/db/schema/<feature>.sql.ts (e.g., auth.sql.ts). • Hooks: src/zap/hooks/<feature>/use-<feature>.ts (e.g., chat/use-chat.ts). • Utilities: src/zap/lib/ (e.g., utils.ts). • Providers: src/zap/providers/ for third-party context; prefer src/zap/stores/. • oRPC: src/zap/rpc/procedures/<feature>.rpc.ts and router.ts. • Schemas: src/zap/schemas/<feature>.schema.ts for Zod. • Stores: src/zap/stores/<feature>.store.ts (e.g., chat.store.ts).

Naming Conventions

• Filenames: kebab-case (e.g., user-card.tsx, use-chat.ts). • Zod schemas: PascalCase (e.g., ChatSchema). • oRPC procedures: camelCase (e.g., getMessages). • Data constants: UPPERCASE (e.g., FEATURE_FLAGS). • Server actions: <feature>-<action>.action.ts. • Hooks: use-<feature>.ts. • Stores: <feature>.store.ts. • Database schemas: <feature>.sql.ts. • Components: PascalCase (e.g., ChatWindow).

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted 10mo ago
Stale
AdoptionUnder 100 stars
1 ★ · Niche
DocsMissing or thin
Undocumented

GitHub Signals

Stars1
Issues0
Updated10mo ago
View on GitHub
MIT License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Any AI assistant that accepts custom rules or system prompts

Claude
ChatGPT
Cursor
Windsurf
Copilot
+ more