Cursor Rules TemplatesCursor Rules Template

Cursor Rules Template: Shopify Ecommerce AI Product Description Generator with SEO Scoring and Image-based Suggestions

Cursor Rules Template for Shopify ecommerce AI product description generator with SEO scoring and image-based suggestions, built with Next.js, Node.js, PostgreSQL, and Sequelize.

cursor-rules-templatecursorrulesshopifyecommerceai-product-descriptionseo-scoringimage-based-suggestionsnextjsnodejspostgresqlsequelize

Target User

Frontend and backend developers building an AI-powered ecommerce product description generator with SEO scoring and image-based suggestions.

Use Cases

  • Generate product descriptions for Shopify/ecommerce catalog pages
  • Rank content with SEO scoring
  • Suggest images for product thumbnails and banners
  • Support A/B testing prompts for product pages

Markdown Template

Cursor Rules Template: Shopify Ecommerce AI Product Description Generator with SEO Scoring and Image-based Suggestions

.cursorrules
framework: Next.js + Node.js + PostgreSQL (Sequelize)
role: 'AI Product Description Generator for Shopify/Ecommerce'
context: 'You are Cursor AI, an assistant that writes product descriptions optimized for SEO and image-based suggestions. You operate in a Next.js frontend with a Node.js backend and a PostgreSQL database via Sequelize. Follow strict guardrails for security and maintainability.'
codeStyle: 'TypeScript, ESLint, Prettier, Airbnb'
architecture: 'monorepo with frontend and backend; API routes in /server; shared types in /shared'
directories:
  - frontend
  - backend
  - server
authentication:
  strategy: 'JWT + HttpOnly cookies'
  providers: ['Shopify OAuth']
database:
  orm: Sequelize
  dialect: postgres
  naming: camelCase
testing:
  unit: jest
  integration: supertest
  e2e: cypress
linting:
  tools: eslint, prettier
prohibited:
  - Do not use Mongoose, Prisma, or Drizzle
  - Do not bypass authentication
  - Do not perform blind writes to production
antiPatterns:
  - Hardcoding credentials
  - Blindly trusting user-generated content
  - Skipping input validation on descriptions or image URLs

Overview

Direct answer: This Cursor rules template config enables a Shopify/ecommerce AI product description generator with SEO scoring and image-based suggestions, powered by Cursor AI. It targets a Next.js frontend, Node.js backend, and PostgreSQL data layer (via Sequelize). It establishes guardrails to ensure maintainable, safe AI-assisted content for storefront pages.

When to Use These Cursor Rules

  • Build an end-to-end AI description generator for ecommerce product pages on Shopify or similar storefronts.
  • Incorporate SEO scoring to guide keyword usage, meta-tags, and content structure.
  • Offer image-based content suggestions to accompany descriptions and thumbnails.
  • Single-source configuration for frontend, backend, and data access patterns.

Copyable .cursorrules Configuration

.cursorrules
framework: Next.js + Node.js + PostgreSQL (Sequelize)
role: 'AI Product Description Generator for Shopify/Ecommerce'
context: 'You are Cursor AI, an assistant that writes product descriptions optimized for SEO and image-based suggestions. You operate in a Next.js frontend with a Node.js backend and a PostgreSQL database via Sequelize. Follow strict guardrails for security and maintainability.'
codeStyle: 'TypeScript, ESLint, Prettier, Airbnb'
architecture: 'monorepo with frontend and backend; API routes in /server; shared types in /shared'
directories:
  - frontend
  - backend
  - server
authentication:
  strategy: 'JWT + HttpOnly cookies'
  providers: ['Shopify OAuth']
database:
  orm: Sequelize
  dialect: postgres
  naming: camelCase
testing:
  unit: jest
  integration: supertest
  e2e: cypress
linting:
  tools: eslint, prettier
prohibited:
  - Do not use Mongoose, Prisma, or Drizzle
  - Do not bypass authentication
  - Do not perform blind writes to production
antiPatterns:
  - Hardcoding credentials
  - Blindly trusting user-generated content
  - Skipping input validation on descriptions or image URLs

Recommended Project Structure

apps/
  shop-desc-generator/
    frontend/
      src/
        pages/
        components/
        styles/
    backend/
      src/
        controllers/
        models/
        routes/
        services/
        config/
        middlewares/
    tests/
    scripts/

Core Engineering Principles

  • Single source of truth for prompts and prompts responses to ensure consistency.
  • Idempotent AI requests with client-side retries and server-side deduplication.
  • Security-by-default: validate input, enforce auth, and audit content transformations.
  • Observability: structured logs, metrics, and tracing for Cursor AI decisions.
  • Privacy and data minimization: do not store sensitive user data longer than needed.

Code Construction Rules

  • Use TypeScript with strictNullChecks and noImplicitAny in all files.
  • Frontend pages must fetch data via API routes and handle loading and error states gracefully.
  • Backend APIs must validate request payloads with zod and map to TypeScript DTOs.
  • Model and domain logic must live in /backend/models and /backend/services; avoid business logic in API routes.
  • All prompts must be parameterized; never concatenate user content directly into prompts.
  • Follow the repository’s ESLint and Prettier rules; run npm run lint before commit.

Security and Production Rules

  • Authenticate all endpoints that touch product content or SEO scoring results.
  • Store secrets in environment variables; never commit to source control.
  • Validate and sanitize all user input; enforce content moderation for generated descriptions and images.
  • Implement rate limiting and CSRF protection for API routes.
  • Use secure image handling: verify image URLs, avoid remote content rendering in previews.

Testing Checklist

  • Unit tests on prompt builders and SEO scoring logic.
  • Integration tests for API routes and ORM models.
  • End-to-end tests for the entire flow: request description, score SEO, and return image suggestions.
  • Static analysis and linting in CI, plus pre-commit checks.

Common Mistakes to Avoid

  • Overfitting prompts to a single product example; instead, ensure generalization across categories.
  • Ignoring SEO scoring components; failing to update keywords and meta data based on scores.
  • Skipping content moderation for user-generated content and image prompts.

Related Cursor rules templates

Explore adjacent Cursor rules templates for similar stacks, workflows, and production constraints.

FAQ

What is the Cursor Rules Template for Shopify ecommerce AI product descriptions?

This template configures Cursor AI to generate SEO-informed product descriptions with image-based suggestions for Shopify or similar ecommerce storefronts. It defines stack-specific guardrails, architecture rules, and testing workflows, enabling reliable, maintainable AI-assisted content.

Which stack is this template designed for?

It targets a Next.js frontend, Node.js backend, and PostgreSQL data layer using Sequelize as the ORM. The Cursor rules enforce a clean separation of concerns and robust security practices for an AI-powered storefront.

How do image-based suggestions integrate with descriptions?

The rules guide the AI to propose images that align with the generated descriptions, enhancing click-through rates. It includes validation for image URLs and safe rendering practices to prevent content issues.

How should I test and deploy the Cursor Rules file?

Test with unit, integration, and end-to-end tests, and run linting in CI. Deploy via your standard workflow, ensuring environment variables are secured and endpoints are authenticated.

What security considerations are included?

The template enforces authentication, input validation, content moderation, rate limiting, and secure secret management to protect storefront data and prevent misuse of AI-generated content.