-
-
-
+
+
+
+
+
+
+
+ {{ error }}
+
+
+
+
+
+
+
+
+
+ or
-
-
- {{ error }}
-
-
-
-
-
or
-
-
-
+
+
+
@@ -821,15 +885,12 @@ Migrate pages in order of complexity:
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
-import Components from 'unplugin-vue-components/vite'
-import { PrimeVueResolver } from '@primevue/auto-import-resolver'
+import tailwindcss from '@tailwindcss/vite'
export default defineConfig({
plugins: [
vue(),
- Components({
- resolvers: [PrimeVueResolver()],
- }),
+ tailwindcss(),
],
resolve: {
@@ -846,7 +907,6 @@ export default defineConfig({
output: {
manualChunks: {
vue: ['vue', 'vue-router', 'pinia'],
- primevue: ['primevue'],
charts: ['chart.js', 'vue-chartjs'],
},
},
@@ -889,13 +949,16 @@ export default defineConfig({
"vue": "^3.5.0",
"vue-router": "^4.4.0",
"pinia": "^2.2.0",
- "@primevue/themes": "^4.2.0",
- "primevue": "^4.2.0",
- "primeicons": "^7.0.0",
+ "radix-vue": "^1.9.0",
+ "class-variance-authority": "^0.7.0",
+ "clsx": "^2.1.0",
+ "tailwind-merge": "^2.5.0",
+ "@tanstack/vue-table": "^8.20.0",
"@trpc/client": "^11.0.0",
"@tanstack/vue-query": "^5.60.0",
"@vueuse/core": "^11.0.0",
"@simplewebauthn/browser": "^10.0.0",
+ "lucide-vue-next": "^0.460.0",
"chart.js": "^4.4.0",
"vue-chartjs": "^5.3.0"
},
@@ -910,9 +973,7 @@ export default defineConfig({
"tailwindcss": "^4.0.0",
"autoprefixer": "^10.4.0",
"eslint": "^9.14.0",
- "eslint-plugin-vue": "^9.30.0",
- "unplugin-vue-components": "^0.27.0",
- "@primevue/auto-import-resolver": "^4.2.0"
+ "eslint-plugin-vue": "^9.30.0"
}
}
```
@@ -926,7 +987,7 @@ export default defineConfig({
| Aspect | Before (React) | After (Vue 3) |
|--------|---------------|---------------|
| Framework | React 18 | Vue 3 |
-| UI Library | MUI (~300kb) | PrimeVue (tree-shake) |
+| UI Library | MUI (~300kb) | shadcn-vue (own code) |
| State | Zustand | Pinia |
| API | Apollo GraphQL | tRPC |
| Styling | Tailwind | Tailwind (keep) |
@@ -939,11 +1000,11 @@ export default defineConfig({
| Chunk | Before | After |
|-------|--------|-------|
| Framework | ~42kb | ~33kb |
-| UI Library | ~300kb | ~80kb* |
+| UI Library | ~300kb | ~15kb* |
| API Client | ~50kb | ~5kb |
-| **Total** | **~400kb** | **~120kb** |
+| **Total** | **~400kb** | **~60kb** |
-*PrimeVue with tree-shaking, only used components
+*shadcn-vue components are copied to your codebase, only includes what you use
#comparison #summary
diff --git a/docs/features/machine-ui-modernization.md b/docs/features/machine-ui-modernization.md
index 582e146..e49603c 100644
--- a/docs/features/machine-ui-modernization.md
+++ b/docs/features/machine-ui-modernization.md
@@ -102,6 +102,7 @@ var websocket = null
- **Pinia** - Type-safe state management
- **VueUse** - Composables for common tasks
- **Vue I18n** - Internationalization
+ - **shadcn-vue** - Shared components with admin UI
> [!note] Why Not Svelte?
> Svelte has the smallest bundle, but Vue has:
@@ -109,6 +110,9 @@ var websocket = null
> - More developers familiar with it
> - Better tooling maturity
+> [!tip] Shared UI Components
+> Use shadcn-vue for base components (Button, Card, etc.) to share code between machine and admin UIs via `@lamassu/ui-shared` package.
+
#vue #framework
---
diff --git a/docs/modernization-plan.md b/docs/modernization-plan.md
index 5dbf58c..6d4d5f9 100644
--- a/docs/modernization-plan.md
+++ b/docs/modernization-plan.md
@@ -42,7 +42,7 @@ graph TB
end
subgraph "Admin UI"
- vue_admin[Vue 3 + PrimeVue]
+ vue_admin[Vue 3 + shadcn-vue]
tailwind[Tailwind CSS]
end
@@ -161,10 +161,10 @@ graph LR
| Aspect | Before (React) | After (Vue 3) |
|--------|---------------|---------------|
| Framework | React 18 | Vue 3 |
-| UI Library | MUI (~300kb) | PrimeVue (tree-shake) |
+| UI Library | MUI (~300kb) | shadcn-vue (~15kb) |
| State | Zustand | Pinia |
| API | Apollo GraphQL | tRPC |
-| Bundle | ~400kb | ~120kb |
+| Bundle | ~400kb | ~60kb |
**Benefits:**
- Single framework across all UIs