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.
- → Self-hosted CalDAV Task Manager: Architecture Walkthrough
Full PWA architecture with Vite + Preact + Hono + Radicale on a $50/month server.
- → 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)
Self-hosted task manager that talks to any CalDAV server (Radicale, Nextcloud, Baikal). Web app + PWA, no vendor lock-in, your data stays on your server. Built because Tasks.org has no web UI.
- → 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.
- → FoodRazor
From paper chaos to automated procurement — built the platform that digitizes restaurant invoice processing, automates supplier ordering, and tracks ingredient price fluctuations in real-time. The founder (a serial restaurateur) was drowning in manual paperwork across 5 locations. I architected an Angular + Node.js stack with Firebase real-time sync, OCR-based invoice scanning, and ML-driven price trend predictions. What started as a single-restaurant tool grew into a multi-country operation.
- → 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