Skip to main content

Stack

Vue 3 (Composition API) + TypeScript + Vite + Tailwind CSS 3 + TanStack Query

Directory Structure

Routing

Auth guard in router/index.ts: redirects to /login if no JWT in localStorage. Public routes marked with meta: { public: true }.

State Management

Pinia (stores/auth.ts): user, token, isAuthenticated, isPremium, fullName, initials, login(), logout(), fetchProfile() TanStack Query: All API data fetched via useQuery with computed query keys for reactivity. Mutations use useMutation with onSuccess cache invalidation.

Design System (Tailwind)

Cards use rounded-[10px] border-[1.5px] border-border. Labels are text-[10px] font-bold uppercase tracking-[0.07em].