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.
- → Homelab
Open-source infrastructure-as-code framework for managing multi-server Docker-based services with automated deployment, monitoring, and backups. Self-host your own cloud with Traefik, Immich, Jellyfin, Vaultwarden, Home Assistant, and 20+ more services.
- → 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. 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.
- → Infrastructure Overview
Full stack architecture: Traefik, monitoring, backup strategy.
4. Infrastructure & Cost Optimization
Run production services on a budget without sacrificing reliability.
- → How I Run 20+ Production Services on a Single $50/Month Server
Exact architecture, cost breakdown, and patterns to slash infra costs by 90%.
- → Homelab
Infrastructure-as-code for 20+ Docker services with Traefik and monitoring.
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.
- → 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
- → How I Run 20+ Production Services on a Single $50/Month Server
My homelab runs 20+ services on a single $50/month Hetzner server. Here is the exact architecture, cost breakdown, and why your SaaS can use the same patterns to slash infrastructure costs by 90%.
Need help with your architecture?
Book a free 30-minute intro call. No pitch, just advice.
Book a free intro call