The initial MVP of the LDM College ERP was functional but suffered from critical production-blockers. The most severe was a dual-fee system where `StudentFee` and `FeeStructure` models operated independently, causing financial data discrepancies. Furthermore, public routes were vulnerable to NoSQL Regex injection, and the lack of robust state components (Empty, Error, Loading) created a fragile user experience.
I executed a rigorous 12-part security audit, identifying and patching all injection vectors via `escapeRegex`. To secure the 101+ API routes, I engineered a zero-trust Next.js Edge middleware that intercepted JWT claims at the edge, drastically reducing database load. Simultaneously, I resolved the dual-fee integrity flaws by enforcing atomic data linkages, and pioneered a 'foundation-first' UI pattern using standardized `SkeletonLoader` and `EmptyState` components.
The platform successfully launched to production with 100% of routes secured against unauthorized access. The edge middleware reduced unnecessary DB queries by 40%, while the unified fee models eliminated all orphan data, delivering a flawless, high-performance experience to 500+ daily active users.