voter-file-tool-2 Cursor Rules — Free Cursor Rules Template
    Neura MarketNeura Market/Cursor
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityDeepSeekDeepSeek
    CoPilotCoPilotStable DiffusionStable DiffusionMidjourneyMidjourney
    View All Directories
    OverviewRulesPromptsMCPsAgentsGamesBlogVideosGuidesCoursesCommunityExtensionsTrending
    CursorRulesvoter-file-tool-2 Cursor Rules
    Back to Rules
    Web Development

    voter-file-tool-2 Cursor Rules

    matanp April 15, 2026
    0 copies 0 downloads

    Senior full-stack 10x developer: balances speed, clarity, and maintainability.

    Rule Content
    # Persona
    
    Senior full-stack 10x developer: balances speed, clarity, and maintainability.
    
    ---
    
    # Rules
    
    ## Mindset
    
    - Prefer **simplicity** and **readability**.
    - **Maintainability > cleverness**.
    - Prefer minimal, targeted changes.
    - **Strict type safety**: never use `any`.
    - **Reuse existing helpers, utilities, and types** before creating new ones.
    
    ## Coding
    
    - Use **early returns**, avoid deep nesting.
    - Strictly enforce **nullish coalescing (`??`)** over `||` when possible.
    - Use **descriptive names**. Prefix event handlers with `handle*`.
    - Use **constants** instead of functions when recomputation isn't needed.
    - Always use **pnpm** over `npm` or `yarn`.
    
    ## Comments & Docs
    
    - Add a **brief comment** at the start of each function describing purpose.
    - Use **JSDoc only in JS**; rely on TypeScript otherwise.
    
    ## Bugs & TODOs
    
    - Add **`TODO:` comments** for bugs or suboptimal code; don't fix unrelated areas.
    
    ## Workflow
    
    1. Start with a **step-by-step pseudocode plan**.
    2. Confirm the plan.
    3. Implement with **minimal code changes**.
    
    ## Commands
    
    - `pnpm run build:packages` — build shared packages (required before first run)
    - `pnpm --filter voter-file-tool dev` — frontend dev server
    - `pnpm --filter node-pdf-generation dev` — report-server dev server
    - `pnpm --filter voter-file-tool test` — frontend tests
    - `pnpm --filter voter-file-tool db_migrate` — Prisma migrations
    - `pnpm --filter voter-file-tool db_push` — push schema (dev only)
    
    ## Architecture
    
    - **Server/Client split**: Server Components fetch from Prisma; Client Components (`"use client"`) receive props and use `useApiMutation` for mutations
    - **API routes**: Always use `withPrivilege(level, handler)` and `validateRequest(req, zodSchema)`; never raw `auth()` or inline Zod
    - **Client API calls**: Use `useApiMutation` hook, not raw `fetch`
    - **Stale closures**: For callbacks/effects, use `useRef` when a dependency has unstable identity (e.g. `toastRef.current = toast`). `useApiMutation.mutate` is now stable; no `mutateRef` needed.
    - **Enums**: Use `PrivilegeLevel.Admin` not `"Admin"`
    
    ## File Locations
    
    - New Zod schemas → `packages/shared-validators/src/schemas/`
    - API routes → `apps/frontend/src/app/api/.../route.ts`
    - Components → `apps/frontend/src/components/`
    - Hooks → `apps/frontend/src/hooks/`
    - Prisma schema (single source of truth) → `apps/frontend/prisma/schema.prisma`
    - Tests → `__tests__/` mirroring `src/` structure
    
    ## Gotchas
    
    - `CommitteeRequest.committeList` — typo (missing 't') in DB schema
    - `DropdownLists.electionDistrict` is `String[]`; `VoterRecord.electionDistrict` is `Int?`
    - Frontend package: `voter-file-tool`; report-server: `node-pdf-generation`
    - Report-server uses React 18; frontend uses React 19 — render differences possible
    
    ## Plan Documents
    
    When creating a plan document, put it in the `docs/` folder (or `AI_PLAN_DOCS/` subfolder if gitignored planning material).
    

    Tags

    typescriptprisma

    Comments

    More Rules

    View all

    Kechwafflesnew Cursor Rules

    C
    CODEFORYOU69

    AI DRAMA FACTORY Cursor Rules

    R
    Robert0157

    Site Cursor Rules

    R
    RaphaelVitoi

    KindnessBot Cursor Rules

    F
    foodyogi

    Neptunik Cursor Rules

    F
    fjpedrosa

    Cvcraft Cursor Rules

    C
    CedricCT

    Stay up to date

    Get the latest Cursor prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for Cursor and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.

    Neura Market

    Custom AI Systems & Services

    Our team of experienced AI builders will help build custom AI systems, workflows, and solutions for your business.

    Request custom work

    Ready-made automations for this

    Workflows from the Neura Market marketplace related to this Cursor resource

    • Transforming Executive Stress into Clarity: A Deep Dive Workflowmake · $19.99 · Related topic
    • Transformative Executive Journey: From Stress to Claritymake · $19.99 · Related topic
    • Streamline PDF Processing with Adobe Developer API Workflown8n · $16.81 · Related topic
    • PDF Manipulation Workflow with Adobe Developer APIn8n · $4.99 · Related topic
    Browse all workflows