Next Elite
Frontend-first, API-driven Next.js 16 boilerplate with i18n, RBAC, BetterAuth, and a polished DX.
๐
Modern stack, lean setup
FrameworkNext.js 16 + React 19
UITailwind v4 + shadcn
Next.js 16 App Router, React 19, Tailwind v4.
- โRSC-first; client components only when needed
- โOwnable shadcn/ui primitives
- โAPI-driven; no forced database layer
๐
BetterAuth
AuthBetterAuth
AccessRBAC
Sessions, OAuth, and permission-based RBAC.
- โEmail/password + optional Google OAuth
- โSession handling with server-side guards
- โrequireUser and requirePermission helpers
๐
SEO + PWA, server-first
SEOOG + JSON-LD
Metadata, sitemap, and manifest generated on the server.
- โOpen Graph, Twitter cards, and JSON-LD from site config
- โsitemap.ts and robots.ts metadata routes
- โWeb manifest and canonical URL from site config
๐จ
shadcn/ui component library
UIshadcn + Radix
StylingCVA + Tailwind v4
Copy-paste components with full TypeScript support and accessible Radix primitives.
- โButton, card, sheet, dropdown, input; source in src/components/ui
- โSize, variant, and state props; consistent across every component
- โRadix primitives, Lucide icons, and CSS theme tokens
๐
Parallel routing
Routes@user ยท @admin
One URL per feature; role-specific UI via slots.
- โSame /dashboard path for every role
- โ@user and @admin slots render the right dashboard
- โLayout picks the active slot from permissions
๐
Type-safe i18n
i18n6 locales + RTL
Type-safe next-intl with cookie locale and RTL.
- โNEXT_LOCALE cookie; no /en or /fr URL prefixes
- โTyped messages via global.d.ts and useTranslations
- โSix locales with RTL support for Arabic
๐
Forms + validation
ValidationZod
FormsReact Hook Form
Zod schemas define the rules; React Hook Form handles the UI.
- โDedicated Zod schemas for login, register, and password reset
- โInferred types with z.infer; used in client auth forms
- โzodResolver plus InputError for accessible inline errors
๐ก๏ธ
Type-safe environment
EnvT3 Env
SchemaZod
T3 Env validates every variable with Zod at build time.
- โServer secrets and NEXT_PUBLIC_* client vars in src/libs/env.ts
- โZod validates URLs, booleans, and required auth secrets
- โSKIP_ENV_VALIDATION for CI, Vitest, and lint
๐งช
Developer experience
CInpm run check
HooksLefthook
Quality gates without tool bloat.
- โESLint + Prettier via lint / lint:fix
- โKnip for unused code and dependencies
- โVitest plus Playwright; Check workflow on push and PR
Get started in minutes
Clone the repo, copy the env file, and run the dev server locally. Deploy to Vercel when you are ready.
Install & run
git clone https://github.com/salmanshahriar/Next-Elitecd Next-Elitenpm installcp .env.example .envnpm run dev