Update modernization plan: Vue 3 for all UIs

- Update architecture diagram to show Vue 3 for both admin and machine
- Replace React decision with Vue 3 unification strategy
- Update machine UI section to include Vue 3 + Tauri
- Add Vue 3 to trade-offs table
- Link to new detailed migration docs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Patrick Mulligan 2026-01-22 14:48:34 -05:00
commit 7251692464

View file

@ -42,19 +42,20 @@ graph TB
end end
subgraph "Admin UI" subgraph "Admin UI"
react[React 19 + TanStack] vue_admin[Vue 3 + PrimeVue]
shadcn[Shadcn/ui + Tailwind] tailwind[Tailwind CSS]
end end
subgraph "lamassu-machine" subgraph "lamassu-machine"
tauri[Tauri 2.x Rust Core] tauri[Tauri 2.x Rust Core]
vue_machine[Vue 3 + Pinia]
xstate[XState v5] xstate[XState v5]
hal[Rust HAL napi-rs] hal[Rust HAL napi-rs]
hw[Hardware Drivers] hw[Hardware Drivers]
end end
react -->|tRPC| fastify vue_admin -->|tRPC| fastify
tauri -->|GraphQL| fastify tauri -->|WebSocket| fastify
fastify --> pg fastify --> pg
fastify --> otel fastify --> otel
otel --> jaeger otel --> jaeger
@ -154,16 +155,26 @@ graph LR
### Frontend (Admin UI) ### Frontend (Admin UI)
> [!decision] Keep React, Modernize Patterns > [!decision] React → Vue 3
> React's ecosystem dominance (190M weekly downloads) makes migration unnecessary for admin dashboards. > Unify on Vue 3 across all UIs (admin + machine) for consistency and shared code.
**Modernization:** | Aspect | Before (React) | After (Vue 3) |
- [ ] Upgrade to React 19 (Server Components) |--------|---------------|---------------|
- [ ] Replace MUI with Shadcn/ui + Tailwind | Framework | React 18 | Vue 3 |
- [ ] TanStack Query for data fetching | UI Library | MUI (~300kb) | PrimeVue (tree-shake) |
- [ ] TanStack Router for type-safe routing | State | Zustand | Pinia |
| API | Apollo GraphQL | tRPC |
| Bundle | ~400kb | ~120kb |
#frontend #react #tailwind **Benefits:**
- Single framework across all UIs
- Shared composables between admin and machine
- 70% bundle size reduction
- End-to-end type safety with tRPC
See [[admin-ui-modernization]] for detailed migration plan.
#frontend #vue #tailwind
--- ---
@ -189,8 +200,19 @@ graph LR
### Machine UI Framework ### Machine UI Framework
> [!decision] Vanilla JS → Tauri 2.x > [!decision] Vanilla JS → Vue 3 + Tauri 2.x
> Security-first design critical for financial kiosk applications. > Vue 3 for UI consistency, Tauri for security-first kiosk shell.
**UI Layer: Vue 3**
| Aspect | Before | After |
|--------|--------|-------|
| Framework | Vanilla JS + jQuery | Vue 3 |
| State | Global variables | Pinia |
| Build | Babel 6 | Vite |
| File | 80KB monolith | Component-based |
**Shell: Tauri 2.x**
| Aspect | Electron | Tauri | | Aspect | Electron | Tauri |
|--------|----------|-------| |--------|----------|-------|
@ -199,13 +221,15 @@ graph LR
| Startup | 1-2s | **<0.5s** | | Startup | 1-2s | **<0.5s** |
| Security | Full Node access | **Explicit allowlist** | | Security | Full Node access | **Explicit allowlist** |
**Why Tauri for ATMs:** **Benefits:**
- Security by default (restrictive API model) - Same Vue 3 skills as admin UI
- Lower resource usage on embedded hardware - Shared ui-shared package
- Rust backend integrates with hardware drivers - Tauri's Rust core for hardware drivers
- 35% adoption increase in 2024 - Security by default
#tauri #kiosk #security See [[machine-ui-modernization]] for detailed migration plan.
#tauri #vue #kiosk #security
--- ---
@ -458,6 +482,7 @@ test('user can complete transaction', async ({ page }) => {
| Node.js over Bun | Stability, ecosystem | Raw performance | | Node.js over Bun | Stability, ecosystem | Raw performance |
| Fastify over Hono | Mature plugins | Minimal bundle | | Fastify over Hono | Mature plugins | Minimal bundle |
| Drizzle over Prisma | Bundle size, speed | DX features | | Drizzle over Prisma | Bundle size, speed | DX features |
| Vue 3 over React | Unified UI, smaller bundle | React ecosystem |
| Tauri over Electron | Security, efficiency | Ecosystem maturity | | Tauri over Electron | Security, efficiency | Ecosystem maturity |
| XState over simple FSM | Visualization, debugging | Simplicity | | XState over simple FSM | Visualization, debugging | Simplicity |
@ -489,5 +514,9 @@ test('user can complete transaction', async ({ page }) => {
## Related Notes ## Related Notes
- [[CLAUDE]] - Claude Code guidance - [[CLAUDE]] - Claude Code guidance
- [[admin-ui-modernization]] - Vue 3 migration for admin dashboard
- [[machine-ui-modernization]] - Vue 3 migration for kiosk UI
- [[membership-lightning-integration]] - Membership & LNbits feature
- [[lnbits-integration]] - Lightning backend integration
- [[Architecture Decision Records]] - ADRs for each decision - [[Architecture Decision Records]] - ADRs for each decision
- [[NixOS Configuration]] - Production NixOS setup - [[NixOS Configuration]] - Production NixOS setup