All posts14 March 2026

Why we built PesaLoop on Next.js 15, not a SPA

Most of PesaLoop's early development happened without consistent access to a personal laptop. That single constraint ruled out a lot of otherwise-reasonable choices before any feature work started.

A traditional split of a separate React frontend and a separate API server means two dev servers, two deploy targets, and two sets of environment variables to keep straight — all harder to manage from a phone or a borrowed machine. Next.js's App Router collapses that into one project: API routes live next to the pages that call them, and the whole thing runs from a single `npm run dev`.

GitHub Codespaces removed the second constraint — no local Node install, no local Postgres, no local anything. Open the repo, and the dev environment is already there. That's also why Supabase made sense over a self-hosted Postgres instance: the database needed to be reachable from a browser-based setup flow, not just from a local `psql` shell.

None of this was about chasing the newest framework. It was about matching the tools to the actual conditions of the work.