Skip to main content

SENIOR SOFTWARE ENGINEER · SYSTEM ARCHITECT

Technical case study

Yin Business

A multi-tenant platform for building business software: workflows, websites, identity and scheduling in one place.

Product

Type

Founder and architect

Role

In active development

Status

Go, TypeScript, Bun, SolidJS, MongoDB, Redis, Caddy

Built with

Summary

Every business application I built needed the same foundations again: sign-in, APIs, background jobs, a website and an admin console. Yin Business is my answer: one platform that provides those foundations to many isolated projects, with business logic built as visual workflows.

2.5k

operations per second

Mixed load at 50 clients, three instances, on one Windows machine. Lab result, not production.

428 ms

largest contentful paint

Down from 692 ms. Test page at 390 px wide, 4x CPU slowdown, median of 7 runs.

0

reachable known vulnerabilities

govulncheck across all six Go repositories. An internal review, not an external audit.

The problem

Rebuilding the same foundations for each product is slow, and each copy drifts. A fix to sign-in or rate limiting in one project does not reach the others.

Off-the-shelf automation tools solve part of this, but they stop being useful when a workflow has to pause for days, survive a crash, or run the exact version that was approved for production.

Constraints

  • Projects must stay isolated from each other, in data and in secrets.
  • Public websites have to stay fast on slow phones, so script must never compete with first paint.
  • Losing a cache server should slow the platform down, not take it offline.

My role

I designed and built the platform: the Go services, the auth service, the gateway, the console and the UI library.

The approach

Requests enter through a gateway that resolves the project from the domain and verifies identity. Separate services then handle configuration, workflow execution, website rendering and scheduling.

Architecture flow

  • Websites
  • Mobile apps
  • Webhooks
  • domain and identity checksGateway
  • Workflow engine
  • Web engine
  • Config
  • Scheduler
  • MongoDB
  • Redis
  • Object storage

Key decisions

Decision 01

Workflows that pause and resume

Why: A step can wait for days or for a callback. The run's state is saved and sealed, and a claim with a time limit means another instance can recover it if one crashes.

Trade-off: More moving parts than a simple job queue, and each pause has to be tested against crashes.

Decision 02

Publishing creates an immutable version

Why: Each environment pins a specific version, so an edit to the draft can never change what production runs. Rolling back is a pin change.

Trade-off: Routes and triggers have to be versioned too, which adds checks on every publish.

Decision 03

Customer code runs in separate worker processes

Why: A runaway script should fail alone, with a memory cap enforced by the operating system.

Trade-off: Throughput is limited by the worker pool: about 500 to 800 code runs per second in my tests.

Decision 04

The database is the record for duplicate protection

Why: A load test showed 13 to 39 double runs when Redis restarted, because Redis was holding the claims. After moving claims to MongoDB, the same test showed none.

Trade-off: Slightly slower than a cache-only check.

What the testing found

Load testing was most useful for what it broke. Redis outages used to hold requests for around nine seconds, so the client now marks Redis as down on the first connection error and every consumer falls back at once. A 17-minute soak test showed no memory or goroutine leak.

At 400 clients on a mix with heavy code steps, throughput fell from about 2,486 to 963 requests per second. That limit is known and sits in the worker pool.

What is next

All of these numbers come from one machine. The next step is production traffic, which is the only way to confirm them.

Building something similar?

Tell me what you are working on, and we can look at it together.

DIRECT MESSAGE

Hiring for a Senior/Staff Architect role, scaling a venture, or looking to collaborate?

Message sent

Thank you. I reply within 24 hours.

Sending…

hi@nazmulislamfahim.com

Thank you. I reply within 24 hours.