Baselyra

An open-source backend platform in two containers and 124 MB. Postgres with row level security, an auto-generated REST API, authentication, file storage, realtime and edge functions — a self-hosted alternative when a full BaaS is more than the job needs.

Visit live site

Source on GitHub

The problem

‌

Self-hosting Supabase means running well over a dozen containers and a few hundred megabytes of RAM before you have written a line of your own code. For most projects that is infrastructure you now have to operate, not infrastructure you needed.

‌

Architecture

‌

Two containers. Postgres 17 holds the data and the authorisation rules; a single Node 22 process serves the REST surface, auth, storage, realtime and the admin studio. Eight runtime dependencies in total, TypeScript in strict mode throughout.

‌

What I built

‌

Authorisation lives in Postgres, not JavaScript — every request runs as an anonymous or authenticated role, with row level security deciding what it can see. A PostgREST-compatible REST surface, so existing client patterns transfer. OAuth and phone OTP sign-in, file storage, realtime subscriptions, edge functions, and an admin studio for schema and data.

‌

Infrastructure

‌

Clone, run the setup script, and two containers start with migrations applied. No telemetry. Apache 2.0 licensed, with 301 tests passing in CI.

‌

The outcome

‌

Open source on GitHub, with live documentation and a running studio on my own VPS.

‌