The Challenge
The primary engineering hurdle was managing complex real-time states and ensuring data integrity across three distinct user roles (Admin, Teacher, Student). Synchronizing video progress with a fluctuating backend state while maintaining a lag-free experience was critical. We also faced challenges in handling concurrent quiz submissions and ensuring that Stripe webhook events were processed atomically to prevent duplicate enrollments or missed access grants.
My Solution
To deliver a premium user experience, I architected the system using React 18 and Vite for the frontend, utilizing Tailwind CSS and Shadcn UI for a polished, modern aesthetic with smooth micro-animations.
I leveraged TanStack Query for efficient server-state management and caching, which significantly reduced unnecessary API calls. For global state, Redux Toolkit provided a predictable flow for authentication and checkout processes. On the backend, I built a robust Node.js/Express API with MongoDB, implementing role-based access control (RBAC) for security. Socket.io was utilized for the real-time notification engine, while Cloudinary handled petabytes of media assets with adaptive bitrate streaming potentia