Skip to main content

Web Dashboard Overview

The Ever Works web dashboard is a Next.js 16 application that serves as the primary user interface for managing works, plugins, and account settings. It uses the App Router with React 19, Tailwind CSS 4, and next-intl for internationalization.

Application Structure

The dashboard source lives in apps/web/src/ with the following top-level layout:

apps/web/src/
app/ # Next.js App Router pages
components/ # React components organized by feature area
i18n/ # Internationalization configuration (next-intl)
lib/ # API utilities, hooks, constants, auth helpers
proxy.ts # Middleware: locale detection, auth gating, routing
global.ts # Global type augmentations

Page Routes

Pages are located under app/[locale]/ and are organized into two route groups:

Authentication Pages ((auth))

RoutePurpose
/loginUser login
/registerUser registration
/forgot-passwordPassword reset request
/reset-passwordPassword reset form
/auth/errorAuthentication error display

Dashboard Pages ((dashboard))

RoutePurpose
/Home dashboard with stats overview
/worksList of user works
/works/newCreate a new work (manual or AI)
/works/[id]Work overview
/works/[id]/itemsBrowse and manage items
/works/[id]/generatorRun AI generation
/works/[id]/scheduleConfigure automated schedules
/works/[id]/deployDeploy the work website
/works/[id]/membersManage team members
/works/[id]/settingsWork settings
/works/[id]/pluginsPer-work plugin configuration
/works/[id]/comparisonsItem comparison pages
/works/[id]/historyGeneration run history
/pluginsGlobal plugin marketplace
/plugins/[pluginId]Plugin detail and configuration
/settingsProfile settings
/settings/securitySecurity and password
/settings/dangerDanger zone (account deletion)
/settings/plugins/[category]Plugin settings by category

Middleware and Proxy

The file proxy.ts (exported as the default middleware) handles three responsibilities:

  1. Locale detection -- delegates to next-intl/middleware for locale prefix routing.
  2. Public route allowlisting -- authentication pages and static assets pass through without auth checks.
  3. Authentication gating -- all dashboard routes check for a valid auth cookie. Unauthenticated users are redirected to /login with a redirect_uri search parameter.

The middleware matcher excludes API routes, static files, and Next.js internals:

matcher: '/((?!api|trpc|_next|_vercel|.*\\..*).*)'

Connecting to the API

The dashboard communicates with the NestJS backend via server-side API calls. The API URL is resolved from the API_URL environment variable (defaults to http://localhost:3100) and automatically appends /api if not already present.

API client utilities live in lib/api/ and use cookies-based authentication. The auth cookie is encrypted using COOKIE_SECRET and carries the JWT token issued by the backend.

Internationalization

The dashboard supports 21 locales out of the box: English, Arabic, Bulgarian, German, Spanish, French, Hebrew, Hindi, Indonesian, Italian, Japanese, Korean, Dutch, Polish, Portuguese, Russian, Thai, Turkish, Ukrainian, Vietnamese, and Chinese.

Locale routing is configured in i18n/routing.ts using next-intl's defineRouting helper. The default locale is controlled by NEXT_PUBLIC_DEFAULT_LOCALE (defaults to en). Translation files are stored in the messages/ work.

Key Technologies

TechnologyPurpose
Next.js 16Framework (App Router, React Server Components)
React 19UI library
Tailwind CSS 4Utility-first styling
next-intlInternationalization and locale routing
path-to-regexpRoute matching in middleware
shadcn/uiBase component primitives

Development

Start the web dashboard in development mode:

pnpm dev:web # Runs on http://localhost:3000

The dashboard expects the API to be running on port 3100. Start both simultaneously with:

pnpm dev # Starts all apps in parallel

Build Output

The Next.js build output mode is configurable via NEXT_BUILD_OUTPUT:

  • Default -- standard Next.js output with server-side rendering
  • standalone -- self-contained Node.js server for Docker deployments
  • export -- static HTML export (no SSR)