Client:Brookbush Institute
Duration:3 months
Brookbush Institute is a provider of online education for human movement professionals. They offer a comprehensive range of courses, videos, and resources designed to enhance the knowledge and skills of physiotherapists, personal trainers, and other movement specialists.
Brookbush Institute's website was struggling with significant performance issues, resulting in poor Core Web Vitals scores - with more than 80% of pages being classified as "Poor". These problems ranged from broken build pipelines to inefficient resource management, leading to:
Problem: SSG was broken due to client-side fetching libraries like useSWR
and conditional auth checks at the root app level.
Solution: I refactored the code to separate client-side fetching and auth logic from the SSG process. This ensured that the build pipeline remained intact, allowing for proper static page generation.
Problem: Full-page load animations using Framer Motion caused significant delays in Largest Contentful Paint (LCP) and First Contentful Paint (FCP) values.
Animation causing LCP delay, image from DebugBear
Solution: I removed or deferred these animations to load after the initial content, dramatically improving LCP and FCP metrics.
Problem: Unoptimized images led to slow load times and poor performance across different devices.
Compressed images using Squoosh
Solution: I implemented a multi-faceted approach:
Problem: Inefficient bundle sizes due to broken tree shaking, unused packages, and heavy dependencies.
Bundle size optimization using NextJS Bundle Analyzer
Solution: I optimized the bundle size through several techniques:
date-fns
) with custom, lightweight implementations where appropriateProblem: ClerkJS authentication library was causing render-blocking issues, delaying the display of static content.
Solution: I refactored the application architecture to:
Problem: Unoptimized video thumbnails affected load times and visual stability.
Solution: I implemented an advanced thumbnail placeholder generation system, ensuring:
Using a systematic approach to web performance optimization, I successfully transformed Brookbush Institute's website from a poor performer to an exemplar of excellent Core Web Vitals. This case study underscores the critical importance of performance optimization in modern web development, demonstrating benefits for user experience, search engine visibility, and overall business success.
By leveraging advanced techniques in React, Next.js, and various web technologies, I was able to overcome complex challenges and deliver a high-performing, user-friendly website that sets new standards in the online education sector.