Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore: new diagrams

Jonathan Summers-Muir11129b4ee548
diff --git a/apps/docs/pages/guides/ai/engineering-for-scale.mdx b/apps/docs/pages/guides/ai/engineering-for-scale.mdx
index a74bfe39d50..663550fc4a8 100644
--- a/apps/docs/pages/guides/ai/engineering-for-scale.mdx
+++ b/apps/docs/pages/guides/ai/engineering-for-scale.mdx
@@ -16,7 +16,18 @@ For small workloads it's typical to store your data in a single database.
If you've used [Vecs](/docs/guides/ai/vecs-python-client) to create 3 different collections, you can expose collections to your web or mobile application using [views](/docs/guides/database/tables#views):
-![Single Database](/docs/img/ai/scaling/single-database.png)
+<div>
+ <img
+ alt="single database"
+ className="dark:hidden"
+ src="/docs/img/ai/scaling/engineering-for-scale--single-database--light.png"
+ />
+ <img
+ alt="single database"
+ className="hidden dark:block"
+ src="/docs/img/ai/scaling/engineering-for-scale--single-database--dark.png"
+ />
+</div>
For example, with 3 collections, called `docs`, `posts`, and `images`, we could expose the "docs" inside the public schema like this:
@@ -44,7 +55,18 @@ const { data, error } = await supabase
As you move into production, we recommend running splitting your collections into separate projects. This is because it allows your vector stores to scale independently of your production data. Vectors typically grow faster than operational data, and they have different resource requirements. Running them on separate databases removes the single-point-of-failure.
-![With secondaries](/docs/img/ai/scaling/with-secondaries.png)
+<div>
+ <img
+ alt="With secondaries"
+ className="dark:hidden"
+ src="/docs/img/ai/scaling/engineering-for-scale--with-secondaries--light.png"
+ />
+ <img
+ alt="With secondaries"
+ className="hidden dark:block"
+ src="/docs/img/ai/scaling/engineering-for-scale--with-secondaries--dark.png"
+ />
+</div>
You can use as many secondary databases as you need to manage your collections. With this architecture, you have 2 options for accessing collections within your application:
@@ -120,7 +142,18 @@ const { data, error } = await supabase
This diagram provides an example architecture, allowing you to access the collections either with our client libraries or using Vecs. You can add as many secondary databases as you need, in this example we show one only:
-![Multi Database](/docs/img/ai/scaling/multi-database.png)
+<div>
+ <img
+ alt="multi database"
+ className="dark:hidden"
+ src="/docs/img/ai/scaling/engineering-for-scale--multi-database--light.png"
+ />
+ <img
+ alt="multi database"
+ className="hidden dark:block"
+ src="/docs/img/ai/scaling/engineering-for-scale--multi-database--dark.png"
+ />
+</div>
export const Page = ({ children }) => <Layout meta={meta} children={children} />
diff --git a/apps/docs/public/img/ai/scaling/engineering-for-scale--multi-database--dark.png b/apps/docs/public/img/ai/scaling/engineering-for-scale--multi-database--dark.png
new file mode 100644
index 00000000000..95015ff6887
Binary files /dev/null and b/apps/docs/public/img/ai/scaling/engineering-for-scale--multi-database--dark.png differ
diff --git a/apps/docs/public/img/ai/scaling/engineering-for-scale--multi-database--light.png b/apps/docs/public/img/ai/scaling/engineering-for-scale--multi-database--light.png
new file mode 100644
index 00000000000..6c04d613605
Binary files /dev/null and b/apps/docs/public/img/ai/scaling/engineering-for-scale--multi-database--light.png differ
diff --git a/apps/docs/public/img/ai/scaling/engineering-for-scale--single-database--dark.png b/apps/docs/public/img/ai/scaling/engineering-for-scale--single-database--dark.png
new file mode 100644
index 00000000000..f129af6086c
Binary files /dev/null and b/apps/docs/public/img/ai/scaling/engineering-for-scale--single-database--dark.png differ
diff --git a/apps/docs/public/img/ai/scaling/engineering-for-scale--single-database--light.png b/apps/docs/public/img/ai/scaling/engineering-for-scale--single-database--light.png
new file mode 100644
index 00000000000..3904dc55df7
Binary files /dev/null and b/apps/docs/public/img/ai/scaling/engineering-for-scale--single-database--light.png differ
diff --git a/apps/docs/public/img/ai/scaling/engineering-for-scale--with-secondaries--dark.png b/apps/docs/public/img/ai/scaling/engineering-for-scale--with-secondaries--dark.png
new file mode 100644
index 00000000000..13ec1f62caf
Binary files /dev/null and b/apps/docs/public/img/ai/scaling/engineering-for-scale--with-secondaries--dark.png differ
diff --git a/apps/docs/public/img/ai/scaling/engineering-for-scale--with-secondaries--light.png b/apps/docs/public/img/ai/scaling/engineering-for-scale--with-secondaries--light.png
new file mode 100644
index 00000000000..0fbb415fdb5
Binary files /dev/null and b/apps/docs/public/img/ai/scaling/engineering-for-scale--with-secondaries--light.png differ