SvelteKit, Supabase and Tailwind Rules

SvelteKit, Supabase and Tailwind Rules

Sets project rules for a SvelteKit app with Supabase and Tailwind: full file paths, TDD, Vitest, code quality, dark mode and responsive design.


description: "Cursor rules for SvelteKit development with RESTful API and Tailwind CSS integration."
globs: */
alwaysApply: false


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.svelte
Also 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 Auth
  1. 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 step

  2. Practice Test-Driven Development (TDD):

  • Write failing tests first
  • Implement minimum code to pass tests
  • Refactor while maintaining passing tests
  1. 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.json
  1. Testing:
  • Use Vitest for unit and integration tests
  • Aim for high test coverage (80% or higher)
  1. Code Quality:
  • Prioritize readability and maintainability
  • Implement comprehensive error handling
  • Use TypeScript for type safety
  1. Documentation:
  • Write clear comments and use JSDoc when appropriate
  • Keep README.md and AI.MD updated
  • Maintain CHANGELOG.md for significant changes
  1. Truthfulness and Clarity:
  • Provide accurate, thoughtful answers
  • Admit when you don't know something
  • Be concise while ensuring clarity
  1. 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 changes
  1. 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 vulnerabilities
  1. Continuous Improvement:
  • Suggest process improvements when applicable
  • Look for opportunities to simplify and optimize code and workflows
  1. 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 possible

Always 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.

  1. 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

Public domain (CC0 1.0) · by awesome-cursorrules contributors · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 14,621 prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

1 view
Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

1 view

Reviews

Loading reviews…

Discussion

Loading comments…