DIRACGrid / DIRACGrid/diracx-web

Replace Next.js with Vite + client-side router (TanStack Router or React Router)

Open
#481 1 comment 1 reaction 1 assignee Claimed by @kjvbrt View on GitHub
Dominant language
TypeScript
Stars
4
Forks
15
Avg merge
2h 24m
Merged PRs (30d)
2

Description

### Description

DiracX-Web is a fully client-side SPA shipped as a static export. We use none of Next.js's server features (no SSR, no API routes, no middleware, no server components). Every component is marked `"use client"`.

Next.js is increasingly server-oriented — each upgrade risks new server defaults we must opt out of. We're fighting the framework rather than benefiting from it.

**What Next.js costs us today:**
- Webpack config hacks for HMR in the monorepo (`next.config.js`)
- `"use client"` on every component, `dynamic: "error"`, `images: { unoptimized: true }` — all workarounds for features we don't use
- Slower dev server than esbuild-based alternatives
- Extension boilerplate: adding a single custom app (e.g. gubbins) requires ~8 framework files (layouts, pages, error boundaries) on top of the ~4 actual business logic files

**Proposal:** Replace Next.js with **Vite** as build tool. Use this as an opportunity to simplify the extension contract so extensions only provide a config + components, not duplicated framework boilerplate.

### Definition of Done

- [ ] Replace Next.js with Vite
- [ ] Evaluate whether TanStack Router is needed (we only have 2 routes: `/auth` and `/`)
- [ ] Simplify the extension contract to remove framework boilerplate
- [ ] OIDC redirect flow still works
- [ ] All existing Cypress tests pass

Thanks @ryuwd for the initial suggestion and investigation in LHCb context!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.