Skip to content

Feature: Client foundation — Zustand, daisyUI, and app shell #43

@FadyGergesRezk

Description

@FadyGergesRezk

Replace the placeholder app shell with a production-ready layout and install the shared dependencies all feature pages will build on.

Stack to install

  • TanStack Query v5 — server state, caching, mutations
  • Zustand — UI-only state (selected row, modal open/close, active tab); not for server data
  • React Hook Form + Zod — form handling and validation tied to OpenAPI-generated types
  • daisyUI — pre-built Tailwind component library with complete design system (colors, typography, themes)

Tasks

  • Install and configure TanStack Query v5; wrap app in QueryClientProvider with sensible defaults (staleTime, gcTime, no retry on 401/403)
  • Install Zustand; create a shared store scaffold under src/store/ for UI-only state
  • Install React Hook Form and Zod; add src/lib/forms.ts as a shared entry point for zodResolver
  • Install daisyUI and configure Tailwind v4 theme with daisyUI preset
  • Configure Axios interceptors on the shared client: attach Authorization: Bearer <token> header on requests; redirect to /login on 401, surface 403 as a toast
  • Replace the inline header in AppRouter.tsx with a proper layout component (src/app/layout/) with sidebar or top nav using daisyUI components
  • Add a shared ErrorMessage and LoadingSpinner component to src/components/ui/ using daisyUI primitives
  • Remove ServicePlaceholderPage and hello-endpoint imports; replace each route with an empty page stub in its feature folder
  • Wire up React Router v7 loaders pattern so each route can prefetch via queryClient.ensureQueryData()

Acceptance criteria

  • pnpm build passes with no type errors
  • App loads with the new layout; all 6 nav links navigate to their stub pages
  • QueryClientProvider wraps the app; TanStack Query DevTools visible in dev
  • Zustand store is importable; daisyUI components are available for feature issues
  • Axios interceptor attaches the Bearer token on every request

Metadata

Metadata

Assignees

No one assigned

    Labels

    clientIssue regarding the client frontendenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions