Migrate admin app from Next.js App Router to TanStack Start - #47
Migrate admin app from Next.js App Router to TanStack Start#47lorenzocorallo wants to merge 24 commits into
Conversation
- Replace Next.js app shell with TanStack Start, Vite, and Nitro - Remove legacy app router, shadcn scaffolding, and Next build config - Update Docker, scripts, and lockfile for the new runtime
- Add Tailwind CSS v4 and shadcn/ui setup - Refactor dashboard and auth screens onto the new component system - Update docs and dependencies for the new UI stack
- Fix import ordering and type imports - Add htmlFor/labels for accessibility - Replace div[role=group] with fieldset - Suppress auto-generated routeTree.gen.ts in biome check - Simplify biome check scripts
- Added explicit size-4/5/6/7 className to icon components across dashboard, login, and onboarding routes - Swapped login page logo from .png to .svg
- Added DataPageSkeleton, DetailPageSkeleton, DashboardPageSkeleton components - Added shadcn/ui Skeleton component - Set defaultPendingMs to 100ms in router config - Replaced missing h2 titles with skeleton placeholders on account page - Removed redundant h2 from DataToolbar
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…stack-start # Conflicts: # src/app/dashboard/(active)/azure/members/create-assoc-member.tsx
- Removed manual query/membersOnly/sort/pagination state from Azure/Telegram tables - Replaced with globalFilteringFeature, rowSortingFeature, rowPaginationFeature - Added page-size selector and first/last-page buttons to Pagination - Controlled search input debounced with useDeferredValue in DataToolbar - Added "Add group admin" dialog to user detail page - Removed DashboardPageSkeleton - Switched router.invalidate calls to sync mode
- Sync loader data to local state for optimistic updates - Rollback UI on save failure for edit operations - Only invalidate router on create, not edit - Disable auto page reset for table
- New ThemeToggle component with dark/light mode switching - Add dark mode CSS variables and component overrides - Remove `/dashboard/telegram/users` layout route, flatten children under `/dashboard`
- Group navigation by section (Telegram, Azure, Web) with icons - Extract reusable PageHeader component from DataToolbar - Increase default button, input, and badge sizes - Add DataTableHead variant for styled table headers - Improve sidebar user section with Avatar component - Remove hardcoded text colors, switch to theme tokens - Replace ring-based card borders with border utility
- Use auth.getSession() instead of direct /api/auth/get-session fetch - Set auth client baseURL from BACKEND_URL env var - Remove local AdminSession type - Fix Telegram groups table layout (min-width, full-width button) - Fix sendEmailTo Zod validation
- Replace custom sidebar with shadcn Sidebar component - Add DashboardBreadcrumb with route-based auto-generation - Extract navigation data into dashboard-navigation module - Add Base UI primitives: breadcrumb, collapsible, sheet, tooltip - Persist sidebar state via cookie and category collapse via localStorage
- Bump @polinetwork/backend to ^0.17.0 - Add cmdk dependency and Command UI component - Add InputGroup and Textarea UI components - Add Azure groups dashboard route and navigation item - Export AzureGroup type from API types - Fix avatar border token (border-input) - Remove tooltip arrow from TooltipContent - Remove unused Separator import in dashboard-frame
This add an agent mode that allows agents to preview the changes without having to mess around with authentication or permission checks
|
The TanStack Start rewrite and the final audited contents of this stack are included in main via squash commit 5f3c823. |
Summary
This PR migrates the admin application from Next.js App Router to TanStack Start, replacing the framework/runtime layer while preserving the existing admin surface and server capabilities.
The rewrite includes the route migration from
src/apptosrc/routes, replacement of the old API and tRPC wiring with TanStack Start server functions, Better Auth integration updates for the new runtime, and the related dependency/tooling upgrades around React 19, Vite, Tailwind v4, TypeScript 6, and the Nitro production build.Changes Beyond The Rewrite
AGENT_MODEfor local agent-driven development, allowing direct access to dashboard flows without the normal auth and role redirects in development.input-groupUI primitives.baseURLhandling.Testing
pnpm devstarts successfully.pnpm buildcompletes successfully.pnpm startserves the production build.pnpm typecheckpasses.pnpm checkpasses.