Skip to main content

Dashboard Configuration

The web dashboard is configured through environment variables, the Next.js config file, and site-level constants. This page covers all configurable aspects of the dashboard.

Environment Variables

Copy .env.example to .env.local and adjust values for your deployment. Variables prefixed with NEXT_PUBLIC_ are exposed to the browser; all others are server-side only.

Application Settings

VariableDefaultDescription
APP_NAMEEver WorksApplication name (fallback for site name)
NEXT_PUBLIC_APP_NAMEEver WorksPublic-facing app name
NEXT_PUBLIC_WEB_URLhttp://localhost:3000Web application URL
API_URLhttp://localhost:3100Backend API URL (/api auto-appended)

Site Configuration (Multi-tenant)

These variables support multi-tenant deployments where each instance can have its own branding:

VariableDefaultDescription
NEXT_PUBLIC_SITE_NAMEUses APP_NAMESite name
NEXT_PUBLIC_SITE_TITLEUses APP_NAMESEO title
NEXT_PUBLIC_SITE_DESCRIPTIONBuild Works with AIMeta description
NEXT_PUBLIC_SITE_KEYWORDSEver Works,Works,...Comma-separated SEO keywords
NEXT_PUBLIC_SITE_AUTHORUses APP_NAMEAuthor meta tag
NEXT_PUBLIC_SITE_IMAGE/logo-light.pngOpen Graph image path

Logo and Favicon

VariableDefaultDescription
NEXT_PUBLIC_LOGO_LIGHT/logo-light.pngLogo for light mode
NEXT_PUBLIC_LOGO_DARK/logo-ever-work.pngLogo for dark mode
NEXT_PUBLIC_FAVICON_LIGHT/favicon-light.pngFavicon for light mode
NEXT_PUBLIC_FAVICON_DARK/favicon-dark.pngFavicon for dark mode

Social Media / Twitter Cards

VariableDefaultDescription
NEXT_PUBLIC_TWITTER_CARDsummary_large_imageTwitter card type
NEXT_PUBLIC_TWITTER_TITLEUses APP_NAMETwitter card title
NEXT_PUBLIC_TWITTER_DESCRIPTIONUses site descriptionTwitter card description

Internationalization

VariableDefaultDescription
NEXT_PUBLIC_LOCALESen,ar,de,es,fr,zhSupported locales (comma-separated)
NEXT_PUBLIC_DEFAULT_LOCALEenDefault locale

The dashboard has built-in support for 21 locales: en, ar, bg, de, es, fr, he, hi, id, it, ja, ko, nl, pl, pt, ru, th, tr, uk, vi, zh.

Application Behavior

VariableDefaultDescription
NEXT_PUBLIC_WORK_LIST_LIMIT6Works per page (pagination)
REDIRECT_SEARCH_PARAMredirect_uriURL param for post-login redirect
ALLOWED_REDIRECT_URLSlocalhost,127.0.0.1Allowed redirect hosts (comma-separated)

Authentication

VariableDefaultDescription
COOKIE_SECRET(none, required)Secret for encrypting auth cookies
AUTH_SECRET(none, alternative)Alternative name for the cookie secret

Generate a strong secret for production:

openssl rand -base64 32

Build Configuration

VariableDefaultDescription
NEXT_BUILD_OUTPUT(empty)Build output mode: standalone or export

Next.js Configuration

The next.config.ts file configures Next.js with the following:

Internationalization Plugin

The config wraps the Next.js config with next-intl/plugin to enable locale-aware routing:

import createNextIntlPlugin from 'next-intl/plugin';
const withNextIntl = createNextIntlPlugin();
export default withNextIntl(nextConfig);

Image Remote Patterns

The following external image domains are whitelisted:

  • github.com -- GitHub repository avatars
  • lh3.googleusercontent.com -- Google profile images
  • avatars.githubusercontent.com -- GitHub user avatars

Build Output

The output property is dynamically set from NEXT_BUILD_OUTPUT. When set to standalone, Next.js produces a self-contained deployment work suitable for Docker containers.

Site Configuration Object

The getSiteConfig() function in lib/constants.ts merges environment variables with optional work-level .works/works.yml overrides. This supports multi-tenant scenarios where a deployed work site can override the base branding:

const config = getSiteConfig(workConfig);
// config.name, config.logo, config.favicon, config.title, etc.

The precedence order is:

  1. Work .works/works.yml values (if present)
  2. NEXT_PUBLIC_* environment variables
  3. Hardcoded defaults

Route Constants

All dashboard routes are defined as constants in lib/constants.ts:

export const ROUTES = {
DASHBOARD: '/',
DASHBOARD_WORKS: '/works',
DASHBOARD_WORK: (id: string) => `/works/${id}`
// ... all other routes
};

This ensures route strings are never duplicated across the codebase.

Public Routes

Routes that do not require authentication are defined in PUBLIC_ROUTES:

  • All auth pages (login, register, forgot-password, reset-password)
  • Static pages (/about, /contact, /privacy, /terms, /help)

All other routes require a valid auth cookie.