basefyio v1.2.1: Faster CLI, Resilient Project Provisioning
v1.2.1 brings a dramatically faster CLI startup, retry logic for Keycloak realm provisioning, and better error messages when things go wrong.
Every release should make the developer experience a little smoother. v1.2.1 focuses on two things: speed and resilience. The CLI starts faster, and project creation no longer fails silently when Keycloak has a transient hiccup.
What changed
CLI startup is now near-instant
Previously, running any bf command loaded the entire dependency tree
upfront — Inquirer, pg, Ora, Boxen, Axios, and more — even if the command
only needed a fraction of those modules. That added noticeable latency before
anything appeared on screen.
What we did:
- Converted every command handler in
index.tsto a lazyawait import(). Onlycommanderand Node builtins load at startup. - Enabled code splitting in the bundler (tsup). Each command is now its own chunk (~2–11 KB) instead of one monolithic file.
- Parallelized heavy imports inside
basefyio login: opening the browser, loading the UI library (Ora/Boxen), and creating the API client all happen concurrently viaPromise.all.
The result: basefyio --help runs in under 80 ms. Every command feels snappier
because the work happens only when it's needed.
Project creation is more resilient
The "Failed to provision authentication realm" error was one of the most
frustrating in the platform. It gave no context about what went wrong, and it
often left orphaned database resources behind.
What we did:
-
Retry with exponential backoff. Keycloak calls (
ensureAuth,createRealm,createClients) now retry up to 3 times with 1 s → 2 s → 4 s delays. Only transient failures (network errors, 5xx) are retried — 4xx errors fail immediately since retrying won't help. -
Health pre-check. Before provisioning any database or realm, the API verifies that Keycloak is reachable. If it's down, the request fails fast with a clear message — no database is created, so there are no orphaned resources to clean up.
-
Actionable error messages. The generic
"Failed to provision authentication realm"now includes the root cause:Failed to provision authentication realm: connect ECONNREFUSED 127.0.0.1:8080Operators can immediately see whether the issue is a network problem, wrong credentials, or a Keycloak outage.
Upgrade
If you're self-hosting, pull the latest images and redeploy:
docker compose -f docker-compose.prod.yml pull platform-api admin-ui website
docker compose -f docker-compose.prod.yml up -d --remove-orphans
For the CLI:
npm install -g basefyio-cli@latest
Questions or feedback? Open an issue on GitHub or reach out at support@basefyio.com.
Keep reading
- Self-Hosting Your Backend with Docker: What to Know
Why and how teams self-host their backend with Docker Compose — data residency, cost control, and no vendor lock-in — plus the trade-offs to plan for.
- How to Choose a Backend for Your AI App
AI apps still need a normal backend: users, conversation history, document storage, and usage limits. Here's how to choose one that won't slow you down.
- PostgreSQL Row-Level Security: A Practical Guide
Learn how PostgreSQL row-level security (RLS) works, when to use it, and how to write policies that enforce multi-tenant and per-user access at the database layer.