Skip to content

Mirror web as Vue SPA (apps/web-vue) - #37

Merged
xirothedev merged 47 commits into
mainfrom
feat/web-vue-mirror
Sep 1, 2026
Merged

Mirror web as Vue SPA (apps/web-vue)#37
xirothedev merged 47 commits into
mainfrom
feat/web-vue-mirror

Conversation

@xirothedev

@xirothedev xirothedev commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Implements #39 (spec). Closes tickets #40 #41 #42 #43 #44 #45 #46 #47 #48 #49 #50.

Vue 3 + Vite SPA mirror of apps/web: all 42 routes, same API, cookie+CSRF auth, shadcn-vue UI port. Decisions and ticket graph: #39.

…faq, partner, achievements, activities, privacy/refund/terms

Ports apps/web marketing pages page-for-page: WDS home sections (hero, contact bento+
beams, clients, mission, stats), about hero/sections, generation gen sections (mobile
expandable + desktop bento), faq grid, dark partner/achievements/activities pages with
their components, and the 3 legal content.mdx copied to .md (LastUpdated line dropped,
rendered via marked with slugified heading ids driving the LegalLayout TOC). Static data
copied: faq, generations; achievements/activities/partners icons ported to lucide-vue
components. Navbar/Footer stay shell-owned (App.vue); page <main> wrappers became divs;
StructuredData JSON-LD already provided by App.vue head.

Refs #43
Mirror apps/web: /orders list (skeleton, empty, pagination, cancel),
/orders/:id detail (cancel, payment-status states), /account/profile
(form + avatar upload), /account/settings (2FA/password/verification
links + session revoke). Local components only; shell owns Navbar/Footer.
@xirothedev
xirothedev marked this pull request as ready for review September 1, 2026 06:44
@xirothedev

Copy link
Copy Markdown
Owner Author

Review pass complete (Standards + Spec axes vs #39). Fixed: real 404, shop hero sections, auth/admin chrome, navbar variants, csrf dead export, public-route single-sourcing, lazy route chunks, shared date helpers, availableStock computed, calendar mock-data notice, admin table wrapper, hooks consolidated into lib/api/hooks. Build + vue-tsc green on merged branch.

xirothedev and others added 9 commits September 1, 2026 15:37
… og image from path

Candidate 6 (time only): merge relative-time.ts + event-helpers distanceToNow into
one relativeTime(date, now?) in lib/date; update both call sites.
Candidate 7: createPageMetadata falls back to SEO_IMAGES[path] when no explicit image.

Co-Authored-By: Claude Opus 4.3 <noreply@anthropic.com>
…ns and totals

- use-pending-order: single owner of pendingOrderId/paymentUrl_* localStorage keys
- use-cart: useCartActions (updateQuantity/removeItem/isUpdating, <1 clamp) + cartTotals
  absorbed duplicated handlers/footer math from cart.vue, floating-cart-button.vue, checkout.vue
- tests: pending-order round-trip, cart-totals shipping math
…pure transport

- src/lib/auth owns: currentUser query, both user cache keys + sync/invalidate,
  PUBLIC_ROUTES/isPublicRoute, expiry-redirect policy, admin guard decision
- api-client: no route policy, no window.location; one registerAuthLostHandler
  callback, registered by src/lib/auth, fired on failed refresh
- delete dead code: route meta.public annotation, requires2FA ref
- tsconfig: exclude test files from vue-tsc (no @types/bun, no new deps)
- bun test: 4 tests / 23 asserts incl. 401-queue-exhausted onAuthLost wiring
- delete useProductStock/useSuspenseProduct/useSuspenseOrders/useClearCart/useVerifyPayment (0 call sites or alias)
- orders.vue: inline mutation -> useUpdateOrderStatus (also invalidates adminKeys orders)
- users.vue: delete try/catch -> useDeleteAdminUser (toast + invalidation in hook)
- admin list hooks normalize to { rows, total } at the seam
- admin-data-table: v-model:page + rows + total?; next-disable rule extracted as
  nextDisabledFor() with unit test; nextDisabled/pagination props retired
@xirothedev

Copy link
Copy Markdown
Owner Author

Architecture review pass (7 candidates, apps/web-vue): 6 implemented, money-format unification skipped per decision (mirror-visible; needs both-apps branch).

  • lib/auth deep module: policy + public-route + expiry moved out of api-client (onAuthLost callback); seam unchanged at composables/use-auth
  • use-pending-order owns the checkout→payments localStorage contract (12 raw usages → 5 named calls)
  • use-cart exports cart actions + totals (3 duplicated implementations deleted)
  • admin-data-table interface shrunk (v-model:page, {rows,total} at hook seam, nextDisabled retired)
  • Dead code deleted (meta.public, requires2FA, 5 hooks, 2 shadow admin mutations)
  • relativeTime consolidated in lib/date.ts; usePageMeta derives OG image from path
  • bun test: 19 tests / 38 asserts across auth policy, pending-order, cart totals, paging, dates

…es surface (toast arms checked instanceof Error; status/data kept on the object)
…as per-site Intl currency, different strings than the rest of the UI)
@xirothedev

Copy link
Copy Markdown
Owner Author

Mirror-callout bugs + money unification fixed symmetrically in apps/web and apps/web-vue (every commit holds parity):

  • payments create-link/verify hit /v1/v1/... (baseURL already carries /v1) — now correct in both apps
  • api-client rejected plain objects, so every error instanceof Error toast arm always showed the fallback — now rejects Error with status/data attached; server messages surface
  • 7 per-site Intl currency usages replaced with the canonical formatPrice(x) + '₫' (one string everywhere, no per-render formatter rebuild in admin dashboard)

@xirothedev
xirothedev merged commit 131a253 into main Sep 1, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant