Technical deep dive

Every component, every technology choice, and the reasoning behind each decision.

A request from a user's browser flows through three layers before returning HTML: Cloudflare's edge network, the Next.js server (running in a Worker), and Supabase for auth and data.

๐ŸŒ Browser

React client components

โ˜๏ธ Cloudflare Edge Network

CDN + Workers runtime ยท global PoPs

โ–ฒ Next.js 15 Worker

Server components ยท middleware ยท API routes

๐Ÿ”‹ Supabase

Auth ยท PostgreSQL ยท RLS

๐Ÿ“Š Recharts

Client-side SVG charts

Request flow โ€” loading /saved

1

Browser requests /saved. Request hits the nearest Cloudflare PoP.

2

Cloudflare routes the request to the FinWiser Worker.

3

Next.js middleware reads the session cookie and calls supabase.auth.getUser() to verify it.

4

The /saved page (server component) awaits createClient(), then queries saved_calculations filtered by user_id via RLS.

5

Next.js renders the full HTML server-side and streams it back through Cloudflare to the browser.

6

React hydrates the page. The delete buttons become interactive client-side without a full page reload.

Deploy flow

1

Developer pushes to the main branch on GitHub.

2

Cloudflare Git integration detects the push and starts a build.

3

Build runs: npm ci โ†’ opennextjs-cloudflare build (which runs next build internally) โ†’ opennextjs-cloudflare deploy.

4

The .open-next/worker.js bundle and .open-next/assets are uploaded to Cloudflare's global network.

5

New Worker version is deployed with zero downtime. Old version handles requests until the new one is live.

Technical Deep Dive | FinWiser