Skip to main content
Techdome
All Insights/Engineering Practice

Making a Next.js site fast: the fixes that moved Core Web Vitals on techdome.io

Hero images that wait for JavaScript, an embedded scheduler that blocked the page, oversized images and bloated page data: the real fixes behind our site's performance work, and a checklist for yours.

Rahul Joshi
Rahul JoshiChief Executive Officer
September 20266 min read
Verified Architecture
Interface illustration of a browser window with three gauge dials, a heavy block swapped for a light placeholder, and images compressed

This website, techdome.io, is built with Next.js and React. Over several rounds of work we have improved how fast it loads and responds, and the fixes were rarely clever. Most were one slow thing, found and removed.

This post lists what we changed and why each change helps, then gives a checklist you can run against your own app. The measures behind it are the Core Web Vitals: Largest Contentful Paint (LCP), Interaction to Next Paint (INP) and Cumulative Layout Shift (CLS). Total Blocking Time (TBT) is the lab measure that stands in for responsiveness when you test with a tool like Lighthouse.

What we changed on techdome.io

1. The hero no longer waits for JavaScript

An animated hero that starts invisible and fades in after the page's JavaScript loads delays the largest element on the screen, which is exactly what LCP measures. We changed the hero and the shared animation components so the server-rendered markup is visible from the first paint, and removed a hero opacity delay. The animation still runs; it just no longer gates what the visitor sees.

2. An embedded scheduler was blocking the page

Our contact page embeds a third-party scheduler. The fix for it records about 7.2 seconds of blocking time. We replaced the embed's first paint with a lightweight placeholder that shows immediately while the real embed loads behind it, so the page is usable first and the heavy script arrives afterwards.

3. Analytics moved out of the way

Analytics scripts are useful and not urgent. We deferred them, so they load after the page is interactive and compete less with what the visitor came for. They also stay off until the visitor gives consent.

4. Images were the biggest bytes

We resized images to at most 2,000 pixels wide and recompressed them, keeping JPEGs as JPEGs and PNGs as PNGs, which took the images folder from about 24 MB to about 10 MB. On one page, an image was being requested at 3,840 pixels wide, so we capped its sizes at 1,280 pixels.

5. The home page was carrying data it did not show

A Next.js page sends the data its components use to the browser. Our home page was passing full records to sections that only render small cards. Passing card-sized data instead cut the embedded page data from 447 KB to 324 KB, and the HTML from 958 KB to 834 KB.

6. Animations on the compositor

Animating transform and opacity lets the browser move a finished layer on the GPU, while animating layout properties makes it recalculate the page on every frame. We rebuilt effects around transform and opacity, and respect the visitor's reduced-motion setting.

A checklist for your Next.js app

  • Find your LCP element and make sure it is in the first HTML, not created by client JavaScript.
  • Use the framework's image component with a correct sizes value, and compress the source files.
  • Load fonts through the framework's font loader so text shows without a layout jump.
  • Load third-party scripts with the framework's script strategy, and show a placeholder while heavy embeds load.
  • Keep client components for what is interactive, and leave static content in server components.
  • Pass components only the fields they render.
  • Animate transform and opacity, not width, height or position.
  • Measure on a mid-range phone with throttling, and watch real-user data, not only lab scores.

Monorepos

The same rules apply in a monorepo, with one addition: keep shared packages light. A heavy dependency in a package that every app imports lands in every bundle, so one team's convenience becomes everyone's slow page.

How this looks at Techdome

Performance is part of how we build, not a final polish. In the Blueprint, Week 7 is reserved for security review, an accessibility audit and load testing before launch. Our offline-first clinic application is a Next.js progressive web app, described in the case study. Our web development topic page collects the rest.

Takeaways

  • Make the largest element visible in the first server-rendered HTML.
  • Show a lightweight placeholder while heavy third-party embeds load, and defer analytics.
  • Compress images at the source and give the image component honest sizes.
  • Send the browser only the data it renders, and animate transform and opacity.
  • Measure real-user data on real devices, and fix the biggest thing first.

Have a project like this? Talk to our engineers.

FAQ

Questions readers ask

What are the Core Web Vitals?

Three measures of real user experience: Largest Contentful Paint for loading, Interaction to Next Paint for responsiveness, and Cumulative Layout Shift for visual stability.

What is Total Blocking Time?

A lab measure of how long the main thread is blocked while the page loads, which tends to track how responsive the page feels. It is useful when testing, but real-user INP is the metric Google reports.

Why does an animated hero hurt LCP?

If the hero is hidden until JavaScript runs, the browser cannot paint the largest element until then. Keeping the server-rendered content visible and animating on top of it avoids the delay.

How do I stop a third-party embed from slowing my page?

Show a lightweight placeholder straight away, and load the real script behind it, after the page is usable. Check how much blocking time the embed adds before and after.

Do server components make a site faster?

They can, because static content stays on the server and sends no JavaScript for it. Use client components for what is interactive, and measure the difference.

Does a monorepo hurt performance?

Not by itself. The risk is shared packages with heavy dependencies that every app imports, so keep shared code light and check your bundles.

