The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix(prettier): kotlin docs
Greg Richardson96bb86c86832
diff --git a/apps/docs/components/reference/RefFunctionSection.tsx b/apps/docs/components/reference/RefFunctionSection.tsxindex 27d13bc927f..739ad2c139e 100644--- a/apps/docs/components/reference/RefFunctionSection.tsx+++ b/apps/docs/components/reference/RefFunctionSection.tsx@@ -159,8 +159,7 @@ const RefFunctionSection: React.FC<IRefFunctionSection> = (props) => {.replace('ts', '').replace('dart', '').replace('c#', '')- .replace('kotlin', ''))- }+ .replace('kotlin', ''))}</CodeBlock>{((tables && tables.length > 0) || sql) && (diff --git a/apps/docs/docs/ref/kotlin/installing.mdx b/apps/docs/docs/ref/kotlin/installing.mdxindex 2f3e6f7d2f0..8d341ad0f63 100644--- a/apps/docs/docs/ref/kotlin/installing.mdx+++ b/apps/docs/docs/ref/kotlin/installing.mdx@@ -1,267 +1,268 @@-----id: installing-title: 'Installing & Initialization'-slug: installing-custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml-------### Add one or more modules to your project--<RefSubLayout.EducationRow>- <RefSubLayout.Examples>- <div style={{ display: 'flex', flexDirection: 'row', alignItems: 'center' }}>- <a href="https://github.com/supabase-community/supabase-kt/releases" style={{ marginRight: '8px' }}>- <img src="https://img.shields.io/github/release/supabase-community/supabase-kt?label=stable" alt="latest stable supabase-kt version"/>- </a>- <a href="https://github.com/supabase-community/supabase-kt/releases">- <img src="https://img.shields.io/maven-central/v/io.github.jan-tennert.supabase/supabase-kt?label=experimental" alt="latest supabase-kt version"/>- </a>- </div>- Add dependency to your build file:- <Tabs- size="small"- type="underlined"- defaultActiveId="kotlin">- <TabPanel id="kotlin" label="build.gradle.kts">-- ```kotlin- implementation("io.github.jan-tennert.supabase:[module]:VERSION")- ```-- </TabPanel>- <TabPanel id="groovy" label="build.gradle">-- ```groovy- implementation 'io.github.jan-tennert.supabase:[module]:VERSION'- ```-- </TabPanel>- <TabPanel id="xml" label="pom.xml">-- ```xml- <dependency>- <groupId>io.github.jan-tennert.supabase</groupId>- <artifactId>[module]</artifactId>- <version>VERSION</version>- </dependency>- ```-- </TabPanel>- </Tabs>-- The available modules are: **gotrue-kt**, **realtime-kt**, **storage-kt**, **functions-kt**, **postgrest-kt** and **apollo-graphql**-- When using multiple modules, you can also use the BOM dependency to ensure that all modules use the same version:-- <Tabs- size="small"- type="underlined"- defaultActiveId="kotlin">- <TabPanel id="kotlin" label="build.gradle.kts">-- ```kotlin- implementation(platform("io.github.jan-tennert.supabase:bom:VERSION"))- implementation("io.github.jan-tennert.supabase:postgrest-kt")- implementation("io.github.jan-tennert.supabase:realtime-kt")- ```-- </TabPanel>- <TabPanel id="groovy" label="build.gradle">-- ```groovy- implementation platform("io.github.jan-tennert.supabase:bom:VERSION")- implementation 'io.github.jan-tennert.supabase:postgrest-kt'- implementation 'io.github.jan-tennert.supabase:realtime-kt'- ```-- </TabPanel>- <TabPanel id="xml" label="pom.xml">-- ```xml- <dependency>- <groupId>io.github.jan-tennert.supabase</groupId>- <artifactId>bom</artifactId>- <version>VERSION</version>- <type>pom</type>- <scope>import</scope>- </dependency>- <dependency>- <groupId>io.github.jan-tennert.supabase</groupId>- <artifactId>postgrest-kt</artifactId>- </dependency>- <dependency>- <groupId>io.github.jan-tennert.supabase</groupId>- <artifactId>realtime-kt</artifactId>- </dependency>- ```-- </TabPanel>- </Tabs>-- </RefSubLayout.Examples>-</RefSubLayout.EducationRow>--### Add Ktor Client Engine to each of your Kotlin targets (required)---<RefSubLayout.EducationRow>- <RefSubLayout.Examples>-- You can find a list of engines [here](https://ktor.io/docs/http-client-engines.html)-- <Tabs- size="small"- type="underlined"- defaultActiveId="kotlin">- <TabPanel id="kotlin" label="build.gradle.kts">-- ```kotlin- implementation("io.ktor:ktor-client-[engine]:KTOR_VERSION")- ```-- </TabPanel>- <TabPanel id="groovy" label="build.gradle">-- ```groovy- implementation 'io.ktor:ktor-client-[engine]:KTOR_VERSION'- ```-- </TabPanel>- <TabPanel id="xml" label="pom.xml">-- ```xml- <dependency>- <groupId>io.ktor</groupId>- <artifactId>ktor-client-[engine]</artifactId>- <version>KTOR_VERSION</version>- </dependency>- ```-- </TabPanel>- </Tabs>-- Multiplatform example:-- <Tabs- size="small"- type="underlined"- defaultActiveId="kotlin">- <TabPanel id="kotlin" label="build.gradle.kts">-- ```kotlin- val commonMain by getting {- dependencies {- //supabase modules- }- }- val jvmMain by getting {- dependencies {- implementation("io.ktor:ktor-client-cio:KTOR_VERSION")- }- }- val androidMain by getting {- dependsOn(jvmMain)- }- val jsMain by getting {- dependencies {- implementation("io.ktor:ktor-client-js:KTOR_VERSION")- }- }- val iosMain by getting {- dependencies {- implementation("io.ktor:ktor-client-darwin:KTOR_VERSION")- }- }- ```-- </TabPanel>- </Tabs>-- </RefSubLayout.Examples>-</RefSubLayout.EducationRow>--### Add KotlinX Serialization (required for PostgREST and Realtime serialization)--<RefSubLayout.EducationRow>- <RefSubLayout.Examples>-- Add the serialization plugin-- <Tabs- size="small"- type="underlined"- defaultActiveId="kotlin">- <TabPanel id="kotlin" label="build.gradle.kts">-- ```kotlin- plugins {- kotlin("plugin.serialization") version "KOTLIN_VERSION"- }- ```-- </TabPanel>- <TabPanel id="groovy" label="build.gradle">-- ```groovy- plugins {- id 'org.jetbrains.kotlin.plugin.serialization' version 'KOTLIN_VERSION'- }- ```-- </TabPanel>- <TabPanel id="xml" label="pom.xml">-- ```xml- <build>- <plugins>- <plugin>- <groupId>org.jetbrains.kotlin</groupId>- <artifactId>kotlin-maven-plugin</artifactId>- <version>${kotlin.version}</version>- <executions>- <execution>- <id>compile</id>- <phase>compile</phase>- <goals>- <goal>compile</goal>- </goals>- </execution>- </executions>- <configuration>- <compilerPlugins>- <plugin>kotlinx-serialization</plugin>- </compilerPlugins>- </configuration>- <dependencies>- <dependency>- <groupId>org.jetbrains.kotlin</groupId>- <artifactId>kotlin-maven-serialization</artifactId>- <version>${kotlin.version}</version>- </dependency>- </dependencies>- </plugin>- </plugins>- </build>- ```-- </TabPanel>- </Tabs>-- Now you can create serializable classes in your project:- ```kotlin- @Serializable- data class Message(- val id: Int,- val content: String,- @SerialName("author_id")- val authorId: String- )- ```- And use them in your Supabase queries:- ```kotlin- val messages = client.postgrest["messages"].select().decodeList<Message>()- ```-- </RefSubLayout.Examples>-</RefSubLayout.EducationRow>\ No newline at end of file+---+id: installing+title: 'Installing & Initialization'+slug: installing+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml+---++### Add one or more modules to your project++<RefSubLayout.EducationRow>+ <RefSubLayout.Examples>+ <div style={{ display: 'flex', flexDirection: 'row', alignItems: 'center' }}>+ <a href="https://github.com/supabase-community/supabase-kt/releases" style={{ marginRight: '8px' }}>+ <img src="https://img.shields.io/github/release/supabase-community/supabase-kt?label=stable" alt="latest stable supabase-kt version"/>+ </a>+ <a href="https://github.com/supabase-community/supabase-kt/releases">+ <img src="https://img.shields.io/maven-central/v/io.github.jan-tennert.supabase/supabase-kt?label=experimental" alt="latest supabase-kt version"/>+ </a>+ </div>+ Add dependency to your build file:+ <Tabs+ size="small"+ type="underlined"+ defaultActiveId="kotlin">+ <TabPanel id="kotlin" label="build.gradle.kts">++ ```kotlin+ implementation("io.github.jan-tennert.supabase:[module]:VERSION")+ ```++ </TabPanel>+ <TabPanel id="groovy" label="build.gradle">++ ```groovy+ implementation 'io.github.jan-tennert.supabase:[module]:VERSION'+ ```++ </TabPanel>+ <TabPanel id="xml" label="pom.xml">++ ```xml+ <dependency>+ <groupId>io.github.jan-tennert.supabase</groupId>+ <artifactId>[module]</artifactId>+ <version>VERSION</version>+ </dependency>+ ```++ </TabPanel>+ </Tabs>++ The available modules are: **gotrue-kt**, **realtime-kt**, **storage-kt**, **functions-kt**, **postgrest-kt** and **apollo-graphql**++ When using multiple modules, you can also use the BOM dependency to ensure that all modules use the same version:++ <Tabs+ size="small"+ type="underlined"+ defaultActiveId="kotlin">+ <TabPanel id="kotlin" label="build.gradle.kts">++ ```kotlin+ implementation(platform("io.github.jan-tennert.supabase:bom:VERSION"))+ implementation("io.github.jan-tennert.supabase:postgrest-kt")+ implementation("io.github.jan-tennert.supabase:realtime-kt")+ ```++ </TabPanel>+ <TabPanel id="groovy" label="build.gradle">++ ```groovy+ implementation platform("io.github.jan-tennert.supabase:bom:VERSION")+ implementation 'io.github.jan-tennert.supabase:postgrest-kt'+ implementation 'io.github.jan-tennert.supabase:realtime-kt'+ ```++ </TabPanel>+ <TabPanel id="xml" label="pom.xml">++ ```xml+ <dependency>+ <groupId>io.github.jan-tennert.supabase</groupId>+ <artifactId>bom</artifactId>+ <version>VERSION</version>+ <type>pom</type>+ <scope>import</scope>+ </dependency>+ <dependency>+ <groupId>io.github.jan-tennert.supabase</groupId>+ <artifactId>postgrest-kt</artifactId>+ </dependency>+ <dependency>+ <groupId>io.github.jan-tennert.supabase</groupId>+ <artifactId>realtime-kt</artifactId>+ </dependency>+ ```++ </TabPanel>+ </Tabs>++ </RefSubLayout.Examples>++</RefSubLayout.EducationRow>++### Add Ktor Client Engine to each of your Kotlin targets (required)++<RefSubLayout.EducationRow>+ <RefSubLayout.Examples>++ You can find a list of engines [here](https://ktor.io/docs/http-client-engines.html)++ <Tabs+ size="small"+ type="underlined"+ defaultActiveId="kotlin">+ <TabPanel id="kotlin" label="build.gradle.kts">++ ```kotlin+ implementation("io.ktor:ktor-client-[engine]:KTOR_VERSION")+ ```++ </TabPanel>+ <TabPanel id="groovy" label="build.gradle">++ ```groovy+ implementation 'io.ktor:ktor-client-[engine]:KTOR_VERSION'+ ```++ </TabPanel>+ <TabPanel id="xml" label="pom.xml">++ ```xml+ <dependency>+ <groupId>io.ktor</groupId>+ <artifactId>ktor-client-[engine]</artifactId>+ <version>KTOR_VERSION</version>+ </dependency>+ ```++ </TabPanel>+ </Tabs>++ Multiplatform example:++ <Tabs+ size="small"+ type="underlined"+ defaultActiveId="kotlin">+ <TabPanel id="kotlin" label="build.gradle.kts">++ ```kotlin+ val commonMain by getting {+ dependencies {+ //supabase modules+ }+ }+ val jvmMain by getting {+ dependencies {+ implementation("io.ktor:ktor-client-cio:KTOR_VERSION")+ }+ }+ val androidMain by getting {+ dependsOn(jvmMain)+ }+ val jsMain by getting {+ dependencies {+ implementation("io.ktor:ktor-client-js:KTOR_VERSION")+ }+ }+ val iosMain by getting {+ dependencies {+ implementation("io.ktor:ktor-client-darwin:KTOR_VERSION")+ }+ }+ ```++ </TabPanel>+ </Tabs>++ </RefSubLayout.Examples>++</RefSubLayout.EducationRow>++### Add KotlinX Serialization (required for PostgREST and Realtime serialization)++<RefSubLayout.EducationRow>+ <RefSubLayout.Examples>++ Add the serialization plugin++ <Tabs+ size="small"+ type="underlined"+ defaultActiveId="kotlin">+ <TabPanel id="kotlin" label="build.gradle.kts">++ ```kotlin+ plugins {+ kotlin("plugin.serialization") version "KOTLIN_VERSION"+ }+ ```++ </TabPanel>+ <TabPanel id="groovy" label="build.gradle">++ ```groovy+ plugins {+ id 'org.jetbrains.kotlin.plugin.serialization' version 'KOTLIN_VERSION'+ }+ ```++ </TabPanel>+ <TabPanel id="xml" label="pom.xml">++ ```xml+ <build>+ <plugins>+ <plugin>+ <groupId>org.jetbrains.kotlin</groupId>+ <artifactId>kotlin-maven-plugin</artifactId>+ <version>${kotlin.version}</version>+ <executions>+ <execution>+ <id>compile</id>+ <phase>compile</phase>+ <goals>+ <goal>compile</goal>+ </goals>+ </execution>+ </executions>+ <configuration>+ <compilerPlugins>+ <plugin>kotlinx-serialization</plugin>+ </compilerPlugins>+ </configuration>+ <dependencies>+ <dependency>+ <groupId>org.jetbrains.kotlin</groupId>+ <artifactId>kotlin-maven-serialization</artifactId>+ <version>${kotlin.version}</version>+ </dependency>+ </dependencies>+ </plugin>+ </plugins>+ </build>+ ```++ </TabPanel>+ </Tabs>++ Now you can create serializable classes in your project:+ ```kotlin+ @Serializable+ data class Message(+ val id: Int,+ val content: String,+ @SerialName("author_id")+ val authorId: String+ )+ ```+ And use them in your Supabase queries:+ ```kotlin+ val messages = client.postgrest["messages"].select().decodeList<Message>()+ ```++ </RefSubLayout.Examples>++</RefSubLayout.EducationRow>diff --git a/apps/docs/docs/ref/kotlin/introduction.mdx b/apps/docs/docs/ref/kotlin/introduction.mdxindex 74a87b22050..2db2d789680 100644--- a/apps/docs/docs/ref/kotlin/introduction.mdx+++ b/apps/docs/docs/ref/kotlin/introduction.mdx@@ -16,18 +16,16 @@ hideTitle: trueThis reference documents every object and method available in Supabase's Kotlin Multiplatform library, [supabase-kt](https://github.com/supabase-community/supabase-kt). You can use supabase-kt to interact with your Postgres database, listen to database changes, invoke Deno Edge Functions, build login and user management functionality, and manage large files.Supported Kotlin targets:- - JVM- - Android- - iOS (Experimental)- - JS (Browser)-</div>++- JVM+- Android+- iOS (Experimental)+- JS (Browser)+ </div><div className="max-w-xl bg-slate-300 px-4 py-2 rounded-md"><p>The Kotlin client library is created and maintained by the Supabase community, and is not an official library. Please be tolerant of areas where the library is still being developed, and — as with all the libraries — feel free to contribute wherever you find issues.</p>-<p>- Huge thanks to official maintainer, [jan-tennert](https://github.com/jan-tennert).-</p>+<p>Huge thanks to official maintainer, [jan-tennert](https://github.com/jan-tennert).</p></div>-diff --git a/apps/docs/layouts/SiteLayout.tsx b/apps/docs/layouts/SiteLayout.tsxindex c20032f033e..ba0936c9d32 100644--- a/apps/docs/layouts/SiteLayout.tsx+++ b/apps/docs/layouts/SiteLayout.tsx@@ -95,8 +95,8 @@ const levelsData = {name: 'Swift Reference v1.0',},reference_kotlin_v0: {- icon: '/docs/img/icons/menu/reference-kotlin',- name: 'Kotlin Reference v0.0',+ icon: '/docs/img/icons/menu/reference-kotlin',+ name: 'Kotlin Reference v0.0',},reference_cli: {icon: '/docs/img/icons/menu/reference-cli',diff --git a/apps/docs/scripts/search/sources/index.ts b/apps/docs/scripts/search/sources/index.tsindex 59595c1393c..8b3fce5bbdb 100644--- a/apps/docs/scripts/search/sources/index.ts+++ b/apps/docs/scripts/search/sources/index.ts@@ -69,11 +69,11 @@ export async function fetchSources() {)const ktLibReferenceSource = new ClientLibReferenceSource(- 'kt-lib',- '/reference/kotlin',- { title: 'Kotlin Reference' },- '../../spec/supabase_kt_v0.yml',- '../../spec/common-client-libs-sections.json'+ 'kt-lib',+ '/reference/kotlin',+ { title: 'Kotlin Reference' },+ '../../spec/supabase_kt_v0.yml',+ '../../spec/common-client-libs-sections.json')const cliReferenceSource = new CliReferenceSource(