Hendra Sadewa
Web Engineer · Indonesiahendrasadewa.com

Building calm, durable web software in a quiet garden of code.

I'm Hendra Sadewa, a web engineer crafting TypeScript applications for the open web. Outside of my day work, I tend Niwa — a cohesive monorepo of small-batch web products powered by Cloudflare Workers, ATProto, and agent-assisted engineering.


Recent Writing

Notes & Dispatches

Read all on blog.hendrasadewa.com

The Niwa Ecosystem

Products Growing in the Garden

5 active apps · *.hendrasadewa.com

Niwa (庭) means garden. Each product solves a real, focused problem while sharing one botanical design system and a single Passkey identity.


Garden Log

Releases & Latest Build

Full changelog & build log
2026.11 · r4build b1765b9Nov 29, 2026

Niwa Home Rebuild & Universal UI Templates

Replaced the legacy personal website on hendrasadewa.com with @niwa/web, unified @niwa/ui/templates across every frontend, and standardized the botanical favicon and icon-only theme switcher.

Web@niwa/ui

Latest Monorepo Activity (main)

  • b1765b9feat(web):rebuild hendrasadewa.com with @niwa/ui, ecosystem showcase, and releases
    2026-11-29
  • ccd3ed0feat(ui):add @niwa/ui/templates universal templates and migrate all web apps
    2026-11-29
  • e2a049cfeat(ui):default theme picker to icon-only and set universal Niwa favicon across all web apps
    2026-11-29

How the Garden Grows

Niwa Architecture & Agent-Driven Craft

Full colophon & palette

Niwa is engineered as a single TypeScript & pnpm monorepo on Cloudflare's edge — structured specifically so both a human engineer and AI coding agents can ship cohesive products without architectural drift.

System Architecture
01 · Frontends

Two Purpose-Built Web Archetypes

SEO-first product sites run on Next.js 16 + OpenNext on Cloudflare Workers; client-only portals run as Vite 8 + React Router SPAs on Static Assets.

  • Next.js 16 App Router (web, pustaka-web, toko-web, blog-web)
  • Vite 8 Static SPAs (auth-web, labs)
  • Tailwind CSS v4 + @niwa/ui botanical design tokens
02 · Layered APIs

Strict One-Way Hono + Drizzle Workers

Every backend service follows the same canonical layered architecture backed by Cloudflare D1 and R2, built on shared @niwa/api-core primitives.

  • routes → services → repositories → db (zero leaky imports)
  • Per-request D1 injection & atomic db.batch() writes
  • Worker Service Bindings for fast internal worker-to-worker calls
03 · Shared Foundations

One Monorepo, Shared Contracts

A pnpm workspace unifies UI primitives, ES256 JWKS auth verification, typed Fetch clients, and Zod v4 schemas across every app.

  • @niwa/ui — shared tokens, primitives & ColorSchemeToggle
  • @niwa/auth — Passkey SSO & JWKS server verification
  • @niwa/*-validators — single Zod v4 source of truth

How AI Agents Build the Niwa Ecosystem

Rather than treating agents as one-off code generators, the monorepo encodes explicit conventions, reusable skills, and type-safe guardrails.

STEP 01AGENTS.md

Living Repository Maps

Root and per-app AGENTS.md files document every Worker, port, shared package, and convention so coding agents orient in seconds without guessing.

STEP 02.agents/skills/*

Reusable Domain Skills

Repeatable engineering playbooks — like niwa-api-architecture — encode exact templates for routes, services, repositories, error catalogs, and D1 migrations.

STEP 03Zod v4 + Strict TS

Machine-Checkable Contracts

Shared @niwa/*-validators schemas, strict TypeScript (noUncheckedIndexedAccess), and @niwa/ui tokens constrain agent output so every new app feels native to Niwa.

STEP 04Plan → Verify → Deploy

Human Taste + Automated Gates

Design decisions stay human-led through interactive planning, while typechecks, Drizzle migrations, and path-filtered GitHub Actions safely ship each Worker to Cloudflare.


Contact

Say Hello

Always happy to chat about web engineering, calm indie software, Cloudflare Workers, ATProto, or agent-assisted workflows.