Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
9cd20fc
feat(i18n): complete German translation and add missing i18n keys
ogskater Apr 8, 2026
54f52ba
feat(i18n): replace hardcoded strings with i18n message keys
ogskater Apr 8, 2026
9550202
fix(i18n): address review feedback for locale reactivity and pluraliz…
ogskater Apr 8, 2026
ca48b17
Fixed app version in dev/main tags
javedh-dev Apr 20, 2026
0816425
Merge branch 'main' into dev
javedh-dev Apr 20, 2026
0ddebe2
style: apply format
0skater0 Apr 20, 2026
42bc7e8
Merge pull request #206 from 0skater0/feat/german-i18n
javedh-dev Apr 21, 2026
03926a8
Fixed decimal point to be more granular level for volume and odometer
javedh-dev Apr 21, 2026
549cf3a
Upgraded versions to latest
javedh-dev Apr 21, 2026
debf6e5
Added fuel rate and auto calculation based on value entered
javedh-dev Apr 21, 2026
c1de796
Added distance travelled to fuel logs
javedh-dev Apr 21, 2026
d02f2e7
Update 20260421034831_add_rate_column.sql
javedh-dev Apr 21, 2026
c833d03
feat: update hungarian translation
daunera Apr 22, 2026
295e27c
fix lint
daunera Apr 25, 2026
d34021f
Add PDF export for maintenance logs
May 9, 2026
53d21d3
Fixed linting and check issues
May 9, 2026
6128145
Merge pull request #216 from javedh-dev/feature/maintenance-pdf-export
javedh-dev May 9, 2026
d2587cc
Enable builds for bcrypt and esbuild
javedh-dev May 9, 2026
d11d31e
removed allowBuild Block
May 9, 2026
c3b9e67
fix lint
daunera May 10, 2026
7a0b142
Merge pull request #212 from daunera/dev
javedh-dev May 10, 2026
19abb8b
Upgraded dependencies
May 15, 2026
894645f
fix docker build script approval
May 15, 2026
f82508f
Add files via upload
gg64nou Jun 13, 2026
0c7e351
Upgraded versions and fixed charts
Jul 12, 2026
0674858
Code cleanup and bug fixes
Jul 12, 2026
93af4d4
feat(i18n): update Finnish translations
pHamala Jul 18, 2026
2c1f23f
Phase 0: critical bug fixes
Jul 22, 2026
7be05d6
Code cleanup and auth/page refactoring
Jul 22, 2026
07dfdf3
Phase 1 — Dead code deletion
Jul 22, 2026
8b2ea91
Phase 2 — Validation unification
Jul 22, 2026
fd64fac
Phase 3.1/3.2/3.3 — Error handling, mileage engine, notification sync
Jul 22, 2026
e5d1060
Phase 3.4 — CRUD skeleton factory + config service cleanup
Jul 22, 2026
73f6cd1
Phase 3.5 — Auth middleware fixes + schema boilerplate
Jul 22, 2026
5603c83
Phases 4.4—5: component extraction, notification store, settings unta…
Jul 22, 2026
0ff9e39
Added Openwiki action to update docs with opencode
Jul 22, 2026
ea07383
Update openwiki-update.yml
Jul 22, 2026
90557c5
Removed branch filter for dev
Jul 22, 2026
965cebd
Removed workflow file from PR
Jul 22, 2026
485f112
Delete REFACTORING.md
Jul 22, 2026
9202d25
Update openwiki-update.yml
Jul 22, 2026
2ffd302
Formatted openwiki workflow file
Jul 22, 2026
9eba1ea
Merge pull request #227 from javedh-dev/refactor
javedh-dev Jul 22, 2026
5312fef
Merge pull request #224 from pHamala/dev
javedh-dev Jul 22, 2026
96c4e30
Merge pull request #218 from gg64nou/dev
javedh-dev Jul 22, 2026
16ed9b5
docs: update OpenWiki
javedh-dev Jul 22, 2026
635fd5a
Merge pull request #228 from javedh-dev/openwiki/update
javedh-dev Jul 22, 2026
f0d4235
Updated all dependencies to latest version and disabled automatic docs
Jul 22, 2026
06b668b
Fix data loading bug for existing vehicle data
Jul 22, 2026
fe088ad
Cleaned up root folder
Jul 22, 2026
bb854bc
Fixed warnings
Jul 22, 2026
0deafa1
Added romanian language to translations
Jul 22, 2026
7396952
Formatting and added sidebar element
Jul 24, 2026
fbc6fdf
Phase 0: Add shadcn avatar/progress/range-calendar primitives and sha…
Jul 24, 2026
55a3b92
chore: upgrade shadcn button component via CLI
Jul 24, 2026
5640096
Phase 1: Sidebar app shell - Add AppSidebar, (app) route group, minim…
Jul 24, 2026
8aec105
Phase 2: Route restructure - Top-level feature pages with redirects f…
Jul 24, 2026
b165861
Phase 3: Dashboard home - Fleet summary endpoint + full dashboard page
Jul 24, 2026
fa1e933
Phase 4: Feature page redesigns with fleet-wide support and vehicle s…
Jul 24, 2026
c7f6494
Phase 6: Cleanup & verification - Remove dead code, fix type/lint errors
Jul 24, 2026
0be19ff
Added dashboard widgets and allow rearranging them as per need
Jul 29, 2026
ba80e5c
WIP
Jul 31, 2026
18ec88c
Code Cleanup with Ponytail
Aug 1, 2026
9115d81
Enhancements
Aug 1, 2026
1cc3ed2
Garage Page Enhancements
Aug 4, 2026
6aebad8
Enhanced Reminder and maintenance screens
Aug 4, 2026
4491cf2
Merge pucc/insurance entries to compliance
Aug 4, 2026
3daae76
Enhances Various UI elemnets
Aug 4, 2026
f1a6f4d
Enhanced Settings
Aug 4, 2026
d8b1670
Updated docs and Readme File
Aug 4, 2026
ff4d99d
Enhanced dema data seed
Aug 4, 2026
d88b1bf
Added intro gif
Aug 4, 2026
4656e30
Fixed paraglide source
Aug 4, 2026
30940f5
Added doc update and version update in release
Aug 5, 2026
857d614
Update .prettierignore
Aug 5, 2026
902ab9e
Merge pull request #234 from javedh-dev/feature/redesign
javedh-dev Aug 5, 2026
86b9265
Enhanced Login screen
Aug 5, 2026
524e554
Enhanced User profile on sidebar
Aug 5, 2026
26b17bc
Fixed mileage issue for migration logs
Aug 5, 2026
2ac8642
Dashboard UI enhancements
Aug 7, 2026
8937626
Changed full app themeing to beautiful Vintage
Aug 7, 2026
0e99637
Enhanced Dashboard layout
Aug 7, 2026
8ce543d
Updated Readme and dependencies
Aug 7, 2026
d46b32b
Updated readme and demo
Aug 7, 2026
28c7a61
Update Demo to gif
Aug 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
227 changes: 227 additions & 0 deletions .agents/skills/shadcn-svelte/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
---
name: shadcn-svelte
description: Manages shadcn-svelte components and projects — adding, updating, fixing, debugging, styling, and composing UI. Provides project context, component docs, and usage examples. Applies when working with shadcn-svelte, the CLI, design-system presets, or any project with a components.json file. Also triggers for "shadcn-svelte init", "add component", or registry URLs.
user-invocable: false
allowed-tools: Bash(npx shadcn-svelte@latest *), Bash(pnpm dlx shadcn-svelte@latest *), Bash(bunx --bun shadcn-svelte@latest *)
---

