.cursorrules Htmx Go Fiber copy // HTMX with Go and Fiber .cursorrules // HTMX, Go, and Fiber best practices const htmxGoFiberBestPractices = [ "Use Fiber's HTML rendering for server-side templates", "Implement Fiber's routing system for HTMX requests", "Utilize Fiber's middleware for request processing", "Use Fiber's JSON methods for API responses", "Implement proper error handling with Fiber's error handling", "Utilize Fiber's static file serving for assets", ]; // Folder structure const folderStructure = ` cmd/ main.go internal/ handlers/ models/ templates/ static/ css/ js/ go.mod go.sum `; // Additional instructions const additionalInstructions = ` 1. Use Fiber's App.Get/Post/etc for routing HTMX requests 2. Implement CSRF protection with Fiber middleware 3. Utilize Fiber's Context for handling HTMX-specific headers 4. Use Fiber's template engine for server-side rendering 5. Implement proper logging with Fiber's Logger middleware 6. Follow Fiber's best practices for project structure 7. Use environment variables for configuration `; Cursor AI by @PatrickJS
.cursorrules Htmx Go Basic copy // HTMX with Go (Basic Setup) .cursorrules // HTMX and Go best practices const htmxGoBestPractices = [ "Use html/template for server-side rendering", "Implement http.HandlerFunc for handling HTMX requests", "Utilize gorilla/mux for routing if needed", "Use encoding/json for JSON responses", "Implement proper error handling and logging", "Utilize context for request cancellation and timeouts", ]; // Folder structure const folderStructure = ` cmd/ main.go internal/ handlers/ models/ templates/ static/ css/ js/ go.mod go.sum `; // Additional instructions const additionalInstructions = ` 1. Use semantic HTML5 elements with HTMX attributes 2. Implement proper CSRF protection 3. Utilize HTMX extensions when needed 4. Use hx-boost for full page navigation 5. Follow Go's idiomatic error handling 6. Implement graceful shutdown for the server 7. Use Go modules for dependency management `; Cursor AI by @PatrickJS
.cursorrules Htmx Flask copy // HTMX with Flask .cursorrules // HTMX and Flask best practices const htmxFlaskBestPractices = [ "Use Flask's render_template for server-side rendering", "Implement Flask-WTF for form handling", "Utilize Flask's url_for for generating URLs", "Use Flask's jsonify for JSON responses", "Implement Flask-SQLAlchemy for database operations", "Utilize Flask's Blueprint for modular applications", ]; // Folder structure const folderStructure = ` app/ templates/ static/ css/ js/ models/ routes/ __init__.py config.py run.py `; // Additional instructions const additionalInstructions = ` 1. Use Jinja2 templating with HTMX attributes 2. Implement proper CSRF protection with Flask-WTF 3. Utilize Flask's request object for handling HTMX requests 4. Use Flask-Migrate for database migrations 5. Implement proper error handling and logging 6. Follow Flask's application factory pattern 7. Use environment variables for configuration `; Cursor AI by @PatrickJS
.cursorrules Htmx Django copy // HTMX with Django .cursorrules // HTMX and Django best practices const htmxDjangoBestPractices = [ "Use Django's template system with HTMX attributes", "Implement Django forms for form handling", "Utilize Django's URL routing system", "Use Django's class-based views for HTMX responses", "Implement Django ORM for database operations", "Utilize Django's middleware for request/response processing", ]; // Folder structure const folderStructure = ` project_name/ app_name/ templates/ static/ css/ js/ models.py views.py urls.py project_name/ settings.py urls.py manage.py `; // Additional instructions const additionalInstructions = ` 1. Use Django's template tags with HTMX attributes 2. Implement proper CSRF protection with Django's built-in features 3. Utilize Django's HttpResponse for HTMX-specific responses 4. Use Django's form validation for HTMX requests 5. Implement proper error handling and logging 6. Follow Django's best practices for project structure 7. Use Django's staticfiles app for managing static assets `; Cursor AI by @PatrickJS
.cursorrules Basic Htmx copy // HTMX Basic Setup .cursorrules // HTMX best practices const htmxBestPractices = [ "Use hx-get for GET requests", "Implement hx-post for POST requests", "Utilize hx-trigger for custom events", "Use hx-swap to control how content is swapped", "Implement hx-target to specify where to swap content", "Utilize hx-indicator for loading indicators", ]; // Folder structure const folderStructure = ` src/ templates/ static/ css/ js/ app.py `; // Additional instructions const additionalInstructions = ` 1. Use semantic HTML5 elements 2. Implement proper CSRF protection 3. Utilize HTMX extensions when needed 4. Use hx-boost for full page navigation 5. Implement proper error handling 6. Follow progressive enhancement principles 7. Use server-side templating (e.g., Jinja2, Handlebars) `; Cursor AI by @PatrickJS