chore: Update with-nextjs-elysia example (#15101)
Updates the `with-nextjs-elysia` example to the latest stable versions
and fixes several spots where the example was broken or inconsistent.
## Versions
- `packageManager`: `bun@1.4.5`; `engines.node`: `>=26`
- `turbo` 2.11.13, `ultracite` 8.3.1, `@biomejs/biome` 2.6.8,
`typescript` 7.0.2
- `next` 16.4.6, `react`/`react-dom` 19.3.1,
`@types/react`/`@types/react-dom` 19.3.0, `@types/node` 26.6.6
- `elysia` 1.4.32, `@elysiajs/eden` 1.4.9, `@sinclair/typebox` 0.34.52,
`@tanstack/react-query` 5.108.2, `geist` 1.9.2, `sonner` 2.0.8,
`tailwindcss`/`@tailwindcss/postcss` 4.3.5, `@types/pg` 8.23.1
- Drizzle moves from the `1.0.0-beta` prereleases to the stable `latest`
releases: `drizzle-orm` 0.45.4, `drizzle-typebox` 0.3.3, `drizzle-kit`
0.31.11
- Every direct dependency is now pinned to an exact version. `bun.lock`
was regenerated with `bun install`.
## Migrations and fixes
- **turbo.json**: removed an inline comment that broke strict JSON
parsing. Renamed the `type-check` task to `check-types` so it matches
the package scripts and the root script. `lint` and `check-types` now
depend on the same task in dependencies.
- **Drizzle**: the stable release doesn't have the beta-only
`defineRelations` API, so the relations are rewritten with `relations()`
(user ↔ role many-to-many through `sys_user_role`). The duplicate
`drizzle-typebox` devDependency is gone, and the `db:*` scripts call the
local `drizzle-kit` directly.
- **Elysia in Next.js**:
- The app now lives in `apps/web/server/app.ts`. Before, it was exported
from the route file, which isn't a valid route export, and `server.ts`
was unfinished.
- The prefix is now `/api/v1` so it matches the catch-all route. The
route exports `GET` (it was missing) plus `POST`/`PUT`/`PATCH`/`DELETE`
via `app.fetch`, as Elysia's docs show.
- The Eden client points at `api.v1`.
- Removed an empty `api/sitemap/route.ts`.
- **Biome/Ultracite**: switched to the Ultracite 8 preset paths
(`ultracite/biome/core`, `/react`, `/next`) and dropped the long list of
rules that had been turned off. The code was fixed to pass the presets
instead.
- `@repo/ui`'s `lint` used to call ESLint, which wasn't installed; it
now runs `biome check`. `@repo/contract` gets a `lint` script too.
- The root has a `lint` script, and `check`/`fix` call `ultracite`
directly.
- **TypeScript**: cleaned up the shared configs:
- Targets are now ES2024.
- Declaration output is only on in `@repo/contract`, which emits `dist`.
Leaving it on for the Next app caused a non-portable type error.
- The Next config uses `jsx: react-jsx`.
- The web tsconfig no longer repeats options it inherits.
- `@repo/contract` no longer uses `composite`.
- `web`'s `check-types` runs `next typegen` first.
- **App code**:
- Rewrote the query provider in English with typed error handling.
- Added the missing `<Toaster />` so `sonner` toasts actually show.
- Removed commented-out code and unused imports.
- Gave the `@repo/ui` button an explicit `type`.
- Translated the remaining Chinese comments.
- **Manifests**: removed the unused
`ignoreScripts`/`trustedDependencies` entries from `apps/web` and marked
`@repo/contract` private.
- **README**: now says Next.js 16 and describes the Elysia/Eden setup.
Added type-check, format and database commands, switched to `bunx
turbo`, and fixed a malformed Vercel signup link.
## Manual verification
I ran `next start` on the production build and checked that `GET
/api/v1` returns `Hello from Elysia` through the Next route handler, and
that the prerendered home page shows the same response through Eden.
Co-authored-by: vercel-gh-bot-3[bot] <282332853+vercel-gh-bot-3[bot]@users.noreply.github.com>