Files
CLProject/public/js/constants.js
T
2026-04-19 21:14:16 +02:00

31 lines
1.1 KiB
JavaScript

/*
* Application-wide constants shared by all frontend modules.
*
* Centralizing these values prevents magic strings and numbers from being
* scattered across the codebase and makes configuration changes easy to trace.
*/
/* IndexedDB database name and schema version (bump when stores change). */
export const DB_NAME = 'check-list-poc-db';
export const DB_VERSION = 2;
/* IndexedDB object store names. */
export const STORE_TEMPLATES = 'templates';
export const STORE_LOOKUPS = 'lookups';
export const STORE_CONFIG = 'config';
export const STORE_REPORTS = 'reports';
export const STORE_ATTACHMENTS = 'attachments';
export const STORE_SETTINGS = 'settings';
/* Autosave interval used when the server does not supply a value. */
export const DEFAULT_AUTOSAVE_SECONDS = 20;
/* Base path for all versioned API calls. */
export const API_BASE = '/api/v1';
/* Minimum delay before re-rendering the form after a field change. */
export const RENDER_DEBOUNCE_MS = 200;
/* Maximum entries kept in the Service Worker dynamic cache (LRU eviction). */
export const SW_DYNAMIC_CACHE_LIMIT = 50;