Can Techdome audit and speed up our Next.js app?

Yes. Our web development practice builds and tunes React and Next.js applications.

Continue reading

More foundry teardowns

View all
+
+
+
+
Healthcare AIOct 28, 2026·3 min read

How to build a GLP-1 telehealth platform

A builder's guide to a GLP-1 telehealth platform: compliance, multi-tenant clinics, eligibility checks, licensing by jurisdiction, chart review, pharmacy routing, cold chain and billing.

Techdome Engineering
Techdome EngineeringEngineering Team
+
+
+
+
Healthcare AIOct 28, 2026·2 min read

Asynchronous vs synchronous telehealth: which to build first

Asynchronous telehealth means a clinician reviews a prepared case; synchronous means a live visit. How they differ, what each changes in the build, and why most platforms end up with both.

Techdome Engineering
Techdome EngineeringEngineering Team
+
+
+
+
Healthcare AIOct 28, 2026·4 min read

Telehealth compliance checklist for the US and UK

An engineering checklist for a telehealth platform serving US and UK patients: contracts, access and audit, clinic isolation, licensing by jurisdiction, prescribing, signatures, payments and incidents.

Techdome Engineering
Techdome EngineeringEngineering Team
+
+
+
+
Healthcare AIOct 28, 2026·2 min read

Telehealth metrics and KPIs: the numbers that matter

The 15 telehealth metrics an operator should track, from intake completion to time to physician decision and cold-chain excursions, with real figures from a US and UK GLP-1 platform.

Techdome Engineering
Techdome EngineeringEngineering Team
A technical illustration comparing queued task delivery with retained event streaming.
System DesignOct 26, 2026·3 min read

Message queues vs event streams: SQS, RabbitMQ, Kafka

Use SQS or RabbitMQ for work distribution; use Kafka when you need retained event logs, replay, fan-out, and per-key ordering.

Techdome Engineering
Techdome EngineeringEngineering Team
Illustration of webhook retry flow using a stable idempotency key, de-duplication store, and dead-letter queue.
System DesignOct 26, 2026·3 min read

Webhook retries and idempotency keys, together

Webhook retries need stable idempotency keys so repeated deliveries are safe, deduplicated, observable, and recoverable through DLQs.

Techdome Engineering
Techdome EngineeringEngineering Team
Blueprint-style illustration of a server rack behind a layered firewall shield, with a PHP version badge being upgraded
Engineering PracticeOct 22, 2026·6 min read

PHP2Shell: how to check and protect your PHP site

PHP2Shell (CVE-2026-109618 and CVE-2026-109619): how to check your PHP version, patch it or shield it with a WAF, with two real cases.

Techdome Engineering
Techdome EngineeringEngineering Team
Computer screen filled with code
Engineering Practice8 min read

API testing explained: types, what to automate, and tools

API testing checks an interface directly, below the UI. Learn the five main types, how mocking and test data fit in, and which tests to automate first.

Techdome Engineering
Techdome EngineeringEngineering Team
Computer screen with data
n8n Automation7 min read

"Automating mortgage back-office work with n8n"

Mortgage back offices drown in documents. A staged n8n workflow can handle intake, classification, extraction and validation, and route exceptions to people with a full audit trail.

Techdome Engineering
Techdome EngineeringEngineering Team
3D illustration of an AI agent connected to calendar, database and phone tools, with a sound wave and a small knowledge graph
Studio ArchitectureSeptember 2026·7 min read

Building AI agents that hold up in production: what we learned from voice, interviews and GraphRAG

Narrow jobs, grounded answers, deterministic scoring, a latency budget, full logs and a human handoff: the patterns behind our voice agents, AI interviewer and GraphRAG platform.

Rahul Joshi
Rahul JoshiChief Executive Officer
Pipeline illustration of an automation workflow with a queue feeding two workers, a retry loop, an alert bell and a review tray
n8n AutomationAugust 2026·7 min read

Production n8n: the patterns that keep automation from failing quietly

Idempotent triggers, retries with limits, failure alerts, human review and workflows kept in Git: the patterns we use to run n8n automation in production, with the builds they come from.

Rahul Joshi
Rahul JoshiChief Executive Officer
Isometric illustration of one platform split into separate clinic compartments, with a shield, an access gate and an audit log
Healthcare AIAugust 2026·8 min read

Engineering HIPAA-ready telehealth platforms: the decisions we make first

How tenant isolation, access control, audit logging, identity and vendor agreements shape a HIPAA-ready telehealth system, with what each looked like on three clinical platforms we built.

Rahul Joshi
Rahul JoshiChief Executive Officer
Blueprint-style illustration of five phases from a drawing board to a launched product, rising along a path
Studio ArchitectureAugust 2026·7 min read

The Techdome Blueprint: how we take a product from a blank repo to production in eight weeks

The five steps of our Blueprint, what each one delivers, how fixed-scope sprints and engineering pods are priced, and how recent builds ran from kickoff to production.

Rahul Joshi
Rahul JoshiChief Executive Officer