Most SaaS products can defer most decisions. A few they cannot, because the cost of changing them grows with every customer who signs up. Tenancy is the clearest example.
Shared schema, separate schema, or separate database
A shared schema with a tenant column is the cheapest to operate and the easiest to query across, and it puts the entire burden of isolation on your application code. One missing filter in one query is a data leak between customers.
Separate schemas or databases per tenant move isolation into the infrastructure, where it is harder to get wrong, at the cost of migrations that now run hundreds of times and cross-tenant reporting that becomes a genuine project.
Our default is a shared schema with row-level security enforced in the database rather than in application code, so a forgotten filter fails closed. Regulated customers who require physical separation get their own database, which the architecture should allow from the start.
Identifiers leak information
Sequential integer primary keys tell every customer how many records exist and how fast you are growing. They also make enumeration trivial when an authorisation check is missed.
Use opaque identifiers in anything that reaches a URL or an API response. This is a five-minute decision at the start and a data migration later.
Design billing with the data model
If you intend to charge per seat, per workspace or per unit of usage, the events that produce those numbers have to be recorded from the first day — accurately enough to put on an invoice and to defend when a customer disputes it.
Retrofitting usage metering means either a gap in your billing history or a reconstruction from logs that were never designed to be authoritative.
Assume an enterprise deal arrives early
Single sign-on, audit logs, role-based access and data export are the four things that appear in every enterprise security review. None is difficult in isolation. All four are painful to add to a product whose permission model assumed a single user type.
Leaving room for roles in the data model costs almost nothing before launch, and it is the difference between answering a security questionnaire in an afternoon and answering it in a quarter.
Working on something this touches on? Tell us about it — we are happy to talk it through whether or not it turns into a project.