To recreate this project with the same configuration:
# recreate this project
bun x [email protected] create --template minimal --types ts --add tailwindcss="plugins:typography,forms" prettier eslint --install bun svelte-template
You can preview the production build with npm run preview.
To deploy your app, you may need to install an adapter for your target environment.
this command is used to add the fonts
bun add @fontsource/space-grotesk @fontsource/inter @fontsource/jetbrains-mono
Framework: SvelteKit (Svelte 5 Snippets enabled)
Styling: Tailwind CSS v4
Typography: @fontsource (Inter, Space Grotesk, JetBrains Mono) natively mapped.
Icons: Lucide Svelte (Shadcn native)
Components: Shadcn-Svelte / Bits UI
Theme Switching: mode-watcher with custom CSS View Transitions (Ripple effect).
Scrolling: Lenis (Opt-in smooth scrolling via wrapper).
The entire design system is driven by src/app.css. You do not need to touch a single Shadcn component to change the look of the site. Changing the Brand Color
Open src/app.css and locate the :root and .dark layers. Change the OKLCH values for --primary and --ring.
/* Example: Changing from Purple to a vibrant Blue */
:root {
--primary: oklch(0.6 0.15 250);
--ring: oklch(0.6 0.15 250);
}
bun x shadcn-svelte@latest add switch
bun i @vercel/speed-insights
src/
āāā lib/
āāā utils.ts <-- Shadcn's utility functions (cn, etc.)
āāā components/
ā
āāā ui/ <-- [ THE VENDOR FOLDER ]
ā āāā button/ <-- Shadcn CLI owns everything in here
ā āāā switch/ <-- (Except the hacks we intentionally make)
ā āāā card/
ā
āāā atoms/ <-- [ YOUR CUSTOM ATOMS ]
ā āāā ThemeToggle.svelte <-- Wrap Shadcn primitives here
ā āāā BiSyncLogo.svelte <-- Custom SVGs or purely custom UI bits
ā
āāā molecules/ <-- [ YOUR CUSTOM MOLECULES ]
ā āāā SearchInput.svelte <-- (Combines Shadcn Input + Lucide Search Icon)
ā āāā UserAvatar.svelte <-- (Combines Shadcn Avatar + Auth logic)
ā
āāā organisms/ <-- [ YOUR CUSTOM ORGANISMS ]
ā āāā GlobalHeader.svelte<-- (Combines Logo + SearchInput + ThemeToggle)
ā āāā DataChart.svelte <-- (Combines Shadcn Chart + your API fetching logic)
ā
āāā templates/ <-- [ YOUR CUSTOM TEMPLATES ]
āāā AuthLayout.svelte <-- Reusable skeleton for login/signup pages
āāā DashboardLayout.svelte
To keep this template clean and prevent dependency hell, follow these three strict rules:
Rule 1: Shadcn components only talk to other Shadcn components.
A Shadcn
Rule 2: Wrap, don't pollute. Let's take the ThemeToggle.svelte we just built. It uses the Shadcn Switch. You should save ThemeToggle.svelte inside src/lib/components/atoms/. You do not save it inside src/lib/components/ui/switch/.
Rule 3: Modifying Shadcn is allowed, renaming is not. As we did with the switch.svelte file, you are allowed to open Shadcn files and hack them (adding Snippets, changing default Tailwind behavior). However, do not rename the files or move them out of the ui folder. If you rename button.svelte to MyButton.svelte, the next time you use the CLI to install a component that depends on a button (like a Dialog), the CLI will assume the button is missing and just download a fresh, un-hacked button.svelte right next to yours, creating a mess.