- Mobile responsive CSS (touch targets 44px, iOS anti-zoom, reduced motion) - Vitest setup s 39 testy (formatters, attendanceHelpers, useTableSort) - Klavesove zkratky (Shift+? napoveda, Ctrl+S ulozit, navigace) - Drag & drop pro polozky nabidek (@dnd-kit, SortableRow, useSortableList) - Univerzalizace: odstraneni BOHA brandingu z UI, emailu, PDF - Smazany nepotrebne soubory (deploy.sh, AUTH_SYSTEM.md, example_design, .htaccess) - CORS konfigurovatelny pres env promennou Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
39 lines
1.1 KiB
PHP
39 lines
1.1 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Aplikacni konstanty
|
|
*
|
|
* Definuje konstanty pouzivane v celé API.
|
|
* Vyzaduje, aby byl pred includovanim tohoto souboru nacten helpers.php a .env.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
// Environment
|
|
define('APP_ENV', env('APP_ENV', 'production'));
|
|
define('DEBUG_MODE', APP_ENV === 'local');
|
|
|
|
// Database configuration
|
|
define('DB_HOST', env('DB_HOST', 'localhost'));
|
|
define('DB_NAME', env('DB_NAME', ''));
|
|
define('DB_USER', env('DB_USER', ''));
|
|
define('DB_PASS', env('DB_PASS', ''));
|
|
define('DB_CHARSET', 'utf8mb4');
|
|
|
|
// Security configuration
|
|
define('MAX_LOGIN_ATTEMPTS', 5);
|
|
define('LOCKOUT_MINUTES', 15);
|
|
define('BCRYPT_COST', 12);
|
|
|
|
// CORS - konfigurovatelne pres env (comma-separated), fallback na hardcoded hodnoty
|
|
define('CORS_ALLOWED_ORIGINS', env('CORS_ALLOWED_ORIGINS', '')
|
|
? array_map('trim', explode(',', (string) env('CORS_ALLOWED_ORIGINS', '')))
|
|
: ['http://www.boha-automation.cz', 'https://www.boha-automation.cz']);
|
|
|
|
// Paths
|
|
define('API_ROOT', dirname(__DIR__));
|
|
define('INCLUDES_PATH', API_ROOT . '/includes');
|
|
|
|
// Rate limiting
|
|
define('RATE_LIMIT_STORAGE_PATH', dirname(__DIR__) . '/rate_limits');
|