Skip to content
Blog

Software Development

Building SaaS Products: Lessons from 12 Real Projects

Hard-won lessons from building 12 SaaS products, covering architecture decisions, auth patterns, billing pitfalls, and the mistakes we stopped repeating.

Giovani Rodríguez7 min read

Twelve Products, Twelve Sets of Scars

Over the past several years we have built, shipped, and maintained twelve SaaS products. Some hit the ground running: Mindhyv became a functioning therapist-client platform within weeks. Others taught us expensive lessons about skipped steps and bad assumptions. Trackelio, LancerSpace, Vincelio, and the rest each added something to our playbook.

These are specific, technical lessons we picked up shipping code, supporting users, and fixing outages. If you’re building a SaaS product or thinking about it, nobody will warn you about most of this until it’s too late.

Multi-Tenant Architecture: Pick Your Model Early

The first major decision in any SaaS build is how you isolate tenant data. We have used three approaches across our twelve projects, and each locks in trade-offs you’ll live with permanently.

Shared database, shared schema is the cheapest to operate. One database, one set of tables, a tenant_id column on everything. We used this for LancerSpace because the data model was uniform across tenants and speed to market came first. It works until one tenant’s query patterns slow the database down for everyone. You also have to enforce that tenant_id filter in every query without exception. Miss one, and you have a data leak.

Shared database, separate schemas gives you better isolation without the operational overhead of multiple databases. We moved Trackelio to this model once we saw that different clients needed slightly different reporting structures. Each tenant gets its own schema, which makes migrations more complex but leaves room to customize.

Separate databases per tenant gives the cleanest isolation and costs the most to maintain. We reserve it for products where data sensitivity demands it, like Mindhyv, where therapist-patient records require strict separation.

Decide your tenancy model before you write your first migration. Changing it later means rewriting your data access layer, and in two cases that cost us more time than the original build.

Authentication Patterns That Scale

We stopped rolling our own authentication after project number three. Auth covers a huge surface: password hashing, session management, token rotation, email verification, password reset flows, rate limiting on login attempts. Each time we built it from scratch, we spent weeks on code that added zero product value.

Now we default to established providers and put our effort into the authorization layer, where the product logic lives. Who can see what? Who can edit what? What happens when a user belongs to multiple organizations?

Role-based access control with resource-level permissions has worked best for us. A user has a role within a tenant (admin, member, viewer), and specific resources can override those defaults. On Vincelio, this let profile owners grant granular access to specific sections of their data without admin intervention.

The mistake we see constantly: treating authentication and authorization as the same problem. Authentication tells you who someone is. Authorization tells you what they can do. Mixing them up leads to security holes or a permissions system so rigid that users can’t get their work done.

Billing Integration Will Humble You

Teams underestimate auth, and billing is worse. We have integrated Stripe into eight of our twelve products, and each time we hit an edge case we didn’t anticipate.

Billing is a state machine. A subscription can be active, past due, canceled, paused, trialing, or in a grace period. Each state changes what the user can access. Your application has to handle every state transition, including the ones triggered from Stripe’s dashboard when a support agent adjusts something by hand.

Webhooks are the dangerous part. Stripe’s events can arrive out of order or duplicated, and if your endpoint goes down, they queue up and hit you all at once when you come back. We learned to make our webhook handlers idempotent and order-independent. We log and deduplicate every webhook event, then process it against the current state instead of assuming a linear sequence.

The other pitfall is proration. When a user upgrades mid-cycle, downgrades, adds seats, or changes plans, the billing math gets complicated fast. We now build a billing service layer that hides all of this from the rest of the application. The app asks “can this user do this?” and the billing service answers. The app never calls Stripe directly.

The MVP Trap: Both Directions

Everyone warns about building too much in an MVP: ship fast, validate, iterate. That advice holds. We have also seen the opposite problem: building too little and calling it an MVP.

On an early version of one project, we shipped a feature set so thin that users couldn’t complete the core workflow. They could start the process but not finish it, which made it a demo. An MVP needs to deliver one complete value loop. The user should be able to go from having a problem to having it solved, even if parts of the solution are manual.

Mindhyv’s MVP was tight: a client could take an intake assessment, get matched to a therapist, and book an initial session. No messaging, no billing, no document sharing. That single loop from assessment to match to booking was complete and valuable. We added everything else later, based on what users asked for.

Build the smallest thing that delivers complete value, which is bigger than the smallest thing you can ship and much smaller than the full vision.

Database Schema Decisions You Can’t Undo

You can change some database decisions easily. Adding a column, creating a table, or adjusting an index is routine. Other schema decisions become load-bearing walls you can’t remove without rebuilding the house.

The big ones:

  • Your primary key strategy. UUIDs, auto-incrementing integers, or something else. This choice affects your URLs, your API design, your join performance, and your ability to merge data across environments. We default to UUIDs now because they make multi-tenant data handling and environment syncing much easier.
  • Your soft-delete strategy. Once you start soft-deleting records, every query in your application has to account for it. We’ve had bugs where a “deleted” record showed up in reports because one query forgot the WHERE deleted_at IS NULL filter. Decide this at the start and enforce it at the ORM level instead of in individual queries.
  • Your audit trail approach. If you need to know who changed what and when, retrofitting it is painful. We now include created_by, updated_by, and a separate audit log table from the first migration. The upfront cost is minimal. Adding it after the fact to a production database with millions of rows is a project of its own.
  • Your approach to polymorphic relationships. If a “comment” can belong to a task, a project, or a document, how do you model that? Your answer sets query complexity for the entire life of the product.

Monitoring From Day One

We used to bolt on monitoring after launch. The product would run fine for a few weeks, then something would break at 2 AM and we’d have no idea what happened, because we had no logs, alerts, or metrics.

Now monitoring goes in during the first sprint, starting with the basics. Error tracking tells us when things break. Uptime monitoring tells us when things go down. Request logging lets us trace what happened when a user reports a problem. Database query performance monitoring lets us catch slow queries before they cause outages.

On Trackelio, we caught a database connection pool exhaustion issue in the first week of beta because query performance monitoring was active from launch. Without it, we would have found the problem when the app crashed under load, probably during a client demo.

Our rule: if you wouldn’t launch without authentication, don’t launch without monitoring. Both are infrastructure, and we treat both as non-negotiable.

Bottom Line

Building SaaS products means making decisions with incomplete information and living with the consequences. We learned these lessons by debugging production issues, rewriting systems we built wrong the first time, and watching real users interact with software we thought was finished.

Each of our twelve projects made us better at this. We make architecture decisions faster now, our billing integrations go smoother, and monitoring is in place before the first user logs in. The core lesson hasn’t changed: respect the complexity, ship the smallest complete thing, and build the infrastructure to know when something goes wrong.

If you’re planning a SaaS build and want to skip the painful lessons, let’s talk. We’ll help you make the right architectural decisions from the start.

  • #SaaS
  • #Product Development
  • #Architecture
  • #Startup

Share

Get in touch

Let’s buildsomething great.

Tell us what you’re working on. We take on AI automation, custom SaaS platforms and technical strategy work.