Demo: svelte5-shadcn-admin.vercel.app
A Svelte 5 / SvelteKit rewrite of shadcn-admin by @satnaing.
The original is a React admin dashboard. This project takes the same pages, the same interactions, and the same UX, and rebuilds everything on top of Svelte 5 and SvelteKit. It is not a mechanical port — React-specific patterns (Context providers, Zustand, TanStack Router, react-hook-form) were dropped in favor of SvelteKit-native equivalents.
shadcn-admin is a client-side React SPA. This version is a server-rendered SvelteKit application.
What that means in practice:
(app) and (auth) replace TanStack Router configuration. No router config files, no route trees.load functions, not client-side fetching with TanStack Query.$state, $derived) and the context API. No stores, no Zustand, no provider component chains.Beyond the framework change, the project added a few things the original does not have:
| Layer | Library |
|---|---|
| Framework | SvelteKit + Svelte 5 |
| Language | TypeScript (strict) |
| UI components | shadcn-svelte (built on Bits UI) |
| Styling | Tailwind CSS v4 |
| Icons | Lucide |
| Charts | LayerChart |
| Data tables | TanStack Table (core, with Svelte adapter) |
| Forms | SuperForms + Formsnap + Zod |
| Toasts | svelte-sonner |
| i18n | Paraglide JS |
| Resizable panels | Paneforge |
pnpm install
pnpm dev
For production build:
pnpm build
pnpm preview
Other commands:
pnpm check # svelte-check (type errors)
pnpm lint # ESLint
pnpm format # Prettier
App name. Change APP_NAME in src/lib/config.ts. It controls the page title suffix and sidebar branding.
Mock data. All page data is static — generated with Faker in routes/*/data/ files, returned from SvelteKit load functions in +page.ts. To connect a real backend, replace the imports in load functions with fetch calls or database queries. The page components receive data through $props and don't care where it came from.
Auth. The sign-in, sign-up, OTP, and forgot-password pages are presentational only. No auth provider is connected. hooks.server.ts contains a commented auth guard skeleton ready to be wired up.
Adding pages. Create a directory under src/routes/(app)/ with a +page.svelte file. The (app) route group provides the sidebar layout automatically. Add a +page.ts if the page needs data loading.
This template ships with static mock data and no real auth. Before deploying to production:
SPA: true mode (client-only validation). Create +page.server.ts files with Zod validation for auth and settings forms so they work without JavaScript and validate on the server.hooks.server.ts to protect (app) routes. The file already uses sequence() — add your auth handler there.Secure cookie flag. All preference cookies are set without Secure for local development. Enable it in your production HTTPS environment.MIT