Skip to content
Smart Lead Tech
Home
Services
Our work
Saudi Arabia
About us
Blog
Contact us
🇸🇦العربيةContact now
Smart Lead Tech

Smart software solutions

Follow us

Company

  • About us
  • Our work
  • Our services
  • Saudi Arabia
  • Restaurant POS
  • Contact us
  • Book a call

Quick links

  • Blogs
  • Pricing
  • Refund policy
  • Privacy policy
  • Terms and conditions
  • Data deletion

Contact us

  • Egypt — Head Office

    Office 6, Bldg 23, Makkah Al-Mukarramah St., Omraneya, Giza 3540203, Egypt
  • Saudi Arabia — Branch

    Bldg 2646, Secondary 123, Street 7697, Ishbiliyah Dist., Jubail 35416, Kingdom of Saudi Arabia
  • Email address

    help@smartleadtech.com
  • Phone number 🇪🇬

    +20 102 201 4671
  • Phone number 🇸🇦

    +966 53 044 7112

© 2026 Smart Lead Tech. All rights reserved.

  • Smart Lead Tech Information Technology LLC·Commercial Register ⁦61239⁩·Tax ID ⁦774-391-316⁩

  • Smart Lead Tech Software Establishment·CR ⁦7054902585⁩·VAT

Real-world lessons from Next.js App Router in production

In the past year we migrated 11 projects from Pages Router to App Router. This is not marketing — it is a short list of decisions we now make on autopilot, and mistakes we still pay for.1. Choose early: static / dynamic …

01/22/2025 — 11 min read

Next.js App Router architecture

In the past year we migrated 11 projects from Pages Router to App Router. This is not marketing — it is a short list of decisions we now make on autopilot, and mistakes we still pay for.

1. Choose early: static / dynamic / ISR

Every route needs a conscious choice. Never leave revalidate unset. Our defaults:

  • Static marketing pages: export const revalidate = false.
  • Periodic content (blog/projects): revalidate = 300 with tags.
  • Personalised pages: dynamic = "force-dynamic" in a server component.

2. Do not mix Server / Client components

Our rule: every page.tsx is a server component. Anything that needs local state, framer-motion, or event handlers lives in a separate component with "use client".

Outcome on the latest landing we shipped: –28% JS bundle size.

3. Cache tags matter more than you think

Use next: { tags: ["projects"] } on your fetches, then have the BE (Laravel) fire a webhook to /api/revalidate with the tag list. Result: a local cache that sticks until the content changes, then flushes surgically.

4. Streaming + Suspense

Serve a skeleton instantly and stream slow parts. Users get better LCP and bounce rate drops.

5. Traps we hit

  • Forgetting Accept-Language on server-side fetches: the API returns the wrong locale.
  • Using searchParams on a static page → build error.
  • Middleware redirects that drop pathname: you lose the RTL/dir hint for root layout.

Takeaway

App Router is not just an upgrade — it is a mindset shift. Answer "where does request state live?" and "how will the cache be invalidated?" up-front and you will reap real speed + resilience wins.

Share

Projects related to this article

  • CybersecurityNext.js

    CyberBattleGround — Capture-The-Flag Platform

    A full Capture-The-Flag arena for training cybersecurity teams and stress-testing vulnerability-discovery skills inside an isolated virtual environment.

    Show more
    CyberBattleGround security platform — live leaderboard
  • CybersecurityLaravel

    Splunk Log Viewer — Defensive Log Management & Analysis

    A defensive web app that integrates Laravel with Splunk for log ingestion, advanced search, and audit-ready storage of investigation results.

    Show more
    Splunk Log Viewer dashboard — security log analysis
  • CybersecurityLaravel

    Security Guard Scanner — Automated Web Vulnerability Scanner

    An end-to-end web vulnerability scanner that detects XSS, SQLi, CSRF and server-side weaknesses automatically — with downloadable, audit-ready reports.

    Show more
    Security Guard Scanner — automated vulnerability report

Related Blogs

  • Diagram of server and client components in Next.js with the render path

    Next.js 16 and React 19 in production: 7 things that actually changed how we build sites

    We rebuilt the Smart Lead Tech website itself, the Pioneers editorial platform, and the KSA Leaders platform on Next.js 16 and React 19. This is not a “what’s new” article; it is a list of what actually changed our decis…

    03/24/2026 — 8 min read

  • Three devices — a cashier terminal, a kitchen display and a customer phone — running one Flutter codebase

    One codebase from the cashier to a salon marketplace: 10 lessons from two years of Flutter

    The TtaKkaa ecosystem alone is four apps: cashier, kitchen display, customer app and store dashboard. Add Beauty Map and Home Beauty for beauty services, and Meshareeb for beverage delivery in Kuwait. All Flutter. Here a…

    02/24/2026 — 8 min read

  • Two screens: the Cursor editor on the left, a Claude Code terminal on the right

    Cursor or Claude Code? Not a contest — two tools for two different minds

    Clients and new engineers ask us the same question: “which one is better?”. The honest answer after a year of using both daily on projects like Umbrella and the TtaKkaa POS suite: the question is wrong. The two tools do …

    08/20/2026 — 7 min read