# My SvelteKit Starter
Production-minded SvelteKit starter with Svelte 5 runes, TypeScript, Tailwind CSS v4, shadcn-svelte style components, i18n, SEO, GEO and AEO already wired.
Live demo · Spanish quick start · Design handoff guide · GEO playbook
Most starters stop at routing and styling. This one is built for shipping a real website or product surface quickly:
llms.txt, Markdown twins and content negotiation.svelte-check already configured.| Area | Included |
|---|---|
| Framework | SvelteKit 2, Svelte 5 runes |
| Language | TypeScript |
| Styling | Tailwind CSS v4, design tokens, shadcn-svelte style components |
| UI primitives | bits-ui, mode-watcher, @lucide/svelte, svelte-sonner |
| Quality | oxlint, knip, Prettier, svelte-check, Vitest |
| SEO/GEO/AEO | sitemap, robots, Open Graph, JSON-LD, llms.txt, Markdown twins |
| Optional services | Sanity CMS, Supabase, Sentry |
| Deploy | Vercel adapter, Netlify config included |
Requirements: Node.js 22 or newer.
pnpm install
pnpm run dev
Open http://localhost:5173.
You do not need a .env file for the default demo. Add one only when enabling optional services.
| Command | Purpose |
|---|---|
pnpm run dev |
Start the Vite development server |
pnpm run build |
Create a production build |
pnpm run preview |
Preview the production build locally |
pnpm run format:check |
Check formatting with Prettier |
pnpm run format |
Format project files |
pnpm run lint |
Run oxlint static analysis |
pnpm run knip |
Find unused dependencies, exports and files |
pnpm run check |
Run svelte-check with the project tsconfig |
pnpm test |
Run Vitest |
pnpm run new:page |
Scaffold a page from the local script |
pnpm run clean |
Remove demo routes/components for a lean project |
pnpm run studio |
Start Sanity Studio, if configured |
Before publishing changes, run:
pnpm run format:check
pnpm run lint
pnpm run knip
pnpm run check
pnpm test
pnpm run build
pnpm audit --audit-level=moderate
Current local verification has been hardened so pnpm audit reports zero vulnerabilities after the dependency overrides in package.json.
src/
routes/
+page.svelte Home page
+layout.svelte App shell, SEO tags, nav, theme, toasts
components/ Component gallery and demos
api/og/+server.ts Dynamic Open Graph SVG endpoint
*.md/+server.ts Markdown twin endpoints for AEO
lib/
components/ui/ shadcn-svelte style base components
components/ Project components and demos
aeo/ Markdown twins, content negotiation, token counting
i18n/ ES/EN dictionaries and locale helpers
server/ Server-only Sanity and Supabase helpers
styles/stitch-m3.css Design tokens and typography utilities
seo.ts Central SEO store
site-config.ts Site identity, URLs and social defaults
site-pages.ts Registry for sitemap, llms.txt and twins
static/
screenshots/ README screenshots
sanity/ Optional CMS schema and seed scripts
The starter keeps the UI code in your repository, not hidden behind an opaque package.
Base components live in src/lib/components/ui/:
ButtonCardDialogInputTextareaLabelSkeletonSpinnerSonnerContainer, Section, Grid, Heading, Text, HeroSection, FeaturesSectionProject components live in src/lib/components/:
FooterCookieConsentCopyButtonNewsletterAiPromptJsonLdToastContainersrc/lib/components/demos/The starter is designed for search engines and AI answer engines.
One setSeo({...}) call per page feeds:
<title>, description, keywords, author and canonical URL.Organization, WebSite, BreadcrumbList, page schema, FAQ, HowTo and SoftwareApplication.hreflang alternates for ES/EN.Dynamic discovery endpoints:
| Endpoint | Purpose |
|---|---|
/sitemap.xml |
HTML pages and Markdown twin URLs with hreflang |
/robots.txt |
Search and AI crawler policy |
/llms.txt |
Compact Markdown index for LLMs |
/llms-full.txt |
Full-site Markdown export |
/index.md, /components.md |
Clean Markdown twins |
Accept: text/markdown |
Content negotiation for agent-friendly responses |
/api/og?title=... |
Dynamic Open Graph image |
To add a page to the whole SEO/GEO/AEO pipeline:
setSeo({...}) in the page.src/lib/site-pages.ts.src/lib/aeo/builders/..md route.Implemented by default:
src/hooks.server.ts.Strict-Transport-Security in production.X-Frame-Options: DENY.X-Content-Type-Options: nosniff.Referrer-Policy: strict-origin-when-cross-origin.Permissions-Policy.frame-ancestors 'none'.httpOnly, sameSite: 'lax' and secure in production.$env/dynamic/private.Review before production:
PUBLIC_SITE_URL accurate for canonical URLs, sitemap and Open Graph.SANITY_READ_TOKEN, SUPABASE_ANON_KEY and RESEND_API_KEY as environment-specific credentials.Copy .env.example to .env when enabling services:
PUBLIC_SITE_URL=http://localhost:5173
SANITY_PROJECT_ID=
SANITY_DATASET=production
SANITY_API_VERSION=2024-01-01
SANITY_READ_TOKEN=
SUPABASE_URL=
SUPABASE_ANON_KEY=
PUBLIC_SENTRY_DSN=
RESEND_API_KEY=
The repo includes sanity/, sanity.config.ts, sanity.cli.ts, server helpers and sample GROQ mapping. Without env vars, the app still runs normally.
pnpm run studio
src/lib/server/supabase/client.ts returns null until SUPABASE_URL and SUPABASE_ANON_KEY are configured.
Client tracking is disabled in dev and only starts when PUBLIC_SENTRY_DSN exists.
This starter ships with @sveltejs/adapter-vercel.
pnpm run build
Connect the repository to Vercel and set PUBLIC_SITE_URL to the production URL.
netlify.toml is included. Set the same environment variables in the Netlify dashboard.
This repository includes agent-facing documentation:
AGENTS.md for repository rules and Svelte 5 patterns.PROMPTS.md with copy-paste prompts.DESIGN_TO_CURSOR.md for mapping Stitch, Lovable or Figma exports into this component system.GEO_PLAYBOOK.md for AI discovery and Markdown twin workflows.MIT. Use it for personal, client and commercial projects.