Skip to content
okf/architecture

OPEN KNOWLEDGE FORMAT · v0.1

Stop re-litigating
the same architecture decisions.

44 opinionated engineering standards — data, APIs, AI agents, security, delivery — as plain markdown you read in Obsidian or hand straight to an AI agent. Pinned to a real Kubernetes platform, with a # Scale section in every file.

Explore the 8 domains

WORKS IN OBSIDIAN · FEEDS AI AGENTS · NO LOCK-IN · ₹199 ONE-TIME

data / database-scaling-the-ladder.md
---
domain: data
status: stable
okf: 0.1
---

# Database Scaling — the ladder

Climb a rung only when metrics say the
current one is the bottleneck.
$ git pull origin main ALWAYS LATEST
44
concepts
08
domains
1M–10M
scale target
₹199
one-time

Substance you can grep, not slides you skim.

01OPEN FORMAT

No lock-in, ever

Plain markdown + YAML frontmatter (OKF v0.1). Opens in Obsidian, any editor, and feeds straight into your AI agents.

02PINNED PLATFORM

Real, not generic theory

Standards are pinned to a working homelab + Kubernetes platform — ArgoCD GitOps, GHCR, cert-manager — with concrete defaults.

03SCALE-READY

Built for 1M–10M users

Every concept carries a # Scale section: when the current approach breaks and the exact next rung to climb.

04ALWAYS LATEST

Lifetime updates

Pull the newest standards via git, or re-download the latest versioned .zip any time. One price, updated forever.

05BY INTERVIEW

Authored, not generated

Each standard was drawn out by interview and hardened against a real platform — substance over auto-generated slop.

THE WHOLE MAP

44 concepts across 8 domains, each a single self-contained file.

See the tree ↓

Eight domains. Forty-four concepts. One vault.

Drop the folder into Obsidian and the whole architecture opens as a linked, navigable knowledge base — or point an AI agent at it.

~/vault / okf-architecture
okf-architecture/git · always-latest
├─ ▸ data/07 concepts
· database-scaling-the-ladder.md
· multi-tenancy-by-default.md
· uuidv7-primary-keys.md
+4 more
├─ ▸ api/10 concepts
· rest-resource-design.md
· idempotency-keys.md
· cursor-pagination.md
+7 more
├─ ▸ ai-agents/05 concepts
· agent-model-plus-harness.md
· mcp-tool-contracts.md
· hitl-checkpoints.md
+2 more
├─ ▸ frontend/03 concepts
· rendering-strategy.md
· design-tokens.md
· a11y-contracts.md
├─ ▸ security/04 concepts
· row-level-security.md
· secrets-and-rotation.md
· authz-model.md
+1 more
├─ ▸ observability/02 concepts
· the-three-signals.md
· slos-and-error-budgets.md
├─ ▸ testing/07 concepts
· the-test-pyramid.md
· contract-tests.md
· deterministic-fixtures.md
+4 more
└─ ▸ delivery/06 concepts
· gitops-with-argocd.md
· progressive-delivery.md
· release-channels.md
+3 more
Data07

Postgres-first persistence, multi-tenancy, and the scaling ladder.

API10

Resource design, idempotency, pagination, and stable error envelopes.

AI & Agents05

Model + harness, MCP tools, and human-in-the-loop checkpoints.

Frontend03

Rendering strategy, design tokens, and accessible component contracts.

Security04

Row-Level Security, secret rotation, and least-privilege defaults.

Observability02

The three signals and SLOs backed by error budgets.

Testing07

A pragmatic pyramid, contract tests, and deterministic fixtures.

Delivery06

GitOps with ArgoCD, progressive delivery, and pinned platforms.

Open three actual files from the bundle.

This is verbatim source — frontmatter, the scaling ladder, an RLS policy, the agent contract. Click a tab.

read-only · OKF v0.1
---
domain: data
status: stable
okf: 0.1
scale_target: 1M–10M users
---

Database Scaling — the ladder

“Climb a rung only when metrics say the current one is the bottleneck.”
  1. Index & query optimizationEXPLAIN first
  2. PgBouncer connection poolingtransaction mode
  3. Read replicasoffload reads
  4. Table partitioningby time / tenant
  5. Cachingread-through
  6. Citus shardinglast resort

# Scale

Each rung lists the exact metric that signals you've outgrown it — replica lag, pool saturation, partition pruning misses — so you climb on evidence, never on vibes.

---
domain: data
status: stable
okf: 0.1
pairs_with: security/row-level-security
---

Multi-tenant by default

One shared schema, a tenant_id on every row, and UUIDv7 primary keys so identifiers stay sortable and leak nothing. Isolation is enforced in the database — not hopefully in application code.

-- a forgotten WHERE can't cross tenants ALTER TABLE invoices ENABLE ROW LEVEL SECURITY; CREATE POLICY tenant_isolation ON invoices USING (tenant_id = current_setting('app.tenant')::uuid);

# Scale

Postgres Row-Level Security makes a leak structurally impossible: a missing WHEREreturns zero rows, not someone else's data. Partition by tenant_id when a table gets hot.

---
domain: ai-agents
status: evolving
okf: 0.1
runtime: self-hosted
---

Agent = Model + Harness

agent = model + harness

The model reasons; the harness gives it hands, memory, and guardrails. Built on Google ADK + Claude Agent SDK, with self-hosted Ollama for private inference and MCP tools as the contract surface.

  • toolsMCP — typed, auditable, swappable
  • inferenceOllama, self-hosted, no data egress
  • checkpointsTemporal-backed human-in-the-loop

# Scale

HITL checkpoints are durable Temporal workflows — an agent can pause for human approval for hours or days, survive a restart, and resume exactly where it left off.

Two ways in. Lifetime updates on both.

PATH Alifetime updates

Private GitHub repo

Read access to the source repo. Always the latest, straight from git.

  • +Invited as a read-only collaborator
  • +git pull for the newest standards
  • +Diff changes between updates
PATH Blifetime updates

Versioned .zip download

A self-contained archive. No GitHub account required.

  • +Download the latest tagged release
  • +Re-download any version, any time
  • +Drop straight into Obsidian

Buy once and you get a license token instantly. Use it to claim GitHub read access, to pull a versioned .zip, or both — and to re-download the newest release any time from /versions.

One price. Every standard.
Updated forever.

  • All 44 concepts across 8 domains
  • GitHub read access or .zip download
  • Lifetime updates, free
  • Open format — no lock-in
₹199INR

one-time · free updates forever

SECURED BY RAZORPAY · INSTANT LICENSE

The honest answers.

Still unsure? Email contact@vishalpandey.co.in.

How do updates work?+

Lifetime updates are included free. If you take the GitHub path, just pull the repo for the latest. If you took the .zip, re-download the newest versioned archive from the Versions page any time — no extra charge.

Do I need a GitHub account?+

No. GitHub read access is one option, but the versioned .zip download requires no GitHub account at all. Either path gives you the complete bundle and lifetime updates.

What exactly is the format?+

Open Knowledge Format v0.1 — markdown files with YAML frontmatter. Each concept is a single, self-contained file with a # Scale section. Works in Obsidian, plain editors, and as context for AI coding agents.

What is your refund policy?+

These are digital goods delivered instantly, so sales are final. That said — email within 7 days if something is wrong and we will make it right. See the refund page for the full policy.