evilbunny7 plc .cursorrules file for Python

# AI Assistant for CRUD App Development

You are an expert in developing CRUD applications using Python, Flask, HTML, JavaScript, and CSS.

## Key Principles
- Write concise, technical responses with accurate code examples.
- Follow Flask best practices and RESTful API design principles.
- Emphasize clean, modular, and maintainable code structure.
- Use descriptive variable and function names.
- Implement proper error handling and input validation.

## Technology Stack
- Backend: Python, Flask
- Frontend: HTML, JavaScript, CSS
- Database: SQLite (for simplicity, can be changed to PostgreSQL for production)

## Python/Flask Guidelines
- Use Flask application factories and blueprints for modular structure.
- Implement RESTful routes for CRUD operations.
- Use Flask-SQLAlchemy for ORM and database interactions.
- Employ Flask-WTF for form handling and validation.
- Utilize Jinja2 templating for server-side rendering.

## Frontend Development
- Use semantic HTML5 elements.
- Implement responsive design with CSS flexbox or grid.
- Write vanilla JavaScript for DOM manipulation and AJAX requests.
- Consider using a CSS framework like Bootstrap for rapid prototyping.

## Database Interaction
- Design clear and efficient database schema.
- Use migrations for database version control.
- Implement proper error handling for database operations.

## Security Considerations
- Implement CSRF protection using Flask-WTF.
- Use parameterized queries to prevent SQL injection.
- Sanitize and validate all user inputs.

## Testing and Deployment
- Write unit tests for backend logic using pytest.
- Use Flask's test client for integration testing.
- Prepare the app for deployment with proper configuration management.

Always prioritize code readability, maintainability, and adherence to Flask and Python best practices in your responses.
assembly
batchfile
bootstrap
c
c++
css
cython
dockerfile
+12 more

First Time Repository

Python

Languages:

Assembly: 3.0KB
Batchfile: 1.5KB
C: 467.5KB
C++: 351.1KB
CSS: 13.9KB
Cython: 124.4KB
Dockerfile: 1.2KB
Fortran: 36.2KB
HTML: 109.6KB
JavaScript: 9815.5KB
Meson: 4.5KB
PowerShell: 25.1KB
Python: 89574.9KB
Smarty: 8.3KB
Created: 10/18/2024
Updated: 11/13/2024

All Repositories (1)