Skip to content

feat: migrate admin dashboard from Chakra UI to shadcn/ui + Tailwind CSS#605

Merged
lakhansamani merged 22 commits into
mainfrom
feat/dashboard-modernization
Apr 11, 2026
Merged

feat: migrate admin dashboard from Chakra UI to shadcn/ui + Tailwind CSS#605
lakhansamani merged 22 commits into
mainfrom
feat/dashboard-modernization

Conversation

@lakhansamani
Copy link
Copy Markdown
Contributor

Summary

Complete modernization of the admin dashboard (web/dashboard/):

  • UI framework migration: Replaced Chakra UI v2 with shadcn/ui (Radix primitives) + Tailwind CSS v4
  • Full TypeScript type safety: Eliminated all any types and @ts-ignore directives, added proper interfaces for all GraphQL responses, component props, and data models
  • Dead dependency removal: Removed unused react-draft-wysiwyg, along with @emotion/react, @emotion/styled, framer-motion, react-icons, focus-visible
  • Modern component library: 17 shadcn/ui-style components in src/components/ui/ built on Radix primitives
  • Brand identity: Authorizer logo and blue-500 brand color applied throughout
  • UX improvements: Cleaner tables, Sheet panels for edit forms, sonner toast notifications, skeleton loading states, better responsive layout

Dependencies removed

@chakra-ui/react, @chakra-ui/icons, @emotion/react, @emotion/styled, framer-motion, react-draft-wysiwyg, react-icons, focus-visible

Dependencies added

tailwindcss, @tailwindcss/vite, lucide-react, clsx, tailwind-merge, class-variance-authority, sonner, and Radix UI primitives

Preserved

All GraphQL queries/mutations, urql client, react-email-editor (Unlayer), react-dropzone, routing structure, /dashboard base path

Verification

  • npx tsc --noEmit — zero errors (strict mode)
  • npm run build — passes (built in ~1s)
  • Zero any types or @ts-ignore in source
  • Zero Chakra UI imports remaining

Test plan

  • Login with admin secret — verify auth flow works
  • Navigate all pages (Users, Webhooks, Email Templates)
  • CRUD operations: create/edit/delete user, webhook, email template
  • Test CSV invite upload
  • Test email template editor (Unlayer + plain HTML modes)
  • Test webhook log viewer
  • Verify responsive layout on mobile viewport
  • Verify brand colors and logo display correctly
- Replace Chakra UI v2, Emotion, framer-motion, react-icons with
  Tailwind CSS v4, Radix primitives, lucide-react, and sonner
- Add shadcn/ui component library (button, input, select, textarea,
  switch, table, dialog, sheet, card, badge, tooltip, separator,
  skeleton, dropdown-menu, accordion)
- Add full TypeScript type safety with strict mode: define types.ts
  with User, Webhook, EmailTemplate, WebhookLog, pagination and
  GraphQL response interfaces
- Eliminate all `any` types, `@ts-ignore`, and untyped props
- Replace Menu.tsx with Sidebar.tsx using lucide-react icons
- Use Sheet (slide-over) for edit forms, Dialog for confirmations
- Use sonner toast notifications instead of Chakra useToast
- Use Skeleton loading states instead of Spinner
- Add Tailwind v4 with @tailwindcss/vite plugin and CSS-based config
- Add cn() utility (clsx + tailwind-merge) for class composition
Update header to light & clean h1/subtitle design, swap pageLimits for
pageLimitsExtended ([10, 25, 50]), and set default page limit to 10.
Run prettier --write on all dashboard source files for consistent
formatting across the codebase.
1. Hide MobileNav on desktop — was overlapping content
2. Add proper padding to main content area (px-4 md:px-8 pb-8)
3. Add ViewUserModal — click any user row to see all details
4. Fix audit logs query — use nested pagination object per GraphQL schema
5. Fix MIME type errors — change vite base to /dashboard/build/ so lazy
   chunks load from the static handler instead of the HTML catch-all
6. Unlayer editor now loads correctly (was blocked by MIME type issue)
…able borders

- Wrap Overview and AuditLogs pages in same container as other pages
  (m-5 rounded-md bg-white py-5 px-10) so content doesn't stick to sidebar
- Change table row borders from black (border-b) to light gray
  (border-gray-100) for a cleaner look
- Remove shadow-sm from Card, dropdown-menu, tooltip components
- Change all bare 'border' to 'border border-gray-100' across UI components
- Remove shadow-sm from audit log filter selects
- Soften pagination border in audit logs
Backend schema doesn't support actor_type as a query filter. Changed to
client-side filtering on the loaded page data instead.
Add editor.unlayer.com to script-src, style-src, font-src and
api.unlayer.com to connect-src. Add frame-src for the embedded editor.
@lakhansamani lakhansamani merged commit 64587f0 into main Apr 11, 2026
@lakhansamani lakhansamani deleted the feat/dashboard-modernization branch April 11, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant