Joonas' blog

New here? Start here: Supabase & Postgres

supabase (8)nextjs (6)postgres (5)react (5)auth (3)design-systems (3)tooling (2)api-design (1)gamedev (1)networking (1)performance (1)postgis (1)rails (1)security (1)travel (1)writing (1)

2025

Security Testing Supabase PostgREST

Some common enumeration, recon and exfiltration methods for Supabase

Keep your API elegant only in its signature

Messy code inside a function is fine if the call site stays simple. A worked example from an internal API client, inspired by React's design principles.

2024

Bringing <Button> to the React Server Component world

How React Server Components change a design system <Button>: async onClick, loading state, submit status and confirm prompts.

Next.js + Supabase app in production: what would I do differently

My learnings for building a Next.js and Supabase app and keeping it running in production

How does Apple wifi password sharing work?

A look into how Apple devices share WiFi passwords between (semi-anonymous) devices without internet

Visiting Japan

Notes from a trip to Japan: eSIMs, cash and 7/11 ATMs, Suica, hotels, food, and what to see in Tokyo, Osaka, Kyoto and Hiroshima.

2023

Next.js: request parameter reference

How to read route params, query params, headers, cookies and the client IP, and how to redirect, in each kind of Next.js component and handler.

Migrating to PKCE-compatible generateLink in Supabase

auth-helpers-nextjs 0.7.0 made PKCE the default and broke generateLink. What changed, and the route handler that fixes it.

Next.js app directory: URL-synced state

How to store state in URL with Next.js app directory

PostgREST/Supabase: joins and join conditions

A look at how postgREST does joins and the gotchas involved

How to fix a NPM package mess

How to fix broken npm installs, starting with a clean reinstall and a known-good package-lock.json, then missing packages and binaries.

Git: set working directory contents to a commit

Update files in the working tree to match the version in given [commitref] without updating HEAD

Blog idea hack: source your ideas from web history

A method to write about topics your past self wishes existed

PostgREST datetime operators

Quick reference to PostgREST operator behavior with datetime columns

Opinionated UI: SVG icons in React

Opinionated way to use SVGR to serve SVG icons in a React design system library

Implement user impersonation in Supabase

Let admins log in as any user in a Next.js and Supabase app, with the code to start and stop impersonation.

Generating Supabase JWT/access token manually

How to manually generate JWT tokens to use Supabase services as any user

Type-safe prop passing in Next.js server components

Flexible method for easily passing typed data from server in Next.js server components

Creating a Postgres function for a Supabase RLS policy

Postgres function templates that move repeated access checks out of your Supabase RLS policies, starting with a join table membership check.

Opinionated UI: <Button> in React

Opinionated way to create a Button component in a React design system library

2022

Building complex and interactive forms for React

How I built a complex form for React (with react-hook-forms). An introduction and learned best practices on how some common complex form usecases might be handled.

2020

2D Navmesh generation and pathfinding in Javascript

Minimal-dependency navmesh generation and path-finding in Javascript

JSON Serialization might be your Rails bottleneck

Why your Rails app might surprisingly be bottlenecked by JSON serialization and what can you do about it

PostGIS marker culling

Implementing low-priority marker culling for PostGIS queries