Cursor Rules Template for Salon Appointment Demand Forecasting Dashboards
Cursor Rules Template for building salon appointment demand forecasting dashboards using a Python data stack with Plotly Dash, Prophet, SQLAlchemy, and PostgreSQL.
Target User
Developers building analytics dashboards for salon appointment demand forecasting
Use Cases
- Create autonomous data pipelines for forecasting salon demand
- Define AI constraints for forecasting dashboards
- Enforce coding standards and security in dashboards
- Guide Cursor AI in generating SQL and Python for dashboards
Markdown Template
Cursor Rules Template for Salon Appointment Demand Forecasting Dashboards
.cursorrules
Framework Role & Context: You are a Cursor AI assistant specialized in Python data stack analytics for salon forecasting dashboards.
Code Style and Style Guides: Follow PEP8, Black, isort. Use type hints and clear docstrings.
Architecture & Directory Rules:
- project/
- api/
- data/raw/
- data/processed/
- data/features/
- models/
- pipelines/
- dashboards/
- tests/
- config/
Authentication & Security Rules: JWT Bearer tokens for API access; secrets come from environment variables; never log sensitive data; restrict dashboard read access.
Database and ORM patterns: PostgreSQL with SQLAlchemy ORM; Alembic migrations; typed pydantic schemas for API payloads; parameterized queries.
Testing & Linting Workflows: PyTest with fixtures; pre-commit (ruff, black, isort); CI type checks.
Prohibited Actions and Anti-patterns: Do not perform destructive ops on prod; do not bypass auth; do not interpolate raw user input into SQL; do not generate migrations without review; do not rely on AI for sensitive data access without validation.Overview
This Cursor rules configuration is for building salon appointment demand forecasting dashboards using a Python data stack with Plotly Dash, Prophet or scikit-learn, and PostgreSQL via SQLAlchemy. It provides a direct, paste-ready, Cursor AI friendly rule set to guide automated code generation and dashboard design.
Direct answer: Use the included copyable .cursorrules block to configure Cursor AI for forecasting pipelines, dashboard components, and data quality checks in this stack.
When to Use These Cursor Rules
- Create forecasting data pipelines for salon appointment demand across days, weeks, and months.
- Generate dashboard widgets showing occupancy, capacity, no-shows, cancellations, and lead times.
- Enforce consistent coding style, directory structure, and security practices in dashboards.
- Limit AI actions to safe data operations and model inference steps only.
Copyable .cursorrules Configuration
.cursorrules
Framework Role & Context: You are a Cursor AI assistant specialized in Python data stack analytics for salon forecasting dashboards.
Code Style and Style Guides: Follow PEP8, Black, isort. Use type hints and clear docstrings.
Architecture & Directory Rules:
- project/
- api/
- data/raw/
- data/processed/
- data/features/
- models/
- pipelines/
- dashboards/
- tests/
- config/
Authentication & Security Rules: JWT Bearer tokens for API access; secrets come from environment variables; never log sensitive data; restrict dashboard read access.
Database and ORM patterns: PostgreSQL with SQLAlchemy ORM; Alembic migrations; typed pydantic schemas for API payloads; parameterized queries.
Testing & Linting Workflows: PyTest with fixtures; pre-commit (ruff, black, isort); CI type checks.
Prohibited Actions and Anti-patterns: Do not perform destructive ops on prod; do not bypass auth; do not interpolate raw user input into SQL; do not generate migrations without review; do not rely on AI for sensitive data access without validation.Recommended Project Structure
salon_forecast/
├─ api/
│ └─ __init__.py
├─ data/
│ ├─ raw/
│ ├─ processed/
│ └─ features/
├─ dashboards/
│ └─ app.py
├─ models/
├─ pipelines/
│ └─ forecast.py
├─ tests/
│ ├─ test_api.py
│ └─ test_forecast.py
└─ config/
└─ settings.tomlCore Engineering Principles
- Single source of truth for data and forecasts
- Explicit data contracts between ingestion, modeling, and dashboards
- Idempotent pipelines with clear audit trails
- Automated testing for data quality, modeling, and UI components
- Safe AI usage with explicit constraints and human review where needed
Code Construction Rules
Enforce typing, modular components, and explicit interfaces. Use SQLAlchemy ORM models, clear separation of concerns, and avoid embedding business logic directly in UI code. Do not hard-code credentials or secrets; use environment-based configuration and secret managers. Forecasting logic must be testable in isolation with deterministic seeds when using stochastic models.
Security and Production Rules
- Protect endpoints with TLS and JWT, enforce role-based access
- Use least-privilege database users and encrypted connections
- Validate all inputs; sanitize outputs to dashboards
- Rotate secrets and monitor for anomalies
Testing Checklist
- Unit tests for data transformation and modeling functions
- Integration tests for API endpoints and dashboards data feeds
- End-to-end tests for forecasting workflow from ingestion to dashboard rendering
- CI checks for style, typing, and test coverage
Common Mistakes to Avoid
- Assuming AI can safely generate production-grade SQL or migrations without validation
- Overloading dashboards with server-heavy computations
- Neglecting data quality checks and observability
- Using insecure secrets handling or bypassing auth
FAQ
What is a Cursor rules template?
A Cursor rules template defines stack-specific constraints and operational guidance so Cursor AI can generate safe, maintainable code for a given tech stack. It includes architecture, security, testing, and anti-patterns tailored to the salon forecasting dashboard use case.
Which stack is this template for?
This template targets a Python data stack for forecasting dashboards: Plotly Dash, Prophet or scikit-learn, SQLAlchemy ORM, PostgreSQL, and a FastAPI-based API feeding dashboards via secure endpoints.
How should I paste this into .cursorrules?
Copy the entire content of the copyable block and paste it into a .cursorrules file at the project root. Cursor AI will follow these rules to generate consistent, safe code.
What if I need to adjust security settings?
Modify the Authentication & Security Rules section to reflect your environment: tokens, secret managers, RBAC roles, and network restrictions. Avoid exposing tokens or credentials in code or dashboards.
Can I extend the template for other domains?
Yes. Start from this salon forecasting example and adapt Architecture, Data models, and dashboard components to your domain while preserving the core engineering principles and safety rules.
Related implementation resources: AI Use Case for Software Agencies Using Github Copilot To Accelerate Boilerplate Code Generation for New Client Mvps and Skill Files for Faster Market Testing: CLAUDE.md Templates for Founders.