refactor: fix biome linting issues and update project documentation

- Fix 36+ biome linting issues reducing errors/warnings from 227 to 191
- Replace explicit 'any' types with proper TypeScript interfaces
- Fix React hooks dependencies and useCallback patterns
- Resolve unused variables and parameter assignment issues
- Improve accessibility with proper label associations
- Add comprehensive API documentation for admin and security features
- Update README.md with accurate PostgreSQL setup and current tech stack
- Create complete documentation for audit logging, CSP monitoring, and batch processing
- Fix outdated project information and missing developer workflows
This commit is contained in:
2025-07-11 21:50:53 +02:00
committed by Kaj Kowalski
parent 3e9e75e854
commit 1eea2cc3e4
121 changed files with 28687 additions and 4895 deletions

View File

@ -1,5 +1,6 @@
// Combined scheduler initialization with graceful shutdown
import { auditLogScheduler } from "./auditLogScheduler";
import { prisma } from "./prisma";
import { startProcessingScheduler } from "./processingScheduler";
import { startCsvImportScheduler } from "./scheduler";
@ -8,6 +9,7 @@ import { startCsvImportScheduler } from "./scheduler";
* Initialize all schedulers
* - CSV import scheduler (runs every 15 minutes)
* - Session processing scheduler (runs every hour)
* - Audit log retention scheduler (runs weekly by default)
*/
export function initializeSchedulers() {
// Start the CSV import scheduler
@ -16,6 +18,14 @@ export function initializeSchedulers() {
// Start the session processing scheduler
startProcessingScheduler();
// Start the audit log retention scheduler
if (process.env.AUDIT_LOG_RETENTION_ENABLED !== "false") {
auditLogScheduler.start();
console.log("Audit log retention scheduler started");
} else {
console.log("Audit log retention scheduler disabled");
}
console.log("All schedulers initialized successfully");
// Set up graceful shutdown for schedulers
@ -30,6 +40,10 @@ function setupGracefulShutdown() {
console.log(`\nReceived ${signal}. Starting graceful shutdown...`);
try {
// Stop the audit log scheduler
auditLogScheduler.stop();
console.log("Audit log scheduler stopped.");
// Disconnect from database
await prisma.$disconnect();
console.log("Database connections closed.");