Technical Deep Dives
Code, architecture, and implementation details
24 posts
Data as a Product — Part 1: Foundations
Foundations & concepts: DaaP, product thinking, self-service, quality, anatomy.
Lakehouse architecture overview (7 layers)
Seven-layer Lakehouse: Ingestion (Airbyte, Kafka), Processing (Spark, Flink, dbt), Storage Format (Iceberg, Delta), MinIO, Metadata, Trino, Consumption.
MinIO Object Storage Guide — Lakehouse
MinIO trong Lakehouse: S3 API, buckets, security.
The Real Cost of Default Configs: How My AI Bot Burned $700/month on Tokens
A practical guide to optimizing LLM token usage in messaging bots. How default context windows, missing history limits, and compaction loops silently drain your API budget.
PostgreSQL Database Guide — Lakehouse
PostgreSQL trong Lakehouse: schema, labs, integration.
Supabase overview
Supabase is an open-source BaaS on PostgreSQL. This post covers: database, auth, API, storage, Realtime; place in stack and when to choose.
Project setup, CLI and environment variables
Create Supabase project, install CLI, folder structure; manage env (URL, anon key, service role key) securely. No secrets in repo.
Postgres schema and table design
Table design: naming, UUID vs serial, relations; example schema conversations, messages. Prep for RLS and PostgREST.
Migrations: write and apply
Write SQL migrations, folder and naming; apply via CLI or Studio; basic rollback. Schema versioned, reproducible.
Auth: JWT, session and backend integration
Supabase Auth, JWT; verify JWT on backend (NestJS, Express, FastAPI). Session and refresh. Secrets server-side only.
Prisma + Supabase: connect and sync schema
Configure Prisma for Supabase; introspect vs migrate; avoid conflicts with Supabase migrations. One source of truth for schema.
Row Level Security (RLS) and policies
What RLS is; enable RLS, write SELECT/INSERT/UPDATE/DELETE policies; test. Secure by default, least privilege.
API: PostgREST vs custom API and when to use which
PostgREST auto API; when to use custom API (own backend). Clear REST contract; separate consumer and data.
Deploy, CI/CD and multi-project
Deploy migrations safely; CI/CD (secrets, branch); multiple projects dev/staging/prod; secure keys; deploy checklist.
Series: Supabase from setup to deploy
Intro to 10-post Supabase series (Postgres BaaS): overview, setup, schema, migrations, auth, Prisma, RLS, API, Realtime/Edge, deploy.
Review Queue and Approval Channels
What a review queue is; priority; Slack, email, dashboard channels; where the user clicks approve/reject.
Identity and Audit Trail
Who reviewed, when; log for compliance and debug; permissions (who may review which type).
Learning in public
Sharing your learning process — notes, mistakes, open questions — helps you remember and can help others. Short post on benefits and how to start.
Vietnam and the Singularity — readiness and action
AI change in the next 1–5 years will be unprecedented. Is Vietnam ready? Concepts, challenges, opportunities, and action — from community and builder angles.
Why writing helps thinking
Writing isn't just recording — it clarifies ideas. Writing as a thinking tool: reasons and simple practices.
Why We Need Humans in the Loop
When to let the agent run autonomously and when to require human review; cost of wrong action vs cost of review.
What Is Human-in-the-Loop?
Definition of HITL; approval gate as the stop point; pending to approve/reject to continue or modify.
States and State Machine for HITL
States: pending_review, approved, rejected, timeout; simple state machine; reviewed_by, reviewed_at.
5 things I learned building AI agents
Reflection: five practical lessons from building and operating AI agents — HITL, cost of wrong action, state, feedback, ship the loop.