79 lines
3 KiB
TypeScript
79 lines
3 KiB
TypeScript
export const APP_URL = process.env.APP_URL ?? 'http://host.docker.internal:3001';
|
|
export const DASHBOARD_PATH = '/dashboard';
|
|
|
|
export const AUTH_STATE_PATH = 'auth.json';
|
|
export const OUTPUT_DIR = 'output';
|
|
|
|
const aspect = process.env.ASPECT ?? '16x9';
|
|
export const VIEWPORT =
|
|
aspect === '9x16' ? { width: 1080, height: 1920 } : { width: 1920, height: 1080 };
|
|
export const CAPTURE_SCALE = Math.max(1, Number(process.env.CAPTURE_SCALE ?? 1));
|
|
export const VIDEO_SIZE = {
|
|
width: VIEWPORT.width,
|
|
height: VIEWPORT.height,
|
|
};
|
|
export const WEBM_BITRATE = process.env.WEBM_BITRATE ?? (CAPTURE_SCALE > 1 ? '18M' : '8M');
|
|
|
|
// Cold-open prompt. Punchy version of the user's intent, short enough to type
|
|
// on camera without making the opening scene drag.
|
|
export const PROMPT_TEXT =
|
|
process.env.PROMPT_TEXT ?? 'Flats or terraces <£450k, 35 min to Manchester, low crime';
|
|
|
|
// Filters returned by the AI stub. Keys MUST match real feature names from
|
|
// /api/features (verified against the running server's schema).
|
|
export const STUBBED_FILTERS: Record<string, [number, number] | string[]> = {
|
|
'Property type': ['Flats/Maisonettes', 'Terraced'],
|
|
'Estimated current price': [175000, 450000],
|
|
'Serious crime per 1k residents (avg/yr)': [0, 55],
|
|
'Noise (dB)': [50, 68],
|
|
};
|
|
|
|
// Travel-time filters returned by the AI stub. Slug matches the real
|
|
// /api/travel-destinations?mode=transit response.
|
|
export const STUBBED_TRAVEL_TIME_FILTERS: {
|
|
mode: 'transit' | 'car' | 'bicycle' | 'walking';
|
|
slug: string;
|
|
label: string;
|
|
min?: number;
|
|
max?: number;
|
|
}[] = [
|
|
{
|
|
mode: 'transit',
|
|
slug: 'manchester',
|
|
label: 'Manchester city centre',
|
|
max: 35,
|
|
},
|
|
];
|
|
|
|
// The travel-time card we'll drag manually after AI applies. The Filters
|
|
// component renders each travel-time entry with `data-filter-name="tt_${i}"`,
|
|
// and our stub only sets one entry, so it's tt_0.
|
|
export const TT_CARD_SELECTOR = '[data-filter-name="tt_0"]';
|
|
export const TT_SLIDER_MAX = 120;
|
|
export const TT_DRAG_FROM_MIN = 35; // matches AI stub max above
|
|
export const TT_DRAG_TO_MIN = 20;
|
|
|
|
// Cold-open zoom: how aggressively to magnify the AI box.
|
|
// 2.4 fills most of the viewport with the prompt card without blowing up text.
|
|
export const AI_ZOOM_SCALE = Number(process.env.AI_ZOOM_SCALE ?? 2.4);
|
|
|
|
// Initial map view used while we navigate. The AI scene zooms in on the
|
|
// sidebar so this only matters once we zoom out.
|
|
export const INITIAL_MAP_VIEW = {
|
|
lat: 53.4795,
|
|
lon: -2.2451,
|
|
zoom: 11.5,
|
|
};
|
|
|
|
// Verification guard only. The renderer does not use this as an editing cap:
|
|
// if the storyboard needs more than 15 seconds to avoid jumps, keep the frames.
|
|
export const MAX_DURATION_S = Number(process.env.MAX_DURATION_S ?? 45);
|
|
export const MIN_DURATION_S = Number(process.env.MIN_DURATION_S ?? 10);
|
|
|
|
// Target fps of the FINAL output.
|
|
export const OUTPUT_FPS = Number(process.env.OUTPUT_FPS ?? 50);
|
|
|
|
// Brand strings for the outro card.
|
|
export const BRAND_NAME = 'Perfect Postcode';
|
|
export const BRAND_TAGLINE = 'Find where you actually want to live.';
|
|
export const BRAND_URL = 'https://perfect-postcode.co.uk';
|