# shadcn-svelte

A framework for building UI, components, and design systems for Svelte. Components are added as source to the user's project via the CLI.

> **IMPORTANT:** Run all CLI commands using the project's package runner: `npx shadcn-svelte@latest`, `pnpm dlx shadcn-svelte@latest`, or `bunx --bun shadcn-svelte@latest` — based on the project's package manager. Examples below use `npx shadcn-svelte@latest` but substitute the correct runner for the project.

## Current Project Context

Read `components.json` at the project root and, when you need the live file layout, list the directory given by the `aliases.ui` path (resolved with the same rules as the CLI).

## Imports (Svelte)

Each component lives in its own folder with an `index.ts` barrel. Match the [installation docs](https://shadcn-svelte.com/docs/installation):

- **Multi-part components** (dialog, select, card, field, tabs, …): `import * as Dialog from "$lib/components/ui/dialog"` then `Dialog.Content`, `Dialog.Title`, `Card.Root`, `Card.Header`, etc. — whatever the barrel exports (short names and/or `Root as …` aliases).
- **Single-component barrels** (only one meaningful component in the folder): **named imports** — `import { Button } from "$lib/components/ui/button"` and `<Button>`, not `import * as Button` + `Button.Root`. Same pattern for `{ Input }`, `{ Badge }`, `{ Spinner }`, `{ Checkbox }`, `{ Separator }`, `{ Skeleton }`, etc.

```ts
import * as Dialog from '$lib/components/ui/dialog';
import { Button } from '$lib/components/ui/button';
import { Separator } from '$lib/components/ui/separator';
```

Use the real aliases from `components.json` (often `$lib/components/ui/...`), not hardcoded paths.

## Principles

1. **Use existing components first.** Run `npx shadcn-svelte@latest add` with no arguments to browse available components, or check [Components](https://shadcn-svelte.com/docs/components) before writing custom UI.
2. **Compose, don't reinvent.** Settings page = Tabs + Card + form controls. Dashboard = Sidebar + Card + Chart + Table.
3. **Use built-in variants before custom styles.** `variant="outline"`, `size="sm"`, etc.
4. **Use semantic colors.** `bg-primary`, `text-muted-foreground` — never raw values like `bg-blue-500`.

## Critical Rules

These rules are **always enforced**. Each links to a file with Incorrect/Correct code pairs.

### Styling & Tailwind → [styling.md](./rules/styling.md)

- **`class` for layout, not styling.** Never override component colors or typography.
- **No `space-x-*` or `space-y-*`.** Use `flex` with `gap-*`. For vertical stacks, `flex flex-col gap-*`.
- **Use `size-*` when width and height are equal.** `size-10` not `w-10 h-10`.
- **Use `truncate` shorthand.** Not `overflow-hidden text-ellipsis whitespace-nowrap`.
- **No manual `dark:` color overrides.** Use semantic tokens (`bg-background`, `text-muted-foreground`).
- **Use `cn()` for conditional classes.** Don't write manual template literal ternaries.
- **No manual `z-index` on overlay components.** Dialog, Sheet, Popover, etc. handle their own stacking.

### Forms & Inputs → [forms.md](./rules/forms.md)

- **Forms use `Field.FieldGroup` + `Field.Field`.** Never use raw `div` with `space-y-*` or `grid gap-*` for form layout.
- **`InputGroup` uses `InputGroup.Input`/`InputGroup.Textarea`.** Never raw `Input`/`Textarea` inside `InputGroup.Root`.
- **Buttons inside inputs use `InputGroup.Root` + `InputGroup.Addon`.**
- **Option sets (2–7 choices) use `ToggleGroup`.** Don't loop `Button` with manual active state.
- **`Field.FieldSet` + `Field.FieldLegend` for grouping related checkboxes/radios.** Don't use a `div` with a heading.
- **Field validation uses `data-invalid` + `aria-invalid`.** `data-invalid` on `Field`, `aria-invalid` on the control. For disabled: `data-disabled` on `Field`, `disabled` on the control.

### Component Structure → [composition.md](./rules/composition.md)

- **Items always inside their Group.** `Select.Item` → `Select.Group`. `DropdownMenu.Item` → `DropdownMenu.Group`. `Command.Item` → `Command.Group`.
- **Custom triggers.** Wrap controls in `Dialog.Trigger` / `AlertDialog.Trigger`, or control open state with `bind:open` on the root — see component docs.
- **Dialog, Sheet, and Drawer always need a Title.** `Dialog.Title`, `Sheet.Title`, `Drawer.Title` required for accessibility. Use `class="sr-only"` if visually hidden.
- **Use full Card composition.** `Card.Header`/`Card.Title`/`Card.Description`/`Card.Content`/`Card.Footer`. Don't dump everything in `Card.Content`.
- **Button has no `isPending`/`isLoading`.** Compose with `Spinner` inside `Button` + `disabled`; use `data-icon="inline-start"` / `inline-end` on `Spinner` for correct spacing (`import { Button }`, `import { Spinner }`).
- **`Tabs.Trigger` must be inside `Tabs.List`.** Never render triggers directly in `Tabs`.
- **`Avatar` always needs `Avatar.Fallback`.** For when the image fails to load.

### Use Components, Not Custom Markup → [composition.md](./rules/composition.md)

- **Use existing components before custom markup.** Check if a component exists before writing a styled `div`.
- **Callouts use `Alert`.** Don't build custom styled divs.
- **Empty states use `Empty`.** Don't build custom empty state markup.
- **Toast via `svelte-sonner`.** Use `toast()` from `svelte-sonner` with the Sonner component from your UI folder.
- **Use `Separator`** instead of `<hr>` or a `div` with border-only classes.
- **Use `Skeleton`** for loading placeholders. No custom `animate-pulse` divs.
- **Use `Badge`** instead of custom styled spans.

### Icons → [icons.md](./rules/icons.md)

- **Icons in `<Button>` use `data-icon`.** `data-icon="inline-start"` or `data-icon="inline-end"` on the icon.
- **No sizing classes on icons inside components.** Components handle icon sizing via CSS. No `size-4` or `w-4 h-4`.
- **Pass icons as components.** Import from the configured `iconLibrary` (e.g. `@lucide/svelte`), not string keys.

### CLI

- **Presets** — copy the encoded string from the design-system builder on [shadcn-svelte.com](https://shadcn-svelte.com) and pass it to `npx shadcn-svelte@latest init --preset <code>`.

## Key Patterns

These are the most common patterns that differentiate correct shadcn-svelte code. For edge cases, see the linked rule files above.

```svelte
<script lang="ts">
import * as Field from '$lib/components/ui/field';
import { Input } from '$lib/components/ui/input';
import { Button } from '$lib/components/ui/button';
import SearchIcon from '@lucide/svelte/icons/search';
import { Badge } from '$lib/components/ui/badge';
import * as Avatar from '$lib/components/ui/avatar';
</script>

<!-- Form layout: Field.FieldGroup + Field.Field, not div + Label. -->
<Field.FieldGroup>
<Field.Field>
<Field.FieldLabel for="email">Email</Field.FieldLabel>
<Input id="email" />
</Field.Field>
</Field.FieldGroup>

<!-- Validation: data-invalid on Field, aria-invalid on the control. -->
<Field.Field data-invalid>
<Field.FieldLabel for="email">Email</Field.FieldLabel>
<Input id="email" aria-invalid />
<Field.FieldDescription>Invalid email.</Field.FieldDescription>
</Field.Field>

<!-- Icons in buttons: data-icon, no sizing classes. -->
<Button>
<SearchIcon data-icon="inline-start" />
Search
</Button>

<!-- Spacing: gap-*, not space-y-*. -->
<div class="flex flex-col gap-4"></div>

<!-- Equal dimensions: size-*, not w-* h-*. -->
<Avatar.Root class="size-10">
<Avatar.Image src="/u.png" alt="User" />
<Avatar.Fallback>U</Avatar.Fallback>
</Avatar.Root>

<!-- Status colors: Badge variants or semantic tokens, not raw colors. -->
<Badge variant="secondary">+20.1%</Badge>
```

## Component Selection

| Need | Use |
| -------------------------- | --------------------------------------------------------------------------------------------------- |
| Button/action | `Button` with appropriate variant (`import { Button }`) |
| Form inputs | `Input`, `Select`, `Combobox`, `Switch`, `Checkbox`, `RadioGroup`, `Textarea`, `InputOTP`, `Slider` |
| Toggle between 2–5 options | `ToggleGroup.Root` + `ToggleGroup.Item` |
| Data display | `Table`, `Card`, `Badge`, `Avatar` |
| Navigation | `Sidebar`, `NavigationMenu`, `Breadcrumb`, `Tabs`, `Pagination` |
| Overlays | `Dialog` (modal), `Sheet` (side panel), `Drawer` (bottom sheet), `AlertDialog` (confirmation) |
| Feedback | `svelte-sonner` (toast), `Alert`, `Progress`, `Skeleton`, `Spinner` |
| Command palette | `Command` inside `Dialog` |
| Charts | `Chart` (LayerChart) |
| Layout | `Card`, `Separator`, `Resizable`, `ScrollArea`, `Accordion`, `Collapsible` |
| Empty states | `Empty` |
| Menus | `DropdownMenu`, `ContextMenu`, `Menubar` |
| Tooltips/info | `Tooltip`, `HoverCard`, `Popover` |

## Key Fields

Use `components.json` and the filesystem — not a separate `info` command:

- **`aliases`** → use the actual alias prefix from config (e.g. `$lib/`), never hardcode unrelated projects.
- **`tailwind.css`** → the global CSS file where theme variables live. Edit this file for theme tweaks; don't add a second globals file unless the user already uses one.
- **`style`** → visual treatment (e.g. `nova`, `vega`, …) and registry style path.
- **`iconLibrary`** → determines icon packages (`@lucide/svelte`, `@tabler/icons-svelte`, etc.). Never assume `@lucide/svelte`.
- **`registry`** → where the CLI fetches components; default official registry at `shadcn-svelte.com`.
- **`resolvedPaths`** (conceptual) → the CLI resolves `aliases` to absolute paths; list `aliases.ui` on disk to see installed components.

See [cli.md](./cli.md) for commands and flags.

## Component Docs, Examples, and Usage

Open `https://shadcn-svelte.com/docs/components/<name>.md` for docs and examples. **When creating, fixing, debugging, or using a component, read the official page first** so you follow the documented APIs.

## Workflow

1. **Get project context** — read `components.json` and list the UI components directory when needed.
2. **Check installed components first** — before running `add`, list files under the resolved `ui` path. Don't import components that haven't been added, and don't re-add ones already present unless updating.
3. **Discover components** — `npx shadcn-svelte@latest add` with no arguments (interactive list), or the docs site.
4. **Install or update** — `npx shadcn-svelte@latest add <name>` or a registry **URL**. To refresh existing files from the registry, use `npx shadcn-svelte@latest update` (see [cli.md](./cli.md)).
5. **Fix imports in third-party / URL-added items** — After adding from a custom registry URL, check for hardcoded paths that don't match the project's `aliases`. Rewrite imports to use the project's `ui` / `lib` aliases from `components.json`.
6. **Review added components** — After adding, **read the added files** and verify composition (groups, titles, validation attrs). Align icon imports with `iconLibrary`.
7. **Remote registry items** — Adding by URL is explicit; if the user wants a component from an unknown source, confirm the registry URL or item before running `add`.

## Updating Components

Use the **`update`** command to pull the latest registry versions of components already in the project. Review changes with `git diff` after `update`.

1. Commit or stash local work.
2. Run `npx shadcn-svelte@latest update [component]` or `--all`.
3. Resolve merge conflicts if you had customized files.
4. **Never use `--overwrite` on `add` without the user's explicit approval** when it would destroy intentional edits.

## Quick Reference

```bash
# Initialize shadcn-svelte in your project.
npx shadcn-svelte@latest init

# Initialize with a preset string from the docs site builder.
npx shadcn-svelte@latest init --preset <code>

# Add components (interactive when run with no names).
npx shadcn-svelte@latest add
npx shadcn-svelte@latest add button card dialog
npx shadcn-svelte@latest add --all

# Update components already installed.
npx shadcn-svelte@latest update button
npx shadcn-svelte@latest update --all --yes

# Build a custom registry (registry authors).
npx shadcn-svelte@latest registry build
```

**Registry:** default `https://shadcn-svelte.com/registry` — override in `components.json` if needed.
**Docs:** [shadcn-svelte.com](https://shadcn-svelte.com)

## Detailed References

- [rules/forms.md](./rules/forms.md) — Field.FieldGroup, Field.Field, InputGroup, ToggleGroup, Field.FieldSet, validation states
- [rules/composition.md](./rules/composition.md) — Groups, overlays, Card, Tabs, Avatar, Alert, Empty, Toast, Separator, Skeleton, Badge, Button loading
- [rules/icons.md](./rules/icons.md) — data-icon, icon sizing, passing icon components
- [rules/styling.md](./rules/styling.md) — Semantic colors, variants, class, spacing, size, truncate, dark mode, cn(), z-index
- [cli.md](./cli.md) — Commands, flags, registry
- [customization.md](./customization.md) — Theming, CSS variables, extending components
5 changes: 5 additions & 0 deletions .agents/skills/shadcn-svelte/agents/openai.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
interface:
display_name: 'shadcn-svelte'
short_description: 'Manages shadcn-svelte components — adding, updating, fixing, debugging, styling, and composing UI.'
icon_small: './assets/shadcn-svelte-small.png'
icon_large: './assets/shadcn-svelte.png'
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading