Charles Krook

Senior Software Engineer

charles.krook@gmail.com · charleskrook.com · linkedin.com/in/charleskrook · github.com/ckrook · instagram.com/charleskrook

Work

Fullstack engineer at Umain. My work spans e-commerce platforms, design systems, and content-driven sites, where the engineering exists to serve the design.

Place

Stockholm, Sweden. Grew up just outside it, spent a few years moving between cities, and came back in 2019.

Off-hours

Outdoors whenever I can. Mostly on the road bike and swiming.

Experience

Fullstack developer, Umain

2023 - Now

Umain is a digital consulting firm who works with a range of brands, everything from mcDonalds, Scania and biamp. Umain offers both web and digital services

Clients: Scania, Poc Sports

Frontend developer, Grebban

2023 - 2023

Grebban is a retail e-commerce firm who create extraordinary e-commerce experiences and digital flagship stores for brands globally.

Clients: Grandpa, Byon, Norstedts, Hestra Gloves

Frontend Developer, Sopra Steria

2022 - 2023

I worked at Sopra Steria, a big tech and consulting company helping businesses with digital solutions and transformation.

Clients: Radiohjälpen

Frontend developer, Freelance work

2016 - 2019

Freelance developer during a longer period of my life. developing sites for clients and businesses.

Selected work

Poc sports · Software Engineer

2023-2024

Led frontend for a new e-commerce platform, from architecture to UI for a fast, modern customer experience.

Centra, Tailwind, Nextjs, Sanity, Klaviyo, Adyen, Gladly, Playwright

Tegel Design System · Codeowner (consultant)

Oct 2024 – 2026

Scania's multibrand design system, powering Scania products across the organization suporting mulit frameworks.

Stenciljs, npm, aws

Scania Experience Center · Senior Software Engineer

2025-2026

An interactive museum platform with 3D installations synced across touchscreens and wall displays in real time.

Technologies

Nextjs, Stenciljs, Tailwind, React, Centra, Sanity, Hygraph, Gladly, Klaviyo, Adyen, Playwright, npm, aws

Charles Krook
Charles Krook
Fullstack engineer
  1. Home
  2. About
  3. Projects
  4. Contact
Charles Krook

Charles KrookFullstack engineer

Poc sports

2023-2024·Visit site

Led frontend for a new e-commerce platform, from architecture to UI for a fast, modern customer experience.

POC Design Frame 15459.png

Built the e-commerce frontend for POC Sports, a Swedish performance sports brand, from first commit to production. Headless architecture serving static pages across four global markets.

1,609 commits · 25 locale × currency combinations · 4 markets

Statically serving e-commerce across four markets

Most e-commerce sites are fully dynamic. POC Sports needed 25 locale and currency combinations with fast page loads on every continent, while keeping cart, checkout, and pricing dynamic per session.

What I built

  • Custom Centra API client with dual modes: token-less STATIC for build-time and sitemaps, session-based DYNAMIC for user-facing pages. Curried methods (method(config)(params)) made market config reusable everywhere.

  • Multi-market static generation: pages pre-rendered per locale with force-static and 6-hour ISR. One build covers all 25 combinations.

  • Edge middleware that creates a Centra session on first visit, detects market, language, and currency via IP geolocation, and sets the session cookie. It is the boundary between the static and dynamic layers.

  • Content layer: Sanity CMS with live preview and portable text, integrated into Server Components.

How it's built

Request → Edge Middleware (session + locale detection)
       → Static page from CDN (force-static, ISR)
       → Sanity CDN for content | Centra DYNAMIC for products
       → Zustand (UI state) + React Query (server state)

Product pages fetch fresh on every request: pricing and stock must be real-time. A Result<T, E> type with ts-pattern enforces exhaustive error handling at every API boundary.

Decisions

  • ISR over full SSR: CDN-speed pages at the cost of 6-hour staleness. For a catalog that changes weekly, that is fine. QA uses revalidate: 0 so merchandisers see changes instantly.

  • One dual-mode client over two separate clients: the CheckoutApiHeader service detects context and sets the right auth headers. Consumers do not need to know which mode they are in.

Hard part: caching without serving stale prices

Static pages are fast, but a cached page showing the wrong price in the wrong currency is not ideal.

The solution split the problem into layers. Content caches via Sanity's CDN. Product data (price, stock) fetches fresh per-request using the session token, which carries market and pricelist. Metadata uses 24-hour ISR. A stale meta description never costs a sale. The middleware is the gatekeeper: it runs on every request, establishes the session, and writes market context into a cookie that downstream pages read.

What I'd do differently

On-demand ISR via webhook instead of time-based revalidation. A Sanity webhook triggering revalidateTag would give instant content updates with zero unnecessary cache misses. Six hours was a safe guess, not an optimal answer.

Today

The site is live at poc.com.