Files
web-nuxt/nuxt.config.ts
T
Noel Sabia 33063afbdf
ci / check (push) Successful in 50s
design: give PulseCast a shift-board identity
- replace default Onyx surfaces with paper/ink, signal orange and Archivo
- make /plan answer peak, staff-hours, cost vs flat and coverage above the fold
- add the weekly shift board, shared plan helpers and a pulse line
- rebuild /live as a phone-first dark board and /stage as a full-bleed projector
- label the real 14-20 Nov window; remove 'next week' claims
- keep Onyx components, SSR, live scenario updates and accessible states
2026-11-14 11:03:18 +01:00

63 lines
2.2 KiB
TypeScript

const useMock =
(process.env.NUXT_PUBLIC_USE_MOCK ?? process.env.NUXT_USE_MOCK ?? '').toLowerCase() === 'true' ||
process.env.NUXT_PUBLIC_USE_MOCK === '1' ||
process.env.NUXT_USE_MOCK === '1'
export default defineNuxtConfig({
compatibilityDate: '2026-11-01',
ssr: true,
modules: ['@sit-onyx/nuxt'],
css: ['~/assets/css/main.css'],
devtools: { enabled: false },
runtimeConfig: {
// Server-side Go API. K8s sets NUXT_API_INTERNAL_BASE=http://api:8080.
apiBase:
process.env.NUXT_API_INTERNAL_BASE ??
process.env.NUXT_API_BASE ??
process.env.NUXT_PUBLIC_API_BASE ??
'http://localhost:8080',
apiTimeoutMs: Number(process.env.NUXT_API_TIMEOUT_MS ?? 8000),
// Explicit dev fallback. The default is the real Go API.
useMock,
// Server-only control credentials for POST /api/scenario and /api/train.
controlUser: process.env.CONTROL_USER ?? process.env.NUXT_CONTROL_USER ?? '',
controlPass: process.env.CONTROL_PASS ?? process.env.NUXT_CONTROL_PASS ?? '',
controlToken: process.env.CONTROL_TOKEN ?? process.env.NUXT_CONTROL_TOKEN ?? '',
public: {
// Browser never calls Go directly; this is for display/future SSE wiring.
apiBase: process.env.NUXT_PUBLIC_API_BASE ?? '',
useMock,
demoNow: process.env.NUXT_PUBLIC_DEMO_NOW ?? '2026-11-14T08:12:00Z',
},
},
app: {
head: {
htmlAttrs: { lang: 'en' },
title: 'PulseCast — footfall to shifts',
meta: [
{ name: 'viewport', content: 'width=device-width, initial-scale=1, viewport-fit=cover' },
{
name: 'description',
content:
'PulseCast turns inner-city footfall into a transparent staffing plan for Heilbronn retailers: the peak shift, the week cost, coverage and the assumptions behind them.',
},
{ name: 'theme-color', content: '#f4efe6' },
],
link: [
{ rel: 'icon', type: 'image/svg+xml', href: '/logo.svg' },
{
rel: 'preload',
href: '/fonts/archivo-latin-var.woff2',
as: 'font',
type: 'font/woff2',
crossorigin: 'anonymous',
},
],
},
},
nitro: {
preset: 'node-server',
compressPublicAssets: true,
},
})