Introduction

Hey there πŸ‘‹πŸ»

Dominic Fuchs

My name is Dominic Fuchs
Lead Product Developer at AURUM.

AURUM Consulting

AURUM Consulting

Microsoft Experts from Nuremberg since 2003

Microsoft 365 SharePoint Power Platform Azure On-Premise

Visit us at aurum-consulting.de

Follow us on LinkedIn

Presenting πŸŽ‰

Time management connected to your
Microsoft 365

Join the Waitlist to get Alpha Access πŸš€

zeit365.com

Logo not final

Agenda

I'm proud to present you an opinionated guide on

Building a modern SaaS with Microsoft 365 integration

  • Tenant-First Approach


  • Data Handling


  • Database


  • Infrastructure


  • Licensing

Tenant-First Approach

Tenant-First Approach

AURUM
  • Tenant-First Approach


  • Data Handling


  • Database


  • Infrastructure


  • Licensing

Tenant-First Approach

Let's think about Responsibility

"Tenant-First Approach" means that anything that could be provided or managed by your Microsoft 365 tenant should be provided or managed by your tenant.
AURUM
  • Tenant-First Approach


  • Data Handling


  • Database


  • Infrastructure


  • Licensing

Data Handling

Data Handling

AURUM
  • Tenant-First Approach


  • Data Handling


  • Database


  • Infrastructure


  • Licensing

Integrate Microsoft Graph

We all know how Graph works

AURUM
  • Tenant-First Approach


  • Data Handling


  • Database


  • Infrastructure


  • Licensing

Find Entities

Dominic Fuchs
Users of a project'sΒ group can pin important entities to make collaboration with their co-workers easier.
AURUM
  • Tenant-First Approach


  • Data Handling


  • Database


  • Infrastructure


  • Licensing

Don't Save what already exists

Dominic Fuchs
Users can see the Creator of a Customer to ask for informations.
titlecreatorUserId
1Unbreakable Windows98f0fb88-3584-11f0-ae57-0f37e01e966f
2YumYum Coffee1fe3bd6a-3585-11f0-a823-2318f177c89c
3Awesome Cars207a552c-3585-11f0-ab04-131ff5b8151c
AURUM
  • Tenant-First Approach


  • Data Handling


  • Database


  • Infrastructure


  • Licensing

Don't Save what already exists

Dominic Fuchs
Users can see the Creator of a Customer to ask for informations.
AURUM
  • Tenant-First Approach


  • Data Handling


  • Database


  • Infrastructure


  • Licensing

Why that matters

  • 01

    There is one source of truth

    You don't need to update the user's data within the app if the tenant's user data changes
  • 02

    Permissions remain intact

    The user's permission are effective if it's using Zeit365
  • 03

    Being prepared for the worst case

    Your sensitive business data is not exposed in the event of a data breach. The easiest way to protect data is to not save data.
AURUM
  • Tenant-First Approach


  • Data Handling


  • Database


  • Infrastructure


  • Licensing

Database

Database

AURUM
  • Tenant-First Approach


  • Data Handling


  • Database


  • Infrastructure


  • Licensing

Set Database Requirements

From the perspective of a SaaS Provider

  • Reliable Export Mechanism

    Every customer must be able to export and import their database.
  • Cheap horizontal scaling

    We want to provide a separate database for each tenant without passing costs.
  • Isolated runtime

    Each database process needs to run fully independent of another, so problems can be addressed in isolation.
  • Easy long-term maintenance

    We are a team with limited resources and our app needs to be maintained for a long period of time.
AURUM
  • Tenant-First Approach


  • Data Handling


  • Database


  • Infrastructure


  • Licensing

Let's pick a Database

πŸ₯ And the Winner is... πŸ₯

SQLiteimage/svg+xmlSQLite
AURUM
  • Tenant-First Approach


  • Data Handling


  • Database


  • Infrastructure


  • Licensing

It's just a File

"One File to rule them all"

  • Reliable Export Mechanism

    Every customer must be able to export and import their database.
  • Cheap horizontal scaling

    We want to provide a separate database for each tenant without passing costs.
  • Isolated runtime

    Each database process needs to run fully independent of another, so problems can be addressed in isolation.
  • Easy long-term maintenance

    We are a team with limited resources and our app needs to be maintained for a long period of time.
AURUM
  • Tenant-First Approach


  • Data Handling


  • Database


  • Infrastructure


  • Licensing

SQLite is Done

Let's think about Longevity

SQLite is backward- and upward-compatible since

20 years
8 months
9 days
AURUM
  • Tenant-First Approach


  • Data Handling


  • Database


  • Infrastructure


  • Licensing

The downsides

Question
Isn't SQLite way slower then a traditional Database System like AzureSQL?
Dominic Fuchs
Accessing a file directly is faster than a DBMS processing SQL statements.
Question
Can SQLite even handle the expected amount of data?
Dominic Fuchs
One database only needs to serve one tenant. SQLite can handle billions of rows with ease.
Question
What about transactions running parallel, your backup strategy, network distribution...
Dominic Fuchs
Visit us at the AURUM Booth (#43) or follow us on LinkedIn, so you won't miss our blog posts about those topics.
AURUM
  • Tenant-First Approach


  • Data Handling


  • Database


  • Infrastructure


  • Licensing

Great Developer Experience

import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core";

export default sqliteTable(
    "customer",
    {
        id: integer().primaryKey(),
        title: text().notNull(),
        description: text(),
        slug: text().notNull().unique(),
        msGroupId: text().notNull(),

        likesCats: integer({ mode: "boolean" }).default(true), // just add a column
    },
    () => [],
);
AURUM
  • Tenant-First Approach


  • Data Handling


  • Database


  • Infrastructure


  • Licensing

Infrastructure

Infrastructure

AURUM
  • Tenant-First Approach


  • Data Handling


  • Database


  • Infrastructure


  • Licensing

Run in isolation

How most SaaS products are hosted

AURUM
  • Tenant-First Approach


  • Data Handling


  • Database


  • Infrastructure


  • Licensing

Run in isolation

How SaaS products following the "Tenant-First Approach" are hosted

AURUM
  • Tenant-First Approach


  • Data Handling


  • Database


  • Infrastructure


  • Licensing

Why that matters

  • 01

    Simplifies the Development

    Building an app that serves only one tenant and a known amount of users, is way simpler then building an app for an undefined amount of users.
  • 02

    You stay in control of updates

    You have the option to apply or skip an update whenever you feel like.
  • 03

    Performance can be scaled more easily

    Each performance metric is scoped by default. That way we can ensure your app always has enough resources to run at peak performance.
  • 04

    Stay flexible

    We are able to change the database, the Azure App Registration, or the machine your app runs on without risking to break the runtime of another tenant.
AURUM
  • Tenant-First Approach


  • Data Handling


  • Database


  • Infrastructure


  • Licensing

Self-Hosting is important

Let's think about Independency

Zeit365 can run almost anywhere. It doesn't even have to be Azure.
AURUM
  • Tenant-First Approach


  • Data Handling


  • Database


  • Infrastructure


  • Licensing

Licensing

Licensing

AURUM
  • Tenant-First Approach


  • Data Handling


  • Database


  • Infrastructure


  • Licensing

Licensing

Assigning licenses from your Admin Center

Assign licenses from your Admin Center
AURUM
  • Tenant-First Approach


  • Data Handling


  • Database


  • Infrastructure


  • Licensing

Thanks!

Thanks for listening

Thanks for listening

aurum-consulting.de

zeit365.com