Skip to content

Migrate admin app from Next.js App Router to TanStack Start#47

Draft
lorenzocorallo wants to merge 12 commits into
mainfrom
t3code/rewrite-to-tanstack-start
Draft

Migrate admin app from Next.js App Router to TanStack Start#47
lorenzocorallo wants to merge 12 commits into
mainfrom
t3code/rewrite-to-tanstack-start

Conversation

@lorenzocorallo

Copy link
Copy Markdown
Member

Summary

  • Replaced Next.js App Router, API routes, and tRPC setup with TanStack Start (React 19, Vite, Nitro, TanStack Router).
  • Migrated file-system based routing from src/app/ to src/routes/.
  • Replaced Next.js API routes and tRPC procedures with TanStack Start server functions.
  • Updated Better Auth integration for the TanStack Start framework.
  • Upgraded core dependencies: React 18 → 19, Tailwind CSS v3 → v4, TypeScript 5 → 6, Vite.
  • Simplified the Docker build to use the Nitro standalone server output.
  • Removed next, postcss, @t3-oss/env-nextjs, @trpc/next, radix-ui, cmdk, react-hook-form, and many unused shadcn components.
  • Consolidated UI components and fixed biome lint errors, including accessibility improvements.
  • Added skeleton loading states for all dashboard routes and fixed login redirect logic.
  • Standardized Lucide icon sizing across the UI.

Testing

  • pnpm dev starts successfully on port 3001 and hot-reloads correctly.
  • pnpm build completes without errors, producing a standalone Nitro server.
  • pnpm start serves the production build correctly.
  • pnpm typecheck passes with zero type errors.
  • pnpm check passes biome linting and formatting checks.
  • Login flow redirects to the dashboard when a valid session exists.
  • Dashboard loads, renders sidebar navigation, and routes to account, Azure, and Telegram sections.
  • Azure members table loads data, supports pagination, and allows member management.
  • Telegram grants, groups, and user detail pages render data and support mutations.
  • Docker image builds and runs the application correctly.
  • Not run: Full browser end-to-end test suite (no Playwright/Cypress configuration detected).

- 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
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 27dec105-d064-4c0a-a354-8dd2faa685d8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…stack-start

# Conflicts:
#	src/app/dashboard/(active)/azure/members/create-assoc-member.tsx
@lorenzocorallo lorenzocorallo marked this pull request as draft July 10, 2026 21:30
- 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`
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