SaaS Architecture Guide
From idea to production — architecture patterns, infrastructure decisions, and lessons learned from 80+ projects.
1. Architecture Design
How to think about system architecture, choose the right stack, and design for scale from day one.
- → How ChatGPT Can Help You Design System Architecture
Generate system diagrams, compare databases, spot security gaps with AI assistance.
- → The missing piece in a self-hosted CalDAV stack: a web UI for Tasks.org
Tasks.org syncs Android tasks to CalDAV cleanly. There is no web UI for that data. The fix is a stateless PWA on top of the CalDAV server you already run.
- → Technical Discovery Sprint (catalog)
Get a complete architecture blueprint and phased build roadmap.
2. Building the MVP
Going from napkin sketch to production. Real projects I've built.
- → Production Infrastructure Lab
Sanitized production infrastructure case study demonstrating end-to-end operational ownership. Reusable infrastructure as code and Deno automation coordinate Docker Compose delivery behind Traefik, VictoriaMetrics and Gatus monitoring, Restic integrity checks, retention and restore tooling, and Authelia SSO with 2FA.
- → Financy
Open-source, self-hostable finance tracking for individuals, families, and small businesses. Features double-entry accounting, multi-currency support, real-time collaboration, and PWA capabilities.
- → Air Quality Sensor
DIY ESP32-based air quality monitoring system measuring PM1.0, PM2.5, PM10 particles, CO2, temperature, and humidity. Integrates with Home Assistant for smart home automation and real-time alerts.
- → TodoApp — CalDAV Task Manager (PWA)
My Android tasks live in Tasks.org. Tasks.org syncs them to CalDAV. Every desktop client I tried either pulled its own backend or fought Tasks.org for ownership of the data — I needed a thin UI on top of the same VTODO files. Built it on Deno + Hono + Preact Signals: a CQRS layer over a CalDAV adapter (one PROPFIND/PROPPATCH/PUT/DELETE interface that speaks both Radicale and Stalwart), AES-GCM at rest for server credentials, SQLite holding only user accounts and encryption keys — never for todos. Result: 5 calendars and 140+ todos on a single Hetzner box, deployed since June 2026, including a Radicale-to-Stalwart migration that moved zero VTODO data.
- → caldav-mcp
Native Deno Model Context Protocol server for CalDAV. Events + tasks, zero npm dependencies, single binary. Works with OpenCode, Claude Desktop, Cursor, and Open WebUI.
- → Zond
Internal health probe bridge for services behind SSO proxies. Originally Deno+TS, rewritten to Go as a single 10 MB distroless binary. Probes HTTP endpoints through Authelia-secured gateways — built for Gatus and other monitoring tools that lack SSO support.
- → Zero-to-Production SaaS MVP (catalog)
Full SaaS MVP from idea to live deployment in 21 days.
3. CI/CD & DevOps
Automate your deployment pipeline and keep your infrastructure healthy.
- → Setting Up Your Own CI/CD Server with Drone CI
Run your own CI/CD on a $10 VPS. Docker Compose setup, GitHub integration.
- → Production Operations Practice
Repeatable deployment, observability, recovery, security, and cost control after launch.
4. Infrastructure & Cost Optimization
Choose infrastructure from measured load, recovery needs, compliance, team capacity, and budget.
- → Managed Cloud, Dedicated, or Hybrid
Decision rubric for compliance, elasticity, geography, team capacity, uptime, recovery, and cost.
- → Production Infrastructure Lab
Sanitized case study of reusable IaC, Deno deployment automation, monitoring, recovery tooling, and identity controls.
5. AI Integration
Add LLM capabilities to your SaaS with production-grade architecture.
- → Building MCP Servers with Deno: A Practical Guide
Architecture for MCP servers, working CalDAV example, lessons from 4 production servers.
- → Surgical AI Integration & LLM Pipelines (catalog)
Production-grade LLM pipelines, RAG systems, and autonomous subagents.
- → Custom MCP Server Development (catalog)
Connect your AI to your CRM, database, email, and internal APIs.
6. Production Patterns & Lessons
Real-world lessons from shipping 80+ projects.
- → Deno Platform Template: distilling 80+ client projects into one repo
What I learned shipping the same SaaS skeleton over and over for paying clients. Group core, personal groups, REST + CQRS, offline sync, an outbox processor — and a deliberate decision to ship it as a template, not a framework.
- → Cost-Disciplined SaaS Infrastructure: Managed Cloud, Dedicated, or Hybrid?
A founder-readable framework for choosing managed cloud, dedicated, or hybrid SaaS infrastructure based on workload, team, compliance, recovery, and total cost.
- → Why you have to ship your idea today and with shittiest code possible
Or why so many developers abandon their attempts to release a product
Need help with your architecture?
Book a free 30-minute intro call. No pitch, just advice.
Book a free intro call