Cursor Rules TemplatesCursor Rules Template

Furniture and Electronics Buying Guide Cursor Rules Template

Cursor Rules Template for building AI-powered buying guides for furniture and electronics stores using Python FastAPI and PostgreSQL.

.cursorrules templatecursor-rules-templatefurniture buying guideelectronics buying guide Cursor AI rulespython-fastapipostgresqlsqlalchemyunit-testsci-cd

Target User

Developers building AI-powered buying guide generators for furniture and electronics stores

Use Cases

  • Generate AI buying guides for furniture catalogs
  • Generate electronics buying guides with feature comparisons
  • Create content for product pages and catalogs
  • Assist customers with shopping decisions using data-driven prompts

Markdown Template

Furniture and Electronics Buying Guide Cursor Rules Template

Overview


Direct answer: This Cursor rules configuration defines a Python FastAPI + PostgreSQL based AI buying guide generator for furniture and electronics stores. It enforces governance and content quality for Cursor AI prompts, enabling repeatable generation of furniture and electronics buying guides with safe data handling.



When to Use These Cursor Rules



- When building an AI powered buying guide for furniture and electronics catalogs

- When you need consistent product feature comparisons and price guidance

- When content must align with catalog data models and taxonomies

- When you require security, auditability, and testable prompts

- When creating auto generated product pages or shopping assistants



Copyable .cursorrules Configuration


.cursorrules
Framework: Python FastAPI with PostgreSQL
Role & Context
Role: Backend Engineer
Context: You are building an AI buying guide generator for furniture and electronics catalogs using Python FastAPI and PostgreSQL.
Code Style
Code Style: PEP8, Black, isort, mypy
Architecture & Directory Rules
Directory: src/app, src/app/models, src/app/api, src/app/services, src/app/pipelines
Authentication & Security
Auth: JWT Bearer
Database & ORM
Database: PostgreSQL using SQLAlchemy
Models: Pydantic models for input validation
Testing & Linting
Tests: pytest, pytest-asyncio; Linting: flake8, mypy
CI/CD
CI: GitHub Actions with pre-commit
Prohibited Actions & Anti-patterns
- Do not bypass auth or hard code secrets
- Do not scrape retailers or rely on unvetted sources
- Do not create insecure endpoints or expose raw data dumps

Recommended Project Structure


project-root/
  backend/
    app/
      main.py
      api/
      models/
      schemas/
      services/
      pipelines/
      core/
      tests/
    requirements.txt
  prompts/
  data/
  tests/
  docker/
  .env.example

Core Engineering Principles



- Clear boundaries between data intake, model prompts, and response rendering

- Strong input validation and typed schemas for all prompts and data

- Idempotent prompt execution with deterministic outputs

- Security by default and auditable prompts with minimal privilege

- Observability through structured logging and metrics

- Composable pipelines and testable components



Code Construction Rules



- Follow Pythonic conventions and PEP8 for all modules

- Use FastAPI with asynchronous endpoints and SQLAlchemy for ORM

- Keep prompts in a dedicated prompts/ directory and version them

- Validate all inputs with Pydantic models; avoid dynamic code execution

- Environment driven configuration with secured secrets management

- Cache expensive results and use idempotent operations

- Do not rely on unsafe external libraries or hard coded credentials



Security and Production Rules



- Enforce JWT based authentication for API access

- Use parameterized queries and ORM to avoid injection risks

- Encrypt sensitive data at rest and monitor access with least privilege

- Validate third party data and implement content safety checks

- Maintain a robust error handling and rate limiting strategy



Testing Checklist



- Unit tests for prompts, validators, and data models

- Integration tests for API endpoints and database interactions

- End to end tests for buying guide generation flows

- Static type checks with mypy and linting with flake8

- CI pipelines to run tests on push and PRs



Common Mistakes to Avoid



- Overly broad prompts that degrade specificity for furniture or electronics

- Hard coded data sources or secrets in prompts or code

- Ignoring data validation and failure modes in prompt results

- Assuming external data is always safe or up to date

- Skipping tests for prompt related logic and data models



Related implementation resources: AI Agent Use Case for Furniture Stores Using Customer Inquiries to Generate Personalized Buying Guides and Systemic Product Specs for AI Coding Assistants: Production-Grade Guide.





FAQ


What is a Cursor Rules Template for this stack?


A Cursor Rules Template defines a reusable, copyable set of AI prompt governance and back end wiring for building AI powered buying guides. It specifies the framework, data models, security, and testing requirements for furniture and electronics catalogs using Python FastAPI and PostgreSQL, so developers can paste the instructions into their project root and start building consistent outputs with Cursor AI.


Which stack components are included in this template?


The template targets a Python FastAPI back end with PostgreSQL via SQLAlchemy, Pydantic data models, JWT based authentication, a code organized into app, services, models, and pipelines, plus tests with pytest. It also includes a prompts directory and CI ready linting and testing configuration.


How do I customize the template for furniture vs electronics?


Customize by adjusting product schemas, feature weightings, and taxonomy mappings to reflect furniture vs electronics attributes. Use separate prompt branches or prompts per category, with category specific validators and test data ensuring outputs stay relevant to each domain.


How should I test and deploy the generated prompts?


Write unit tests for validators and prompt templates, integration tests for API endpoints, and end-to-end tests for the buying guide workflow. Use CI to run tests and linting on PRs and deploy to staging before production with monitored prompts and rollback plans.


