Skip to content

feat: add frontend-sveltekit module #5

@ronak-create

Description

@ronak-create

Summary

Add SvelteKit as a frontend option in the foundation create interactive prompt, alongside the existing frontend-svelte module.

Why

SvelteKit is the production framework for Svelte projects (routing, SSR, adapters) — analogous to how Next.js relates to React.
The current frontend-svelte module generates a plain Vite + Svelte app, which stops short of what most developers actually want.


Files to generate

  • src/routes/+page.svelte — root page component
  • src/routes/+layout.svelte — root layout
  • svelte.config.js — with @sveltejs/adapter-auto
  • vite.config.ts
  • tsconfig.json
  • .env.example

Implementation hints

  • Add packages/modules/src/frontend/sveltekit.ts
    → copy svelte.ts as the starting point, swap the files array and package deps

  • Register in:

    • index.ts
    • registry-loader.ts
    • graph-definition.ts
      under frontend choices
  • Key dependencies:

    • @sveltejs/kit
    • @sveltejs/adapter-auto
    • svelte
    • vite
  • Conflicts with:

    • frontend-svelte (same category)

Contributor guidance

To better understand the implementation flow and module system, refer to:

➡️ CONTRIBUTING.md — especially the section on adding a new module


Acceptance criteria

  • foundation create lists SvelteKit as a frontend option
  • Generated project runs vite dev without errors
  • tsconfig.json includes .svelte-kit/tsconfig.json extend
  • Snapshot test added in packages/modules

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomersmodule: frontendRelated to frontend frameworks, UI libraries, or client-side architecture.new-modulebuild something here

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions