Led the migration of a legacy corporate website CMS and event administration system to a modern Next.js + PostgreSQL architecture, implementing secure RBAC authentication, Drizzle ORM schemas, and relational transactional server actions.
KiwiTech's legacy admin portal—responsible for managing public content, events, careers, startups, and speaker galleries—was built on a monolithic legacy architecture with slow query performance and outdated session security. Database schemas lacked normalization, leading to orphan data rows and database integrity issues. The team needed a high-performance, type-safe administration portal capable of managing large-scale events, startups, and users securely.
My task was to design the normalized PostgreSQL schema, migrate 19+ distinct admin data modules to Drizzle ORM, integrate NextAuth v5 credentials-based authentication with role-based routing middleware, and construct a dynamic unified dashboard with real-time aggregated database statistics.
Architected a normalized PostgreSQL database schema containing 22+ tables and configured Drizzle ORM. Programmed edge-compatible route guarding middleware using NextAuth v5, separating public pages from administrative panels. Coded safe CRUD Server Actions with automatic slug generation, duplicate key collision handlers, and transactional database integrity checks (such as cascade protection on parent categories). Implemented User Management featuring bcryptjs password hashing and superadmin lockout restrictions preventing system lockouts. Constructed the Command Center dashboard calculating real-time metrics (Active Events, Startups, Admins, Careers) using highly optimized SQL count queries.
Delivered a robust, fully typed (0 TypeScript errors) enterprise-grade dashboard, replacing the slow legacy system. SQL query execution speeds for complex nested tables dropped by over 40% due to optimized database joins, and administrative content publishing operations were accelerated by 50% using inline editing modals and tabbed workspace interfaces.