What are the security considerations?


Ensure authentication is required for API calls, secrets are stored securely, inputs are validated, and prompts do not leak sensitive catalog data. Implement rate limiting and monitor prompts for anomalous outputs or policy violations.




External links


Internal and external references are scoped to the project namespace on this site.

Overview

Direct answer: This Cursor rules configuration defines a Python FastAPI + PostgreSQL based AI buying guide generator for furniture and electronics stores. It enforces governance and content quality for Cursor AI prompts, enabling repeatable generation of furniture and electronics buying guides with safe data handling.

When to Use These Cursor Rules

  • When building an AI powered buying guide for furniture and electronics catalogs
  • When you need consistent product feature comparisons and price guidance
  • When content must align with catalog data models and taxonomies
  • When you require security, auditability, and testable prompts
  • When creating auto generated product pages or shopping assistants

Copyable .cursorrules Configuration

.cursorrules
Framework: Python FastAPI with PostgreSQL
Role & Context
Role: Backend Engineer
Context: You are building an AI buying guide generator for furniture and electronics catalogs using Python FastAPI and PostgreSQL.
Code Style
Code Style: PEP8, Black, isort, mypy
Architecture & Directory Rules
Directory: src/app, src/app/models, src/app/api, src/app/services, src/app/pipelines
Authentication & Security
Auth: JWT Bearer
Database & ORM
Database: PostgreSQL using SQLAlchemy
Models: Pydantic models for input validation
Testing & Linting
Tests: pytest, pytest-asyncio; Linting: flake8, mypy
CI/CD
CI: GitHub Actions with pre-commit
Prohibited Actions & Anti-patterns
- Do not bypass auth or hard code secrets
- Do not scrape retailers or rely on unvetted sources
- Do not create insecure endpoints or expose raw data dumps

Recommended Project Structure

project-root/
  backend/
    app/
      main.py
      api/
      models/
      schemas/
      services/
      pipelines/
      core/
      tests/
    requirements.txt
  prompts/
  data/
  tests/
  docker/
  .env.example

Core Engineering Principles

  • Clear boundaries between data intake, model prompts, and response rendering
  • Strong input validation and typed schemas for all prompts and data
  • Idempotent prompt execution with deterministic outputs
  • Security by default and auditable prompts with minimal privilege
  • Observability through structured logging and metrics
  • Composable pipelines and testable components

Code Construction Rules

  • Follow Pythonic conventions and PEP8 for all modules
  • Use FastAPI with asynchronous endpoints and SQLAlchemy for ORM
  • Keep prompts in a dedicated prompts/ directory and version them
  • Validate all inputs with Pydantic models; avoid dynamic code execution
  • Environment driven configuration with secured secrets management
  • Cache expensive results and use idempotent operations
  • Do not rely on unsafe external libraries or hard coded credentials

Security and Production Rules

  • Enforce JWT based authentication for API access
  • Use parameterized queries and ORM to avoid injection risks
  • Encrypt sensitive data at rest and monitor access with least privilege
  • Validate third party data and implement content safety checks
  • Maintain a robust error handling and rate limiting strategy

Testing Checklist

  • Unit tests for prompts, validators, and data models
  • Integration tests for API endpoints and database interactions
  • End to end tests for buying guide generation flows
  • Static type checks with mypy and linting with flake8
  • CI pipelines to run tests on push and PRs

Common Mistakes to Avoid

  • Overly broad prompts that degrade specificity for furniture or electronics
  • Hard coded data sources or secrets in prompts or code
  • Ignoring data validation and failure modes in prompt results
  • Assuming external data is always safe or up to date
  • Skipping tests for prompt related logic and data models

Related implementation resources: AI Agent Use Case for Furniture Stores Using Customer Inquiries to Generate Personalized Buying Guides and Systemic Product Specs for AI Coding Assistants: Production-Grade Guide.

FAQ

What is a Cursor Rules Template for this stack?

A Cursor Rules Template defines a reusable, copyable set of AI prompt governance and back end wiring for building AI powered buying guides. It specifies the framework, data models, security, and testing requirements for furniture and electronics catalogs using Python FastAPI and PostgreSQL, so developers can paste the instructions into their project root and start building consistent outputs with Cursor AI.

Which stack components are included in this template?

The template targets a Python FastAPI back end with PostgreSQL via SQLAlchemy, Pydantic data models, JWT based authentication, a code organized into app, services, models, and pipelines, plus tests with pytest. It also includes a prompts directory and CI ready linting and testing configuration.

How do I customize the template for furniture vs electronics?

Customize by adjusting product schemas, feature weightings, and taxonomy mappings to reflect furniture vs electronics attributes. Use separate prompt branches or prompts per category, with category specific validators and test data ensuring outputs stay relevant to each domain.

How should I test and deploy the generated prompts?

Write unit tests for validators and prompt templates, integration tests for API endpoints, and end-to-end tests for the buying guide workflow. Use CI to run tests and linting on PRs and deploy to staging before production with monitored prompts and rollback plans.

What are the security considerations?

Ensure authentication is required for API calls, secrets are stored securely, inputs are validated, and prompts do not leak sensitive catalog data. Implement rate limiting and monitor prompts for anomalous outputs or policy violations.

External links

Internal and external references are scoped to the project namespace on this site.