Habify Base Developer Docs & API Reference
Integrate dedicated PostgreSQL 18 databases, Default-Deny RLS Data APIs, Project Billing Kit, and 11 Core Services into any frontend stack.
30-Second Quickstart
Install @habifybase/sdk for TypeScript/React or habify-sdk for Python/FastAPI. Machine-readable context is available at /llms.txt.
pnpm add @habifybase/sdk
# Hoặc kết nối AI IDE qua MCP:
npx -y @habifybase/mcpuv add "habify-sdk[fastapi]"
# Đọc tài liệu cho AI Agents:
curl https://habifybase.com/llms.txtOpenAPI 3.1 Reference: Data API, Billing Kit & 11 Core Services
Complete OpenAPI 3.2.0 endpoint reference for Data API (/v1/db/tables/*), Project Billing Kit (/v1/billing/*), Unified Gateway, and standard error codes.
3-Mode Authentication (Shared Habify SSO · BYO JWKS · Project Local Auth)
Choose from three authentication modes per project: Mode A Shared Habify SSO (OIDC + PKCE), Mode B BYO Auth (JWKS), or Mode C Isolated Local Auth (Email/Password + BYO Phone/Email OTP inside habify_sys).
Physical PostgreSQL 18 Isolation & Default-Deny Row-Level Security
How Habify Base provisions physical hb_proj_<ulid> databases, enforces SET LOCAL ROLE hb_rls_<ulid> even on anonymous hb_pk_* calls, and balances clusters at 500 DBs / 70% disk.
TypeScript SDK (@habifybase/sdk) & Official MCP Server (@habifybase/mcp)
Use HabifyPublicClient, HabifyServerClient, React Billing Kit components (<PlanPicker/>, <WalletTopup/>), dual-secret webhook verification, and 5 @habifybase/mcp IDE tools.
Python & FastAPI SDK (habify-sdk)
Guide for AsyncHabifyClient, HabifyClient, JWKS verification (10-minute cache), dual-secret webhook HMAC helpers, and FastAPI dependency injections.
Portable .hpb Backups (3 Storage Modes) & Self-Hosted Modular Bundle
Zero vendor lock-in: export per-project PostgreSQL, object storage, and service records as .hpb bundles across 3 storage modes and restore onto self-hosted Docker Compose.
Configure BYO SePay Checkout (Bank QR & International Cards)
Connect your business SePay merchant account to Habify Base for VND Bank Transfer QR and Visa, Mastercard, JCB card payments.
BYO PayPal International Checkout & Automated USD Export E-Invoicing
Technical reference for configuring BYO PayPal checkout for international buyers (country !== 'VN'), passing daily VCB FX exchange rates, and issuing 0% export VAT e-invoices.
hb_pk_* vs hb_sk_*
Secret keys reject browser Origins (403). Publishable keys enforce hb_rls_<ulid> even on anonymous calls.
Default-Deny RLS
Any public table missing ENABLE + FORCE RLS or lacking at least one policy fails closed automatically.
Dual-Secret HMAC & Circuit Breaker
24h dual-secret webhook grace (v1 + v1_prev), SSRF guards on callback URLs, and automatic circuit breaker.