SvelteKit RESTful API Tailwind CSS .cursorrules prompt file
Author: Djordje Stojanovic
What you can build
File Management Automation Tool - Create a tool that automatically appends the full file path as a comment to the start of each file within the Stojanovic-One project, ensuring consistency and compliance with the guidelines.Code Suggestion and Optimization Tool - Develop an AI-powered plugin for SvelteKit that applies Elon Musk's efficiency principles by suggesting code simplifications, possible deletions, and optimizations to accelerate cycle time.TDD Assistant - Build an assistant that guides developers through the Test-Driven Development process by prompting them to write failing tests first, implementing minimal code to pass them, and providing suggestions for refactoring.Vitest Integration Platform - Create a comprehensive dashboard for integrating and visualizing coverage metrics from Vitest, helping developers achieve and maintain a high test coverage standard.TypeScript Conversion Assistant - Design an assistant that aids in converting JavaScript code to TypeScript within the project, ensuring type safety and catching potential issues early in the development process.Error Handling Best Practices Guide - Develop a repository of error handling best practices specifically for SvelteKit and Tailwind CSS, including examples and templates that prioritize readability and maintainability.Automated Documentation Updater - Create a bot that periodically checks the project's status and updates documentation files like README.md, AI.MD, and CHANGELOG.md with significant changes or improvements.User Experience Testing Service - Offer a service that tests the Stojanovic-One web application for responsiveness, mobile-friendliness, and accessibility to refine design and user experience consistently.Continuous Improvement Feedback Portal - Establish a platform where developers can suggest improvements to processes, use AI to prioritize suggestions based on impact, and provide insights for simplifying workflows.Cross-Platform Command Converter - Develop a tool that converts Unix-specific commands into PowerShell commands, facilitating easier development and testing on Windows systems for projects like Stojanovic-One.Responsive Design Validator - Create a validator that checks SvelteKit components for responsiveness across different devices and screen sizes, flagging issues and suggesting fixes to ensure a modern UI.
Benefits
Synopsis
Developers working on a SvelteKit project with Supabase backend can ensure efficient and structured file management by adhering to comprehensive file path usage and development standards outlined.
Overview of .cursorrules prompt
The .cursorrules file serves as a comprehensive guideline for developers working on the Stojanovic-One web application project. It outlines the project's tech stack, emphasizing the use of full file paths for all file-related operations to ensure clarity and consistency. Key practices such as following Elon Musk’s algorithm for efficiency, test-driven development, file management protocols, and maintaining code quality are highlighted. The file encourages thorough documentation, truthfulness, and clarity in communication, while also stressing the importance of a systematic development workflow and adherence to best practices like responsive design and RESTful API principles. It suggests continuous improvements and stresses Windows compatibility. The document aims to provide developers with structured guidance to maintain an efficient, organized, and high-quality development process.
.cursorrules Content
# File Path Usage# IMPORTANT: Always use full file paths when referencing, editing, or creating files.# Example: E:\Stojanovic-One\src\routes\Home.svelte# This rule applies to all file operations and must be followed consistently.You are an AI assistant for the Stojanovic-One web application project. Adhere to these guidelines:Please this is utterly important provide full file paths for each file you edit, create or delete.Always provide it in a format like this: edit this file now: E:\Stojanovic-One\src\routes\Home.svelte or create this file in this path: E:\Stojanovic-One\src\routes\Home.svelteAlso always provide file paths as outlined in @AI.MD like if you say lets update this file or lets create this file always provide the paths.1. Tech Stack: - Frontend & Backend: SvelteKit - Database: PostgreSQL (via Supabase) - UI Styling: Tailwind CSS - Deployment: Vercel - Authentication: Supabase Auth2. Follow Elon Musk's Algorithm for Efficiency: a. Question every requirement critically b. Delete unnecessary parts c. Simplify and optimize remaining components d. Accelerate cycle time e. Automate as the final step3. Practice Test-Driven Development (TDD): - Write failing tests first - Implement minimum code to pass tests - Refactor while maintaining passing tests4. File Management: - Include full file path as a comment at the start of each file - Update project structure in AI.MD when adding new files/directories - Maintain up-to-date package.json5. Testing: - Use Vitest for unit and integration tests - Aim for high test coverage (80% or higher)6. Code Quality: - Prioritize readability and maintainability - Implement comprehensive error handling - Use TypeScript for type safety7. Documentation: - Write clear comments and use JSDoc when appropriate - Keep README.md and AI.MD updated - Maintain CHANGELOG.md for significant changes8. Truthfulness and Clarity: - Provide accurate, thoughtful answers - Admit when you don't know something - Be concise while ensuring clarity9. Development Workflow: - Question and refine requirements - Break down tasks into small, manageable issues - For each task: a. Write failing tests b. Implement minimum code to pass tests c. Refactor and optimize - Conduct self-review before suggesting merges - Ensure CI passes before finalizing changes10. Best Practices: - Follow RESTful API design principles when applicable - Implement responsive design for components - Use Zod for data validation - Regularly update dependencies and check for vulnerabilities11. Continuous Improvement: - Suggest process improvements when applicable - Look for opportunities to simplify and optimize code and workflows12. Windows Compatibility: - Provide PowerShell commands for Windows users - Avoid Unix-specific commands (e.g., use `Remove-Item` instead of `rm`) - Use cross-platform Node.js commands when possibleAlways refer to AI.MD for detailed project-specific guidelines and up-to-date practices. Continuously apply Elon Musk's efficiency principles throughout the development process.13. Design and User Experience: - Implement dark mode compatibility - Ensure mobile-friendly and responsive design - Optimize for performance - Create modern and beautiful UI - Consider accessibility in all design decisions