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. I built a web app for it; it is now being rewritten.
- → Code Audit & Refactoring Roadmap (From $1,500)
I review your codebase and tell you what to fix, what to rewrite and what to leave alone.
2. Building the MVP
Going from napkin sketch to production. Real projects I've built.
- → SmartLite
Real-time IoT control platform running in production at Gardens by the Bay, Singapore — about 200 lamp poles managed across the public-facing park, live since 2024 and still under my maintenance. Yumetronics handled the hardware and on-site pole integrations; I built the software side end-to-end: the operator web app, the backend services, the AWS infrastructure, and the deploy pipeline. Three months from kickoff to production, no prior code. The platform bridges MQTT-driven hardware control with an operator-friendly web dashboard. Pole state, sensor readings, and command acknowledgements flow over MQTT for low-latency control; database changes propagate to connected clients via PostgreSQL LISTEN/NOTIFY for a live multi-user dashboard without polling. Operators see a geographic map of every pole, scheduled automation (time-of-day, sensor-triggered, manual override), motion and ambient-light triggers, failure detection with automatic alerts through PWA push, Telegram, and WhatsApp — plus CSV and Excel exports, charts for incident reporting, role-based access (admin / operator / viewer), TOTP 2FA, and a mobile PWA so on-site staff can act from the field. The screenshots above cover every operator page.
- → Truth or Dare (DareChat)
Real-time multiplayer Truth or Dare game for Russian-speaking audiences, live at darechat.me. Built for founder Rustam Zaripov in 2022 with a backend-first architecture in one Nx monorepo: two NestJS APIs on Express (public REST + admin) using CQRS handlers, Swagger-documented at darechat.me/api, Socket.IO chat scaled across nodes via the Redis pub/sub adapter, Firebase auth + storage + FCM push notifications, Google Cloud Vision for user-uploaded image moderation, and Prisma on PostgreSQL. JWT-bearer auth across both APIs, custom Nx libraries for shared command/query handlers, and MinIO-compatible media storage. The marketing site (SvelteKit) and an Angular web app consume the same public REST API that mobile clients do — iOS and Android apps live in the founder's separate repos.
- → FoodRazor
Digitize paper invoices, automating orders to suppliers, and tracking price fluctuations.
- → Corecircle
Fitness-focused social network with exercise tracking features and ML for recommendation system.
- → Roley — Make a Movie!
Multi-video recorder for kids. Pick a script, record scene-by-scene, and the app stitches the clips into a finished movie — with intro/ending credits and 50+ transitions. Full stack: SvelteKit app, ffmpeg.wasm video pipeline, Postgres, AWS S3 + SES, Slack + Mailchimp webhooks. Paired physical craft boxes (scripts, props, costumes) with a digital recorder so the founder's vision of physical play + digital creativity just worked. The screenshots above are a portfolio re-imagination I built later; the original client's branding wasn't mine to share.
- → Sogroya Dose Reminder
A four-step multilingual web app for setting once-weekly Sogroya medication reminders on mobile and desktop calendars. I built the SvelteKit + TypeScript SPA, five-language flow (English, French, German, Portuguese, and Japanese), privacy consent, dose/day/time selection, and in-browser ICS generation. Static deployment kept the experience fast, backend-free, and easy to distribute globally.
- → Connectful
Networking app with Tinder-like UI and Machine Learning algorithm to match like-minded people.
- → GoPingu
Manage marketing teams via a Trello-like app that utilized a marketplace for project templates.
- → Microwork
Human text classification service freelance platform. Earn money by classifying things.
- → CallTrack
Analyze calls data from your call center and manage phone numbers based on various rules. I built the frontend of this call-analytics SaaS in AngularJS: the screens for call data and for managing phone numbers by rules.
- → Sajari
Dashboard single-page application for search and recommendations engine as a service. I built the dashboard, a single-page AngularJS app for Sajari's search and recommendations service.
- → Code Review & Architecture Audit
Code review report for a Node.js REST API codebase. The report covered deeply nested callbacks and inconsistent code style. After the report I interviewed seven Node.js developers in two weeks and hired the one who took the code forward.
- → Build: SaaS MVP, From Idea to Production (From $8,000)
I build your product from idea to live deployment. Backend APIs, AI integration and MCP servers are built the same way.
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.
- → rostok
The open-source scaffolder I deploy my own servers with: four instances in different regions, each running a different set of services.
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.
- → AI integration and MCP servers, built under Build: MVP (From $8,000)
Custom MCP servers that let your AI assistant read, write and act inside your own tools — CRM, database, email, calendar, internal APIs — shipped as a self-hosted Docker image you own.
6. Production Patterns & Lessons
Real-world lessons from shipping 80+ projects.
- → preact-components: a Preact component library without shadcn or Radix
Why I own my UI components instead of using shadcn, Radix or MUI: a Preact component library in ten JSR packages, rendered on the server, keyboard handling written by hand, with a live guide. What is in it, how to try it, and what is not done yet.
- → 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.
Need help with your architecture?
Book a free 30-minute intro call. No pitch, just advice.
Book a free 30-minute call