Instruction file imported from ofsound/photography-portfolio (
.cursor/rules/project-context.mdc). Copyright stays with the author.
Project Context
- Stack: Svelte 5, SvelteKit, TypeScript, Tailwind CSS, Supabase
- Styling: Tailwind only; avoid vanilla CSS in
<style>blocks
Svelte MCP Tools
list-sections: Use FIRST when asked about Svelte/SvelteKit topicsget-documentation: Fetch relevant docs after listing sectionsplayground-link: Only when user explicitly asks; never for code written to project files
Import Order
When adding or editing imports in .svelte or src .ts files, enforce this order. Use one blank line between groups; no blank line between imports within a group.
- Svelte / SvelteKit —
svelte,svelte/*,$app/* - External packages
- Project components —
$lib/components/...first, then route-local./... - Project utils —
$lib/...(non-component imports) - Types — all
import type { ... } - Assets —
$lib/assets/*when present - Side-effect — e.g.
import './layout.css'; must be last
If a module is imported for both type and value, keep one import line and place it by its primary use.