{"id":50497521,"url":"https://github.com/moisesvalero/my-sveltekit-starter","last_synced_at":"2026-06-02T09:02:24.251Z","repository":{"id":357114823,"uuid":"1184171765","full_name":"moisesvalero/my-sveltekit-starter","owner":"moisesvalero","description":"Modern SvelteKit 2 + Svelte 5 Starter. Built with TypeScript, Tailwind CSS v4, and shadcn-svelte UI. Instant setup, i18n (ES/EN), centralized SEO, and optional Sanity/Supabase integration.","archived":false,"fork":false,"pushed_at":"2026-05-20T06:23:27.000Z","size":1948,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-20T09:58:10.459Z","etag":null,"topics":["starter-template","svelte","svelte5","sveltekit","typescript","vibe-coding"],"latest_commit_sha":null,"homepage":"https://my-sveltekit-starter.vercel.app","language":"Svelte","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moisesvalero.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-03-17T10:21:41.000Z","updated_at":"2026-05-20T06:23:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/moisesvalero/my-sveltekit-starter","commit_stats":null,"previous_names":["moisesvalero/my-sveltekit-starter"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/moisesvalero/my-sveltekit-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moisesvalero%2Fmy-sveltekit-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moisesvalero%2Fmy-sveltekit-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moisesvalero%2Fmy-sveltekit-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moisesvalero%2Fmy-sveltekit-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moisesvalero","download_url":"https://codeload.github.com/moisesvalero/my-sveltekit-starter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moisesvalero%2Fmy-sveltekit-starter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33814317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["starter-template","svelte","svelte5","sveltekit","typescript","vibe-coding"],"created_at":"2026-06-02T09:02:19.222Z","updated_at":"2026-06-02T09:02:24.237Z","avatar_url":"https://github.com/moisesvalero.png","language":"Svelte","funding_links":[],"categories":[],"sub_categories":[],"readme":"# My SvelteKit Starter\n\nProduction-minded SvelteKit starter with Svelte 5 runes, TypeScript, Tailwind CSS v4, shadcn-svelte style components, i18n, SEO, GEO and AEO already wired.\n\n[![Svelte 5](https://img.shields.io/badge/Svelte-5-FF3E00?logo=svelte\u0026logoColor=white)](https://svelte.dev)\n[![SvelteKit 2](https://img.shields.io/badge/SvelteKit-2-FF3E00?logo=svelte\u0026logoColor=white)](https://kit.svelte.dev)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5-3178C6?logo=typescript\u0026logoColor=white)](https://www.typescriptlang.org/)\n[![Tailwind CSS v4](https://img.shields.io/badge/Tailwind_CSS-4-38BDF8?logo=tailwindcss\u0026logoColor=white)](https://tailwindcss.com/)\n[![Vitest](https://img.shields.io/badge/Vitest-ready-6E9F18?logo=vitest\u0026logoColor=white)](https://vitest.dev/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](./LICENSE)\n\n[Live demo](https://my-sveltekit-starter.vercel.app/) · [Spanish quick start](./INICIO_RAPIDO.md) · [Design handoff guide](./DESIGN_TO_CURSOR.md) · [GEO playbook](./GEO_PLAYBOOK.md)\n\n## Preview\n\n\u003cimg src=\"static/screenshots/home-desktop.png\" alt=\"Home page preview of My SvelteKit Starter\" width=\"100%\"\u003e\n\n\u003cimg src=\"static/screenshots/components-desktop.png\" alt=\"Component gallery preview of My SvelteKit Starter\" width=\"100%\"\u003e\n\n## Why This Starter\n\nMost starters stop at routing and styling. This one is built for shipping a real website or product surface quickly:\n\n- Svelte 5 runes and SvelteKit 2 with TypeScript.\n- Tailwind CSS v4 with a shadcn-svelte inspired component layer.\n- ES/EN i18n, dark mode, toasts, cookie consent and responsive layout.\n- Central SEO store with Open Graph, Twitter cards, canonical URLs and JSON-LD.\n- GEO/AEO endpoints for modern AI discovery: `llms.txt`, Markdown twins and content negotiation.\n- Security headers, CSP, HSTS in production, frame protection and strict cookie defaults.\n- Optional Sanity, Supabase and Sentry wiring without making them mandatory.\n- CI, Husky, lint-staged, Vitest and `svelte-check` already configured.\n\n## Stack\n\n| Area              | Included                                                         |\n| ----------------- | ---------------------------------------------------------------- |\n| Framework         | SvelteKit 2, Svelte 5 runes                                      |\n| Language          | TypeScript                                                       |\n| Styling           | Tailwind CSS v4, design tokens, shadcn-svelte style components   |\n| UI primitives     | bits-ui, mode-watcher, lucide-svelte, svelte-sonner              |\n| Quality           | ESLint, Prettier, svelte-check, Vitest                           |\n| SEO/GEO/AEO       | sitemap, robots, Open Graph, JSON-LD, `llms.txt`, Markdown twins |\n| Optional services | Sanity CMS, Supabase, Sentry                                     |\n| Deploy            | Vercel adapter, Netlify config included                          |\n\n## Quick Start\n\nRequirements: Node.js 22 or newer.\n\n```bash\nnpm install\nnpm run dev\n```\n\nOpen `http://localhost:5173`.\n\nYou do not need a `.env` file for the default demo. Add one only when enabling optional services.\n\n## Scripts\n\n| Command                | Purpose                                          |\n| ---------------------- | ------------------------------------------------ |\n| `npm run dev`          | Start the Vite development server                |\n| `npm run build`        | Create a production build                        |\n| `npm run preview`      | Preview the production build locally             |\n| `npm run format:check` | Check formatting with Prettier                   |\n| `npm run format`       | Format project files                             |\n| `npm run lint`         | Run Prettier check and ESLint                    |\n| `npm run check`        | Run `svelte-check` with the project tsconfig     |\n| `npm test`             | Run Vitest                                       |\n| `npm run new:page`     | Scaffold a page from the local script            |\n| `npm run clean`        | Remove demo routes/components for a lean project |\n| `npm run studio`       | Start Sanity Studio, if configured               |\n\n## Quality Gate\n\nBefore publishing changes, run:\n\n```bash\nnpm run format:check\nnpm run lint\nnpm run check\nnpm test\nnpm run build\nnpm audit --audit-level=moderate\n```\n\nCurrent local verification has been hardened so npm audit reports zero vulnerabilities after the dependency overrides in `package.json`.\n\n## Project Structure\n\n```txt\nsrc/\n  routes/\n    +page.svelte              Home page\n    +layout.svelte            App shell, SEO tags, nav, theme, toasts\n    components/               Component gallery and demos\n    api/og/+server.ts         Dynamic Open Graph SVG endpoint\n    *.md/+server.ts           Markdown twin endpoints for AEO\n  lib/\n    components/ui/            shadcn-svelte style base components\n    components/               Project components and demos\n    aeo/                      Markdown twins, content negotiation, token counting\n    i18n/                     ES/EN dictionaries and locale helpers\n    server/                   Server-only Sanity and Supabase helpers\n    styles/stitch-m3.css      Design tokens and typography utilities\n    seo.ts                    Central SEO store\n    site-config.ts            Site identity, URLs and social defaults\n    site-pages.ts             Registry for sitemap, llms.txt and twins\nstatic/\n  screenshots/                README screenshots\nsanity/                       Optional CMS schema and seed scripts\n```\n\n## UI System\n\nThe starter keeps the UI code in your repository, not hidden behind an opaque package.\n\nBase components live in `src/lib/components/ui/`:\n\n- `Button`\n- `Card`\n- `Dialog`\n- `Input`\n- `Textarea`\n- `Label`\n- `Skeleton`\n- `Spinner`\n- `Sonner`\n- Layout helpers: `Container`, `Section`, `Grid`, `Heading`, `Text`, `HeroSection`, `FeaturesSection`\n\nProject components live in `src/lib/components/`:\n\n- `Footer`\n- `CookieConsent`\n- `CopyButton`\n- `Newsletter`\n- `AiPrompt`\n- `JsonLd`\n- `ToastContainer`\n- Demo blocks under `src/lib/components/demos/`\n\n## SEO, GEO and AEO\n\nThe starter is designed for search engines and AI answer engines.\n\nOne `setSeo({...})` call per page feeds:\n\n- `\u003ctitle\u003e`, description, keywords, author and canonical URL.\n- Open Graph and Twitter cards.\n- JSON-LD for `Organization`, `WebSite`, `BreadcrumbList`, page schema, FAQ, HowTo and SoftwareApplication.\n- `hreflang` alternates for ES/EN.\n\nDynamic discovery endpoints:\n\n| Endpoint                      | Purpose                                          |\n| ----------------------------- | ------------------------------------------------ |\n| `/sitemap.xml`                | HTML pages and Markdown twin URLs with hreflang  |\n| `/robots.txt`                 | Search and AI crawler policy                     |\n| `/llms.txt`                   | Compact Markdown index for LLMs                  |\n| `/llms-full.txt`              | Full-site Markdown export                        |\n| `/index.md`, `/components.md` | Clean Markdown twins                             |\n| `Accept: text/markdown`       | Content negotiation for agent-friendly responses |\n| `/api/og?title=...`           | Dynamic Open Graph image                         |\n\nTo add a page to the whole SEO/GEO/AEO pipeline:\n\n1. Create the SvelteKit route.\n2. Call `setSeo({...})` in the page.\n3. Add the page to `src/lib/site-pages.ts`.\n4. Add a Markdown builder in `src/lib/aeo/builders/`.\n5. Register the builder and add a sibling `.md` route.\n\n## Security Notes\n\nImplemented by default:\n\n- Content Security Policy in `src/hooks.server.ts`.\n- `Strict-Transport-Security` in production.\n- `X-Frame-Options: DENY`.\n- `X-Content-Type-Options: nosniff`.\n- `Referrer-Policy: strict-origin-when-cross-origin`.\n- Restrictive `Permissions-Policy`.\n- `frame-ancestors 'none'`.\n- Locale cookie uses `httpOnly`, `sameSite: 'lax'` and `secure` in production.\n- Private service keys stay in `$env/dynamic/private`.\n- npm dependency audit is clean with the included overrides.\n\nReview before production:\n\n- Replace or remove `/api/hello`, it is intentionally a demo endpoint.\n- Keep `PUBLIC_SITE_URL` accurate for canonical URLs, sitemap and Open Graph.\n- Treat `SANITY_READ_TOKEN`, `SUPABASE_ANON_KEY` and `RESEND_API_KEY` as environment-specific credentials.\n- If you enable third-party analytics or live chat, update CSP allowlists deliberately.\n\n## Optional Integrations\n\nCopy `.env.example` to `.env` when enabling services:\n\n```bash\nPUBLIC_SITE_URL=http://localhost:5173\n\nSANITY_PROJECT_ID=\nSANITY_DATASET=production\nSANITY_API_VERSION=2024-01-01\nSANITY_READ_TOKEN=\n\nSUPABASE_URL=\nSUPABASE_ANON_KEY=\n\nPUBLIC_SENTRY_DSN=\nRESEND_API_KEY=\n```\n\n### Sanity\n\nThe repo includes `sanity/`, `sanity.config.ts`, `sanity.cli.ts`, server helpers and sample GROQ mapping. Without env vars, the app still runs normally.\n\n```bash\nnpm run studio\n```\n\n### Supabase\n\n`src/lib/server/supabase/client.ts` returns `null` until `SUPABASE_URL` and `SUPABASE_ANON_KEY` are configured.\n\n### Sentry\n\nClient tracking is disabled in dev and only starts when `PUBLIC_SENTRY_DSN` exists.\n\n## Deploy\n\n### Vercel\n\nThis starter ships with `@sveltejs/adapter-vercel`.\n\n```bash\nnpm run build\n```\n\nConnect the repository to Vercel and set `PUBLIC_SITE_URL` to the production URL.\n\n### Netlify\n\n`netlify.toml` is included. Set the same environment variables in the Netlify dashboard.\n\n## For AI-Assisted Workflows\n\nThis repository includes agent-facing documentation:\n\n- `AGENTS.md` for repository rules and Svelte 5 patterns.\n- `PROMPTS.md` with copy-paste prompts.\n- `DESIGN_TO_CURSOR.md` for mapping Stitch, Lovable or Figma exports into this component system.\n- `GEO_PLAYBOOK.md` for AI discovery and Markdown twin workflows.\n\n## License\n\nMIT. Use it for personal, client and commercial projects.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoisesvalero%2Fmy-sveltekit-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoisesvalero%2Fmy-sveltekit-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoisesvalero%2Fmy-sveltekit-starter/lists"}