.cursorrules 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # DataOps Platform - Cursor Editor Rules
  2. ## Project Overview
  3. This is a Flask-based DataOps platform for data management, processing, and analytics.
  4. ## Code Style
  5. - Use Python 3.8+ syntax
  6. - Follow PEP 8 style guidelines
  7. - Use type hints where possible
  8. - Keep functions focused and single-purpose
  9. - Use descriptive variable and function names
  10. ## Architecture
  11. - Flask application with modular structure
  12. - SQLAlchemy for database operations
  13. - RESTful API design
  14. - Blueprint-based routing
  15. - Configuration-based environment management
  16. ## File Organization
  17. - `app/` - Main application code
  18. - `app/api/` - API endpoints and routes
  19. - `app/models/` - Database models
  20. - `app/services/` - Business logic
  21. - `app/config/` - Configuration files
  22. - `database/` - Database scripts and migrations
  23. - `docs/` - Documentation
  24. - `tests/` - Test files
  25. ## Dependencies
  26. - Flask 2.3.3+
  27. - SQLAlchemy 2.0+
  28. - PostgreSQL database
  29. - Neo4j graph database
  30. - MinIO for file storage
  31. ## Development Guidelines
  32. - Always use virtual environment
  33. - Test API endpoints before committing
  34. - Update documentation for API changes
  35. - Use logging for debugging
  36. - Handle errors gracefully
  37. ## API Conventions
  38. - Use snake_case for Python functions and variables
  39. - Use kebab-case for API endpoints
  40. - Return consistent JSON responses
  41. - Include proper HTTP status codes
  42. - Validate input data
  43. ## Database
  44. - Use migrations for schema changes
  45. - Follow naming conventions for tables and columns
  46. - Implement proper indexing
  47. - Use transactions for data consistency
  48. ## Security
  49. - Validate all user inputs
  50. - Use environment variables for sensitive data
  51. - Implement proper authentication
  52. - Sanitize database queries