Saru Blog

Claude Codeを使ってMulti-tenant Subscription Systemを作ってみた記録

Evaluating GitHub Agentic Workflows — From a Claude Code User's Perspective [Part 10]

What You Will Learn What GitHub Agentic Workflows are How they differ from traditional GitHub Actions Benefits for Claude Code users What can be automated in a 200K-line SaaS project Key factors in the adoption decision What Are GitHub Agentic Workflows? On February 13, 2026, GitHub released this as a technical preview. Co-developed by GitHub Next, Microsoft Research, and Azure Core Upstream, it’s open source under the MIT license. In short, a mechanism for automatically running AI coding agents on GitHub Actions. ...

February 17, 2026 · 7 分 · ko-chan

pnpm + Next.js Standalone + Docker: 5 Failures Before Success [Part 9]

What You Will Learn Why pnpm symlinks break in Next.js standalone Docker builds When cp -rL is not enough Symlink resolution patterns in Docker multi-stage builds Lessons from 5 consecutive fix PRs Background Saru manages 5 Next.js frontends (Landing / System / Provider / Reseller / Consumer) in a pnpm monorepo. In development, we use volume mounts so Dockerfiles are not needed. But deploying to production or demo environments requires Docker images. ...

February 16, 2026 · 8 分 · ko-chan

Turning Solo Development into Team Development with Claude Code Agent Teams [Part 8]

What You Will Learn How Claude Code Agent Teams work and when to use them Concrete use cases for solo developers using Agent Teams Real examples of task lists and team configurations Differences between regular subagents and Agent Teams, and how to choose The Wall of Solo Development In Part 6, I wrote about developing a 220,000-line SaaS application alone using Claude Code. AI functions as “ten extra pairs of hands,” rapidly handling everything from specification drafting to implementation and testing. ...

February 15, 2026 · 8 分 · ko-chan

Landmines and Solutions in Self-Hosted CI/CD: 15 Runners x Shared Docker Environment [Part 7]

What You Will Learn Problem and solution patterns in self-hosted runner environments How to prevent resource contention on a shared Docker daemon The port assignment problem killed by the birthday paradox How to investigate when “CI that was working suddenly breaks” Introduction In Part 2, I wrote about automating E2E tests using WebAuthn and Mailpit. The tests themselves work fine. The problem was the CI infrastructure. Saru has 4 frontends x 4 backend APIs. E2E tests run independently for each portal, plus there are cross-portal tests (integration tests between portals). Running these in parallel means 7+ jobs executing simultaneously. ...

February 12, 2026 · 12 分 · ko-chan

Building a 200K-Line SaaS Solo with Claude Code [Part 6]

What You’ll Learn The reality of large-scale development with Claude Code What to delegate to AI vs. what requires human judgment Actual workflow with a 200K-line codebase The Project in Numbers Metric Value Lines of code ~200K (Go 84K + TypeScript 113K) Development period ~3 months (Oct 2025–) Commits 311 Developers 1 Portals 4 (System / Provider / Reseller / Consumer) APIs 4 (dedicated to each portal) One person. Three months. 200K lines. ...

January 24, 2026 · 6 分 · ko-chan

3 Pitfalls of Multi-Portal Authentication with Keycloak [Part 5]

The Setup Saru has 4 portals: System, Provider, Reseller, Consumer. Each runs on a different subdomain, but they share one Keycloak realm. system.saru.local (port 3001) → Keycloak provider.saru.local (port 3002) → (single realm, reseller.saru.local (port 3003) → 4 clients) consumer.saru.local (port 3004) → Basic Keycloak + Auth.js integration is well-documented in existing tutorials. This article covers the problems those tutorials don’t mention. Pitfall 1: Cookie Collision Across Subdomains The Problem We wanted cross-subdomain session sharing for potential future use, so we set: ...

January 20, 2026 · 8 分 · ko-chan

PostgreSQL RLS for Multi-Tenant Isolation: Protecting 4-Tier Data as a Solo Developer [Part 4]

What You’ll Learn Comparison of data isolation patterns for multi-tenant SaaS Practical usage of PostgreSQL Row-Level Security (RLS) RLS policy design for 4-tier hierarchy (System/Provider/Reseller/Consumer) Setting RLS context with Go + pgx Detecting RLS leaks through testing Introduction As introduced in Part 1, Saru is a multi-tenant SaaS with a 4-tier account structure. System Admin (manages the entire SMS platform) └── Provider (offers services) ├── Reseller (sells services) │ └── Consumer (purchases/manages) └── Consumer (direct sales) In this structure, data isolation is critical. ...

January 15, 2026 · 11 分 · ko-chan

Next.js + Go Monorepo: Managing 4 Portals × 4 APIs as a Solo Developer [Part 3]

What You’ll Learn Next.js + Go monorepo architecture patterns Practical use of pnpm workspace + Turborepo Sharing UI components across 4 portals Package splitting strategies that don’t break down in solo development Introduction As introduced in Part 1, Saru is a multi-tenant SaaS with a 4-tier account structure. To implement this, I adopted an architecture of 4 frontends + 4 backend APIs. Normally, this would mean managing 8 repositories. For solo development, that would be unsustainable. ...

January 14, 2026 · 8 分 · ko-chan

Testing WebAuthn in CI: E2E Automation with Virtual Authenticators and Mailpit [Part 2]

What You’ll Learn How to test WebAuthn (passkey) authentication in CI environments Automating OTP email retrieval with Mailpit API Preventing email race conditions in parallel E2E tests Locale-specific testing for multilingual UIs Introduction In Part 1, I introduced the overall architecture and automation strategy for “Saru,” a multi-tenant SaaS platform. This article dives deeper into the E2E testing implementation that forms the core of that automation. The most challenging aspect is testing authentication flows. Saru uses two authentication methods: ...

January 13, 2026 · 8 分 · ko-chan

Tackling Unmaintainable Complexity with Automation: Building a Multi-Tenant SaaS Solo - Part 1

What You’ll Learn How to approach building systems that exceed “what one person can maintain” Overview of complex multi-tenant system design Automation strategy to achieve zero manual testing Introduction “Don’t build what you can’t maintain alone.” I believe this is a fundamental rule of solo development. But I wanted to challenge that limit. After using AI coding agents (Claude Code, GitHub Copilot, etc.) in production for several months, I started thinking, “Maybe I can build something complex on my own.” But there’s a condition: thorough automation. ...

December 20, 2025 · 4 分 · ko-chan