An industrial audit-log dashboard with gzipped response compression and Prisma connection pooling.
Industrial energy audits generate massive quantities of logs and metrics, which quickly lead to slow dashboard queries, memory exhaustion on files upload, and unbounded server logs.
We optimized Enersave's codebase by implementing:
Sprint 1: Schema design & Prisma setup
Sprint 2: Memory uploads & compression integrations
Sprint 3: Graceful shutdown & log rotation systems
Unrestricted database queries under load spawned unlimited PostgreSQL connections, crashing the app. Fixed by capping Prisma pool at 20-50 and setting up a clean SIGTERM connection teardown process.
Reading product spreadsheet uploads into standard memory buffers caused major memory spikes. Fixed by implementing disk-based multer storage buffers.