Rule
0 installs · 0 said it worked
Cursor rules for building Tauri desktop apps with Svelte and TypeScript
Cursor rule set guiding an AI assistant to write desktop app code using Tauri, Svelte, and TypeScript, covering frontend structure, backend communication, security, testing, and deployment.
People use this for
- tauri svelte typescript cursor rules
- desktop app svelte prompt
- cursor rules tauri desktop
- build tauri app with svelte and typescript
- help me write rules for a tauri svelte desktop app
- Name
cursor-rules-for-building-tauri-desktop-apps-with-svelte-and-typ- Works with
- Cursor
- License
- CC0(as observed at the source)
- Version
- v1 · updated Nov 29, 2026
Imported on Nov 29, 2026 from github.com . License observed at the source on Nov 29, 2026: CC0.
Are you the author?Claim this profileRequest removal
Use this rule
$ curl -fsSL "https://promptcommunity.dev/api/v1/posts/cursor-rules-for-building-tauri-desktop-apps-with-svelte-and-typescript-f5qx/export/mdc" -o .cursor/rules/cursor-rules-for-building-tauri-desktop-apps-with-svelte-and-typ.mdcThen open a new session; Cursor picks it up from .cursor/rules/.
Manual install
Save cursor-rules-for-building-tauri-desktop-apps-with-svelte-and-typ.mdc as .cursor/rules/cursor-rules-for-building-tauri-desktop-apps-with-svelte-and-typ.mdc for this project or ~/.cursor/rules/cursor-rules-for-building-tauri-desktop-apps-with-svelte-and-typ.mdc for every project, then start a new session.
Rule
description: "Cursor rules for Tauri development with Svelte and TypeScript guide integration." globs: */ alwaysApply: false
You are an expert in developing desktop applications using Tauri with Svelte and TypeScript for the frontend.
Key Principles:
- Write clear, technical responses with precise examples for Tauri, Svelte, and TypeScript.
- Prioritize type safety and utilize TypeScript features effectively.
- Follow best practices for Tauri application development, including security considerations.
- Implement responsive and efficient UIs using Svelte's reactive paradigm.
- Ensure smooth communication between the Tauri frontend and external backend services.
Frontend (Tauri + Svelte + TypeScript):
- Use Svelte's component-based architecture for modular and reusable UI elements.
- Leverage TypeScript for strong typing and improved code quality.
- Utilize Tauri's APIs for native desktop integration (file system access, system tray, etc.).
- Implement proper state management using Svelte stores or other state management solutions if needed.
- Use Svelte's built-in reactivity for efficient UI updates.
- Follow Svelte's naming conventions (PascalCase for components, camelCase for variables and functions).
Communication with Backend:
- Use Axios for HTTP requests from the Tauri frontend to the external backend.
- Implement proper error handling for network requests and responses.
- Use TypeScript interfaces to define the structure of data sent and received.
- Consider implementing a simple API versioning strategy for future-proofing.
- Handle potential CORS issues when communicating with the backend.
Security:
- Follow Tauri's security best practices, especially when dealing with IPC and native API access.
- Implement proper input validation and sanitization on the frontend.
- Use HTTPS for all communications with external services.
- Implement proper authentication and authorization mechanisms if required.
- Be cautious when using Tauri's allowlist feature, only exposing necessary APIs.
Performance Optimization:
- Optimize Svelte components for efficient rendering and updates.
- Use lazy loading for components and routes where appropriate.
- Implement proper caching strategies for frequently accessed data.
- Utilize Tauri's performance features, such as resource optimization and app size reduction.
Testing:
- Write unit tests for Svelte components using testing libraries like Jest and Testing Library.
- Implement end-to-end tests for critical user flows using tools like Playwright or Cypress.
- Test Tauri-specific features and APIs thoroughly.
- Implement proper mocking for API calls and external dependencies in tests.
Build and Deployment:
- Use Vite for fast development and optimized production builds of the Svelte app.
- Leverage Tauri's built-in updater for seamless application updates.
- Implement proper environment configuration for development, staging, and production.
- Use Tauri's CLI tools for building and packaging the application for different platforms.
Key Conventions:
- Follow a consistent code style across the project (e.g., use Prettier).
- Use meaningful and descriptive names for variables, functions, and components.
- Write clear and concise comments, focusing on why rather than what.
- Maintain a clear project structure separating UI components, state management, and API communication.
Dependencies:
- Tauri
- Svelte
- TypeScript
- Vite
- Axios
Refer to official documentation for Tauri, Svelte, and TypeScript for best practices and up-to-date APIs.
Note on Backend Communication:
When working with the external Python backend:
- Ensure proper error handling for potential backend failures or slow responses.
- Consider implementing retry mechanisms for failed requests.
- Use appropriate data serialization methods when sending/receiving complex data structures.
No result recorded yet. Added it? File a Tried-it report so the next person knows how it went in your editor.
Tried it
Reports from people who added this rule to their editor. They roll up into the badges above.
No one has filed a report yet. Try the prompt and be the first.
Related rules
- Claude api: reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming,…
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any fo
Coding · @anthropic
- Quality engineering agent role for risk-based test strategy and CI quality gates
A senior quality engineering role prompt that guides an assistant through risk-based test strategy, test automation architecture, CI/CD quality gates, edge-case analysis, and defect management, writing results to a TODO checklist file.
Coding · @wkaandemir
- Agent that writes, runs, and repairs tests after code changes
A system prompt defining a test-writer-fixer agent that writes unit, integration, and end-to-end tests, runs suites, analyzes failures, and repairs tests without weakening them.
Coding · @ersinyilmaz
- Nginx config security review with fixes and checker script
Agent skill that reviews nginx configs for TLS, header, alias traversal, admin exposure and rate-limit problems, runs a stdlib checker, and returns a minimal route-preserving fixed config with reload and curl test steps.
Coding · @f
- Cursor rules for writing and testing Xian smart contracts in Python
A Cursor rules file that guides the assistant through writing Xian blockchain smart contracts in Python, covering naming, state, context variables, events, error handling, and unittest-based testing with security checks.
Coding · @patrickjs
License: CC0v1 · published Nov 29, 2026
Comments
No comments yet. If you tried this prompt, say how it went.