מגן האפליקציות: מחולל .cursorrules

אל תתנו לבינה המלאכותית לחרב לכם את ארכיטקטורת האפליקציה בטעות. הגדירו את התשתית שלכם, והעתיקו את סט חוקי הברזל שלנו לסביבת ה-IDE שלכם.

תצורת הסטאק שלכם

בחרו את הסטאק שלכם, והחוקים נבנים מיד. שמרו אותם כקובץ .cursorrules בשורש הפרויקט.

.cursorrules
<system>
  You are an absolute expert Lead Fullstack Engineer operating in a React / Vite environment.
  We are operating under a Zero-Trust Architecture to prevent code-spaghetti and Tech Debt.

  <stack>
    - FRONTEND: React / Vite
    - STYLING: Tailwind CSS v4
    - STATE: Zustand
    - API / BACKEND: Base44 BFF / Express
  </stack>

  <critical-operational-rules>
    <rule name="Modularity Enforcement">
      - If you write a file that exceeds 150 lines, HALT.
      - Abstract the logic into smaller functional subcomponents.
      - Never leave 3 levels of nested DOM elements inside the main page component.
    </rule>

    <rule name="Dependency Auditing">
      - DO NOT run npm install for heavy external libraries unless explicitly approved by the human engineer.
      - If you need a calendar, date picker, or slider, construct a native HTML5 equivalent first.
    </rule>

    <rule name="State Management Rules">
      - Because we use Zustand, NEVER pass props more than 2 levels deep (No Prop Drilling).
      - If an item requires deep nested properties, hoist it to the state manager.
    </rule>

    <rule name="Styling Conventions">
      - As we use Tailwind CSS v4, DO NOT inject inline styles (`style={{...}}`).
      - Only use CSS Custom properties if you need dynamic theming.
      - Stick to the utility classes provided.
    </rule>

    <rule name="Backend Integration (Base44 BFF / Express)">
      - DO NOT call APIs directly inside UI button `onClick` functions.
      - Abstract ALL fetching logic into a dedicated `src/services` folder.
      - Execute Zod schema validation on EVERY response from Base44 BFF / Express before rendering it to the client.
    </rule>
  </critical-operational-rules>
</system>

מה בקובץ

  • Modularity Enforcement If you write a file that exceeds 150 lines, HALT.
  • Dependency Auditing DO NOT run npm install for heavy external libraries unless explicitly approved by the human engineer.
  • State Management Rules NEVER pass props more than 2 levels deep (No Prop Drilling).
  • Styling Conventions Stick to the utility classes provided.
  • Backend Integration Abstract ALL fetching logic into a dedicated src/services folder.

מדוע חברות גדולות נכשלות בכלי Vibe Coding מבלי הקובץ הזה?

מנועי ההסקה בנויים לספק "תוצאה עובדת עכשיו". הם יזריקו 1,000 שורות CSS באותו הקובץ אם לא תפעילו גבול גזרה הרמטי. כשקובץ הכללים שלמעלה נמצא בספריית השורש של הפרויקט, ה-Agent יודע שבקשות נחלקות ל-Microservices ו-Components לפני שהוא מדפיס קוד למסך. זוהי הנדסת ה-Vibe האמיתית.

לבדוק את זה על הפרויקט שלכם

20 דקות בוואטסאפ, ללא עלות. מספרים מה בניתם ואיפה זה נתקע, ויוצאים עם הצעד הבא.

  • מבית Elya Studio
  • 5.0 בגוגל
  • 50+ פרויקטים של הצוות בפרודקשן