ywc-api Cursor Rules — Free Cursor Rules Template
    Neura MarketNeura Market/Cursor
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityDeepSeekDeepSeek
    CoPilotCoPilotStable DiffusionStable DiffusionMidjourneyMidjourney
    View All Directories
    OverviewRulesPromptsMCPsAgentsGamesBlogVideosGuidesCoursesCommunityExtensionsTrending
    CursorRulesywc-api Cursor Rules
    Back to Rules
    Frontend

    ywc-api Cursor Rules

    musudik April 15, 2026
    0 copies 0 downloads

    Use this prompt in Cursor to bootstrap the code:

    Rule Content
    
    ---
    
    ## 🧠 Cursor AI Prompt
    
    Use this prompt in Cursor to bootstrap the code:
    
    ---
    
    **Prompt:**
    
    ```txt
    Create an Express.js REST API backend with TypeScript for a Financial Forms app. 
    
    - Database: PostgreSQL (use `pg` package, no Prisma or ORM)
    - Structure: Use `config`, `models`, `routes`, `controllers`, and `services` folders.
    - Load environment variables via `.env` (PORT, DB_USER, DB_PASSWORD, etc.).
    - Use UUIDs for primary keys like `personalId`, `employmentId`.
    - Define TypeScript interfaces for:
      - PersonalDetails (with applicantType, salutation, etc.)
      - FamilyDetails (children[], etc.)
      - EmploymentDetails, IncomeDetails, ExpensesDetails
      - Assets[], Liabilities[]
    - Write SQL queries in service files.
    - Controllers should handle validation, call services, and return JSON responses.
    - Define routes in `src/routes/` and mount in `src/index.ts`.
    - Use express.json() and cors middlewares.
    - Provide example route handlers for POST `/api/personal-details` and GET `/api/employment/:id`.
    - Generate a `.cursorules` file to enforce this structure.
    - Output all code files under `src/`.
    
    This project is meant to serve a frontend React/Vite app that captures client form data and exports PDFs.
    
    
    ✅ Seed Data Strategy
    You'll typically have a seeder.ts script that:
    
    Connects to your PostgreSQL database
    
    Inserts base roles
    
    Inserts initial admin and coach users
    
    (Optionally) hashes passwords using bcrypt
    
    📦 Database Tables Required
    You’ll need at least the following tables:
    
    roles
    users
    user_roles (many-to-many, if users can have multiple roles)
    permissions (if you want normalized permission tracking)
    forms (if listUserForms etc. are already functional)
    
    🗂️ Seed Data Script Plan
    Create a script: src/seed/seeder.ts
    
    👇 Here’s the seed data content:
    📌 Roles Table
    Role Name	Description	Permissions
    ADMIN	Administrator with full access	{MANAGE_USERS,CREATE_COACHES,MANAGE_ROLES,MANAGE_CLIENTS,MANAGE_COACHES,MANAGE_CONTENT,VIEW_REPORTS}
    COACH	Financial coach who manages clients	{CREATE_CLIENTS,MANAGE_OWN_CLIENTS,VIEW_CLIENT_DATA,CREATE_REPORTS}
    CLIENT	End user of the platform	{VIEW_OWN_DATA,UPDATE_PROFILE,REQUEST_SERVICES}
    GUEST	Unregistered or limited access user	{VIEW_PUBLIC_CONTENT}
    
    
    🛠️ User Services
    Below is a breakdown of services by role:
    
    🔐 Admin Services
    Service	Description
    createUser()	Create ADMIN / COACH / CLIENT
    activateUser()	Enable account
    deactivateUser()	Disable account
    listUserByType()	Filter users by role
    resetPassword()	Reset user password
    listUserForms()	Get list of user forms (for COACH / CLIENT)
    
    🧑‍🏫 Coach Services
    Service	Description
    createUser()	Create CLIENT
    activateUser()	Activate CLIENT
    deactivateUser()	Deactivate CLIENT
    listUsers()	List all managed clients
    resetPassword()	Reset password of a CLIENT
    listUserForms()	Get all forms for a specific CLIENT
    downloadForm()	Download a form by formId
    deleteForm()	Delete a form by formId
    
    👤 Client Services
    Service	Description
    updateUser()	Update their own profile
    listForms()	List their submitted forms
    updateForm(FORM-ID)	Update specific form
    downloadForm(FORM-ID)	Download form
    listDocumentsByForm()	View documents for a form
    updateDocumentsByForm()	Add/update documents for a form

    Tags

    reacttypescriptprisma

    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

    • Automated Execution Cleanup System with n8n API and Custom Retention Rulesn8n · $9.99 · Related topic
    • Receive and Analyze Emails with Rules in Sublime Securityn8n · $9.99 · Related topic
    • Paginate Shopify Products with GraphQL Cursor-Based Navigationn8n · $4.99 · Related topic
    • Create an IPL Cricket Rules Q&A Chatbot with Google Gemini APIn8n · $14.99 · Related topic
    Browse all workflows