\n\n \n ```\n\nRouting and Pages\n- Utilize SvelteKit's file-based routing system in the src/routes/ directory.\n- Implement dynamic routes using [slug] syntax.\n- Use load functions for server-side data fetching and pre-rendering.\n- Implement proper error handling with +error.svelte pages.\n\nServer-Side Rendering (SSR) and Static Site Generation (SSG)\n- Leverage SvelteKit's SSR capabilities for dynamic content.\n- Implement SSG for static pages using prerender option.\n- Use the adapter-auto for automatic deployment configuration.\n\nPerformance Optimization\n- Leverage Svelte's compile-time optimizations.\n- Use `{#key}` blocks to force re-rendering of components when needed.\n- Implement code splitting using dynamic imports for large applications.\n- Profile and monitor performance using browser developer tools.\n- Use `$effect.tracking()` to optimize effect dependencies.\n- Minimize use of client-side JavaScript; leverage SvelteKit's SSR and SSG.\n- Implement proper lazy loading for images and other assets.\n\nData Fetching and API Routes\n- Use load functions for server-side data fetching.\n- Implement proper error handling for data fetching operations.\n- Create API routes in the src/routes/api/ directory.\n- Implement proper request handling and response formatting in API routes.\n- Use SvelteKit's hooks for global API middleware.\n\nSEO and Meta Tags\n- Use Svelte:head component for adding meta information.\n- Implement canonical URLs for proper SEO.\n- Create reusable SEO components for consistent meta tag management.\n\nForms and Actions\n- Utilize SvelteKit's form actions for server-side form handling.\n- Implement proper client-side form validation using Svelte's reactive declarations.\n- Use progressive enhancement for JavaScript-optional form submissions.\n\nInternationalization (i18n) with Paraglide.js\n- Use Paraglide.js for internationalization: https://inlang.com/m/gerre34r/library-inlang-paraglideJs\n- Install Paraglide.js: `npm install @inlang/paraglide-js`\n- Set up language files in the `languages` directory.\n- Use the `t` function to translate strings:\n ```svelte\n \n\n
{t('welcome_message')}
\n ```\n- Support multiple languages and RTL layouts.\n- Ensure text scaling and font adjustments for accessibility.\n\nAccessibility\n- Ensure proper semantic HTML structure in Svelte components.\n- Implement ARIA attributes where necessary.\n- Ensure keyboard navigation support for interactive elements.\n- Use Svelte's bind:this for managing focus programmatically.\n\nKey Conventions\n1. Embrace Svelte's simplicity and avoid over-engineering solutions.\n2. Use SvelteKit for full-stack applications with SSR and API routes.\n3. Prioritize Web Vitals (LCP, FID, CLS) for performance optimization.\n4. Use environment variables for configuration management.\n5. Follow Svelte's best practices for component composition and state management.\n6. Ensure cross-browser compatibility by testing on multiple platforms.\n7. Keep your Svelte and SvelteKit versions up to date.\n\nDocumentation\n- Svelte 5 Runes: https://svelte-5-preview.vercel.app/docs/runes\n- Svelte Documentation: https://svelte.dev/docs\n- SvelteKit Documentation: https://kit.svelte.dev/docs\n- Paraglide.js Documentation: https://inlang.com/m/gerre34r/library-inlang-paraglideJs/usage\n\nRefer to Svelte, SvelteKit, and Paraglide.js documentation for detailed information on components, internationalization, and best practices.\n","datePublished":"2026-01-15T14:25:36.229Z","dateModified":"2026-01-15T14:25:36.229Z","author":{"@type":"Organization","name":"Antigravity List"}}