From 9cb7a7ce823d5d58a654c0d89f54f643d576a8cd Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sat, 16 Sep 2023 21:27:16 +0300 Subject: [PATCH 01/11] Changed DB titles --- .../docs/products/databases/permissions/+page.markdoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/routes/docs/products/databases/permissions/+page.markdoc b/src/routes/docs/products/databases/permissions/+page.markdoc index a3425d1fa9..e0f95a5074 100644 --- a/src/routes/docs/products/databases/permissions/+page.markdoc +++ b/src/routes/docs/products/databases/permissions/+page.markdoc @@ -5,7 +5,7 @@ description: This is the description used for SEO. difficulty: beginner readtime: 5 --- -## Permissions + Permissions define who can access documents in a collection. By default **no permissions** are granted to any users, so no user can access any documents. Permissions exist at two levels, collection level and document level permissions. @@ -13,7 +13,7 @@ In Appwrite, permissions are **granted**, meaning a user has no access by defaul A user with access granted at either collection level or document level will be able to access a document. Users **don't need access at both levels** to access documents. -## Collection Level Permissions +## Collection Level {% #collection-level %} Collection level permissions apply to every document in the collection. If a user has read, create, update, or delete permissions at the collection level, the user can access **all documents** inside the collection. @@ -21,7 +21,7 @@ Configure collection level permissions by navigating to **Your collection** > ** [Learn more about permissions and roles](TODO) -## Document Level Permissions +## Document Level {% #document-level %} Document level permissions grant access to individual documents. If a user has read, create, update, or delete permissions at the document level, the user can access the **individual document**. From 716b612b54cc739ae1de10664d644cb5fa351bc9 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sat, 16 Sep 2023 21:55:06 +0300 Subject: [PATCH 02/11] Fixed titles --- .../docs/products/databases/permissions/+page.markdoc | 4 ++-- src/routes/docs/products/storage/permissions/+page.markdoc | 6 +++--- .../docs/products/storage/upload-download/+page.markdoc | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/routes/docs/products/databases/permissions/+page.markdoc b/src/routes/docs/products/databases/permissions/+page.markdoc index e0f95a5074..c5849b67bf 100644 --- a/src/routes/docs/products/databases/permissions/+page.markdoc +++ b/src/routes/docs/products/databases/permissions/+page.markdoc @@ -13,7 +13,7 @@ In Appwrite, permissions are **granted**, meaning a user has no access by defaul A user with access granted at either collection level or document level will be able to access a document. Users **don't need access at both levels** to access documents. -## Collection Level {% #collection-level %} +## Collection level {% #collection-level %} Collection level permissions apply to every document in the collection. If a user has read, create, update, or delete permissions at the collection level, the user can access **all documents** inside the collection. @@ -21,7 +21,7 @@ Configure collection level permissions by navigating to **Your collection** > ** [Learn more about permissions and roles](TODO) -## Document Level {% #document-level %} +## Document level {% #document-level %} Document level permissions grant access to individual documents. If a user has read, create, update, or delete permissions at the document level, the user can access the **individual document**. diff --git a/src/routes/docs/products/storage/permissions/+page.markdoc b/src/routes/docs/products/storage/permissions/+page.markdoc index 46cb577392..a33d4bd138 100644 --- a/src/routes/docs/products/storage/permissions/+page.markdoc +++ b/src/routes/docs/products/storage/permissions/+page.markdoc @@ -5,7 +5,7 @@ description: This is the description used for SEO. difficulty: beginner readtime: 5 --- -## Permissions + Permissions define who can access files within a bucket. By default **no permissions** are granted to any users, so no user can access any files. Permissions exist at two levels, bucket level and file level permissions. @@ -13,7 +13,7 @@ In Appwrite, permissions are **granted**, meaning a user has no access by defaul A user with access granted at either bucket level or file level will be able to access a file. Users **don't need access at both levels** to access files. -## Bucket Level Permissions +## Bucket level {% #bucket-level %} Bucket level permissions apply to every file in the bucket. If a user has read, create, update, or delete permissions at the bucket level, the user can access **all files** inside the bucket. @@ -21,7 +21,7 @@ Configure bucket level permissions by navigating to **Your bucket** > **Settings [Learn more about permissions and roles](TODO) -## File Level Permissions +## File level {% #file-level %} File level permissions grant access to individual files. If a user has read, create, update, or delete permissions at the file level, the user can access the **individual file**. diff --git a/src/routes/docs/products/storage/upload-download/+page.markdoc b/src/routes/docs/products/storage/upload-download/+page.markdoc index 85f85da647..bc201ab57f 100644 --- a/src/routes/docs/products/storage/upload-download/+page.markdoc +++ b/src/routes/docs/products/storage/upload-download/+page.markdoc @@ -8,7 +8,7 @@ readtime: 15 You can upload and download files both programmatically using SDKs or through the Appwrite Console. -## Create file {% create-file %} +## Create file {% #create-file %} After you create a bucket or have navigated to bucket details, you can access the **Files** tab so you can upload, view, delete and update files in the bucket using the Appwrite project's dashboard. You can also perform all those operations from Appwrite's client SDK, server SDKs, and REST APIs as long as you have the proper permission. @@ -124,7 +124,7 @@ You can also upload files programmatically using our SDKs: During testing, you might prefer to create documents in the Appwrite Console. To do so, navigate to the **Documents** tab of your collection and click the **Add document** button. -## Handle large files {% #large-files %} +## Large files {% #large-files %} When you are trying to upload any files above 5MB, you will need to upload them in chunks for better reliability and performance. If you're using an Appwrite SDK, this is handled automatically. If you're not using an SDK, you can [learn more about REST API file handling](TODO). From 1e579a4de6705e4a8036e03816caad87ece33a1f Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sat, 16 Sep 2023 21:55:17 +0300 Subject: [PATCH 03/11] Minor style fixes --- src/scss/7-components/_code-snippet.scss | 2 +- src/scss/7-components/_inline-info.scss | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scss/7-components/_code-snippet.scss b/src/scss/7-components/_code-snippet.scss index 5595db662c..734f6a6953 100644 --- a/src/scss/7-components/_code-snippet.scss +++ b/src/scss/7-components/_code-snippet.scss @@ -13,7 +13,7 @@ &-end { display:flex; align-items:center; } } &-content { - padding:pxToRem(8); background-color:hsl(var(--p-code-snippet-bg-color)); + padding:pxToRem(15); background-color:hsl(var(--p-code-snippet-bg-color)); border:solid pxToRem(1) hsl(var(--p-code-snippet-border-color)); border-block-start-width:0; border-end-start-radius:pxToRem(12); border-end-end-radius:pxToRem(12); overflow-x:scroll; code { white-space:pre; } diff --git a/src/scss/7-components/_inline-info.scss b/src/scss/7-components/_inline-info.scss index 4f3de5377d..03b4d553c4 100644 --- a/src/scss/7-components/_inline-info.scss +++ b/src/scss/7-components/_inline-info.scss @@ -1,6 +1,7 @@ @use '../abstract' as *; .#{$p}-inline-info { + >:last-child { margin-block-end:0!important;} --p-inline-info-bg-color: var(--aw-color-white) / 0.04; --p-inline-info-border-color: var(--aw-color-greyscale-250); From bab031d1885d1e47275e7a2d982a70ffe3c2dce6 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sat, 16 Sep 2023 22:07:48 +0300 Subject: [PATCH 04/11] Fixed title --- src/routes/docs/products/databases/quick-start/+page.markdoc | 1 + src/routes/docs/tooling/assistant/+page.markdoc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/docs/products/databases/quick-start/+page.markdoc b/src/routes/docs/products/databases/quick-start/+page.markdoc index 397ac62d24..b0c774e248 100644 --- a/src/routes/docs/products/databases/quick-start/+page.markdoc +++ b/src/routes/docs/products/databases/quick-start/+page.markdoc @@ -124,6 +124,7 @@ func main() async throws { {% /multicode %} The response should look similar to this. + ```json { title: 'Hamlet', diff --git a/src/routes/docs/tooling/assistant/+page.markdoc b/src/routes/docs/tooling/assistant/+page.markdoc index d14bcbddbf..9993e6fb1d 100644 --- a/src/routes/docs/tooling/assistant/+page.markdoc +++ b/src/routes/docs/tooling/assistant/+page.markdoc @@ -10,7 +10,7 @@ The **Appwrite Assistant** is an AI-powered tool engineered to augment Appwrite- While the Appwrite Assistant remains under active development and is considered experimental, it undergoes incremental refinement. Its proficiency in comprehending user queries and delivering relevant responses improves with sustained usage. {% /info %} -## Getting Started {% #getting-started %} +## Getting started {% #getting-started %} To engage the Appwrite Assistant, access the Command Center within your Appwrite console, and proceed to the `Ask the AI` tab in the navigation. From 2662bb490f94cfc99a91678fa6040d31eebd2853 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sat, 16 Sep 2023 23:09:21 +0300 Subject: [PATCH 05/11] Added missing sections from the REST guide --- src/routes/docs/apis/rest/+page.markdoc | 204 ++++++++++++++++++++++-- 1 file changed, 191 insertions(+), 13 deletions(-) diff --git a/src/routes/docs/apis/rest/+page.markdoc b/src/routes/docs/apis/rest/+page.markdoc index 5144b9a7d8..1f3a36fc3c 100644 --- a/src/routes/docs/apis/rest/+page.markdoc +++ b/src/routes/docs/apis/rest/+page.markdoc @@ -17,27 +17,27 @@ Appwrite's REST APIs expect certain headers to be included with each request: * * Description --- -* `X-Appwrite-Project: [PROJECT-ID]` +* X-Appwrite-Project: [PROJECT-ID] * required * The ID of your Appwrite project --- -* `Content-Type: application/json` +* Content-Type: application/json * required * Content type of the HTTP request. Would usually be `application/json`. --- -* `X-Appwrite-Key: [API-KEY]` +* X-Appwrite-Key: [API-KEY] * optional * API key used for server authentication. Your API key is a secret, **do not** use it in client applications. --- -* `X-Appwrite-JWT: [TOKEN]` +* X-Appwrite-JWT: [TOKEN] * optional * Token used for JWT authentication, tokens can be generated using the [Create JWT](/docs/products/auth/jwt) method. --- -* `X-Appwrite-Response-Format: [VERSION-NUMBER]` +* X-Appwrite-Response-Format: [VERSION-NUMBER] * optional * Version number used for backward compatibility. The response will be formatted to be compatible with the provided version number. This helps Appwrite SDKs keep backward compatibility with Appwrite server API version. --- -* `X-Fallback-Cookies: [FALLBACK-COOKIES]` +* X-Fallback-Cookies: [FALLBACK-COOKIES] * optional * Fallback cookies used in scenarios where browsers do not allow third-party cookies. Often used when there is no Custom Domain set for your Appwrite API. --- @@ -45,6 +45,8 @@ Appwrite's REST APIs expect certain headers to be included with each request: ## Authentication {% #authentication %} +Appwrite supports multiple authentication methods, including account sessions, API keys, and JWTs. The authentication method you use depends on your use case. Below are examples showing how you can authenticate using the REST API. + ### Client side You can create account sessions with POST requests to the Account API. Sessions are persisted using secured cookies. You can learn more about session persistence in the Authentication Guide. @@ -113,28 +115,84 @@ Upload endpoints in Appwrite, such as [Create File](todo) and [Create Deployment * * Description --- -* `X-Appwrite-Project: [PROJECT-ID]` +* X-Appwrite-Project: [PROJECT-ID] * required * The ID of your Appwrite project --- -* `Content-Type: multipart/form-data; boundary=[FORM-BOUNDARY]` +* Content-Type: multipart/form-data; boundary=[FORM-BOUNDARY] * required * Contains the content type of the HTTP request and provides a [boundary](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) that is used to parse the form data. --- -* `Content-Range: bytes [BYTE-RANGE]` +* Content-Range: bytes [BYTE-RANGE] * required * Contains information about which bytes are being transmitted in this chunk, with the format `[FIRST-BYTE]-[LAST-BYTE]/[TOTAL-BYTES]`. --- -* `X-Appwrite-ID: [FILE-ID]` +* X-Appwrite-ID: [FILE-ID] * required * Contains ID of the file this chunk belongs to. --- -* `X-Appwrite-Key: [API-KEY]` +* X-Appwrite-Key: [API-KEY] * optional * API key used for server authentication. Your API key is a secret, **do not** use it in client applications. {% /table %} +The multipart form data is structured as follows: + +{% table %} +* Key +* +* Value +* File Name +* Description +--- +* fileId +* optional +* [FILE-ID] +* N/A +* Contains the file ID of the new file. Only used by file chunks following the first chunk uploaded. +--- +* file +* required +* [CHUNK-DATA] +* [FILE-NAME] +* Contains file chunk data. +--- +* permissions +* required +* [PERMISSION ARRAY] +* N/A +* Contains an array of permission strings about who can access the new file. + +{% /table %} + +While cURL and fetch are great tools to explore other REST endpoints, it's impractical to use for chunked file uploads because you need to split files into chunks. + +The multipart form data posted to file upload endpoints have the following format: + +```json +POST /v1/storage/buckets/default/files HTTP/1.1 +Content-Type: multipart/form-data; boundary=----WebKitFormBoundarye0m6iNBQNHlzTpVM +X-Appwrite-Project: demo-project +Content-Range: bytes 10485760-12582912/12582912 +X-Appwrite-ID: 6369b0bc1dcf4ff59051 + +------WebKitFormBoundarye0m6iNBQNHlzTpVM +Content-Disposition: form-data; name="fileId" + +unique() +------WebKitFormBoundarye0m6iNBQNHlzTpVM +Content-Disposition: form-data; name="file"; filename="file.txt" +Content-Type: application/octet-stream + +[CHUNKED-DATA] +------WebKitFormBoundarye0m6iNBQNHlzTpVM +Content-Disposition: form-data; name="permissions[]" + +read("user:627a958ded6424a98a9f") +------WebKitFormBoundarye0m6iNBQNHlzTpVM-- +``` + ## Images {% #images %} Some use cases do not allow custom headers, such as embedding images from Appwrite in HTML. In these cases, you can provide the Appwrite project ID using the query parameter project. @@ -145,8 +203,66 @@ Some use cases do not allow custom headers, such as embedding images from Appwri ## Permissions {% #permissions %} +Appwrite SDKs have helpers to generate permission string formats, but when using Appwrite without SDKs, you'd need to create the strings yourself. + +{% table %} +* Query method +* API string +--- +* `Permission.read()` +* `read("[PERMISSION_ROLE]")` +--- +* `Permission.create()` +* `read("[PERMISSION_ROLE]")` +--- +* `Permission.update()` +* `update("[PERMISSION_ROLE]")` +--- +* `Permission.delete()` +* `delete("[PERMISSION_ROLE]")` +--- +* `Permission.write()` +* `write("[PERMISSION_ROLE]")` +--- +{% /table %} + ### Roles +Appwrite SDKs have helpers to generate roles string formats, but when using Appwrite without SDKs, you'd need to create the strings yourself. + +{% table %} +* Role method +* API string +--- +* `Role.any()` +* `any` +--- +* `Role.guests()` +* `guests` +--- +* `Role.users()` +* `users` +--- +* `Role.users([STATUS])` +* `users/[STATUS]` +--- +* `Role.user([USER_ID])` +* `user:[USER_ID]` +--- +* `Role.user([USER_ID], [STATUS])` +* `user:[USER_ID]/[STATUS]` +--- +* `Role.team([TEAM_ID])` +* `team:[TEAM_ID]` +--- +* `Role.team([TEAM_ID], [ROLE])` +* `team:[TEAM_ID]/[ROLE]` +--- +* `Role.member([MEMBERSHIP_ID])` +* `member:[MEMBERSHIP_ID]` +--- +{% /table %} + ## Unique ID {% #unique-id %} Appwrite's SDKs have a helper `ID.unique()` to generate unique IDs. When using Appwrite without an SDK, pass the string `"unique()"` into the ID parameter. @@ -157,9 +273,71 @@ Appwrite's SDKs provide a `Query` class to generate query strings. When using Ap Query strings are passed to Appwrite using the `queries` parameter. You can attach multiple query strings by including the array parameter multiple times in the query string: `queries[]="..."&queries[]="..."` -{% info title="Best practice" %} -When using greater than, greater than or equal to, less than, or less than or equal to, it is not recommended to pass in multiple values. While the API will accept multiple values and return results with or logic, it's best practice to pass in only one value for performance reasons. +{% table %} +* Query method +* API string +--- +* select +* `select([attribute])` +--- +* equal +* `equal("attribute", [value])` +--- +* notEqual +* `notEqual("attribute", [value])` +--- +* lessThan +* `lessThan("attribute", [value])` +--- +* lessThanEqual +* `lessThanEqual("attribute", [value])` +--- +* greaterThan +* `greaterThan("attribute", [value])` +--- +* greaterThanEqual +* `greaterThanEqual("attribute", [value])` +--- +* between +* `between("attribute", lowerBound, upperBound)` +--- +* isNull +* `isNull("attribute")` +--- +* isNotNull +* `isNotNull("attribute")` +--- +* startsWith +* `startsWith("attribute", [value])` +--- +* endsWith +* `endsWith("attribute", [value])` +--- +* search +* `search("attribute", [value])` +--- +* orderDesc +* `orderDesc("attribute")` +--- +* orderAsc +* `orderAsc("attribute")` +--- +* cursorAfter +* `cursorAfter("documentId")` +--- +* cursorBefore +* `cursorBefore("documentId")` +--- +* limit +* `limit(0)` +--- +* offset +* `offset(0)` +--- +{% /table %} +{% info title="Best practice" %} +When using greater than, greater than or equal to, less than, or less than or equal to, it is not recommended to pass in multiple values. While the API will accept multiple values and return results with **or logic**, it's best practice to pass in only one value for performance reasons. {% /info %} From 81f3ce2f4299b8ccf63e50cba633f08ad3e70885 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sat, 16 Sep 2023 23:15:19 +0300 Subject: [PATCH 06/11] Added GraphQL page --- src/routes/docs/apis/graphql/+page.markdoc | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/routes/docs/apis/graphql/+page.markdoc diff --git a/src/routes/docs/apis/graphql/+page.markdoc b/src/routes/docs/apis/graphql/+page.markdoc new file mode 100644 index 0000000000..577023ff84 --- /dev/null +++ b/src/routes/docs/apis/graphql/+page.markdoc @@ -0,0 +1,9 @@ +--- +layout: article +title: GraphQL +description: +difficulty: beginner +readtime: 10 +--- + +Appwrite supports multiple protocols for accessing the server, including [REST](/docs/apis/rest), [GraphQL](/docs/apis/graphql), and [Realtime](/docs/apis/realtime). The GraphQL API allows you to query and mutate any resource type on your Appwrite server through the endpoint `/v1/graphql`. Every endpoint available through REST is available through GraphQL, except for OAuth. From 1e0f33bcca269b666192c1802104d6312d599bfc Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sat, 16 Sep 2023 23:36:11 +0300 Subject: [PATCH 07/11] GraphQL - wip --- src/routes/docs/apis/graphql/+page.markdoc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/routes/docs/apis/graphql/+page.markdoc b/src/routes/docs/apis/graphql/+page.markdoc index 577023ff84..1a9c2806c0 100644 --- a/src/routes/docs/apis/graphql/+page.markdoc +++ b/src/routes/docs/apis/graphql/+page.markdoc @@ -7,3 +7,24 @@ readtime: 10 --- Appwrite supports multiple protocols for accessing the server, including [REST](/docs/apis/rest), [GraphQL](/docs/apis/graphql), and [Realtime](/docs/apis/realtime). The GraphQL API allows you to query and mutate any resource type on your Appwrite server through the endpoint `/v1/graphql`. Every endpoint available through REST is available through GraphQL, except for OAuth. + +{% info title="GraphQL Model Parameters" %} +In Appwrite's GraphQL API, all internal model parameters are prefixed with `_` instead of `$` because `$` is reserved by GraphQL. +{% /info %} + +## Requests {% #requests %} +Although every query executes through the same endpoint, there are multiple ways to make a GraphQL request. All requests, however, share a common structure. + +Name Type Description +query required string The GraphQL query to execute. +operationName optional string If the query contains several named operations, controls which one to execute. +variables optional object An object containing variable names and values for the query. Variables are made available to your query with the $ prefix. + + +For example, `$collectionId` in the REST API would be referenced as `_collectionId` in the GraphQL API. + +### GET +You can execute a GraphQL query via a GET request, passing a query and optionally operationName and variables as query parameters. + +### POST +There are multiple ways to make a GraphQL POST request, differentiated by content type. \ No newline at end of file From a543c25a36ebe04146ac5ccb651e5f100506a50e Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sat, 16 Sep 2023 23:40:43 +0300 Subject: [PATCH 08/11] Fixed types --- src/routes/docs/+page.svelte | 4 ++-- src/routes/docs/Sidebar.svelte | 2 +- .../docs/products/migrations/+page.markdoc | 4 ++-- .../products/migrations/nhost/+page.markdoc | 20 +++++++++---------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/routes/docs/+page.svelte b/src/routes/docs/+page.svelte index 0286a025a5..c8267101f8 100644 --- a/src/routes/docs/+page.svelte +++ b/src/routes/docs/+page.svelte @@ -473,7 +473,7 @@
  • -

    Superbase

    +

    Supabase

    Lorem ipsum dolor sit amet consectetur.

    @@ -481,7 +481,7 @@
  • -

    NHost

    +

    Nhost

    Lorem ipsum dolor sit amet consectetur.

    diff --git a/src/routes/docs/Sidebar.svelte b/src/routes/docs/Sidebar.svelte index 90ca8c89c1..c326dcf635 100644 --- a/src/routes/docs/Sidebar.svelte +++ b/src/routes/docs/Sidebar.svelte @@ -307,7 +307,7 @@ href: '/docs/products/migrations/supabase' }, { - label: 'From NHost', + label: 'From Nhost', href: '/docs/products/migrations/nhost' }, { diff --git a/src/routes/docs/products/migrations/+page.markdoc b/src/routes/docs/products/migrations/+page.markdoc index 12758fc0db..447dabebad 100644 --- a/src/routes/docs/products/migrations/+page.markdoc +++ b/src/routes/docs/products/migrations/+page.markdoc @@ -6,7 +6,7 @@ difficulty: beginner readtime: 5 --- -If you're looking to migrate existing projects to Appwrite, Migrations can help you make the move more quickly. You can move your app from Firebase, Supabase, NHost, and even move between self-hosted and Cloud projects using Migrations. You can also use Migrations to move between two self-hosted instances or even to duplicate projects on the same instance. Migrations will automatically move accounts, database documents, and storage files from one source to another. +If you're looking to migrate existing projects to Appwrite, Migrations can help you make the move more quickly. You can move your app from Firebase, Supabase, Nhost, and even move between self-hosted and Cloud projects using Migrations. You can also use Migrations to move between two self-hosted instances or even to duplicate projects on the same instance. Migrations will automatically move accounts, database documents, and storage files from one source to another. ## Sources {% #sources %} @@ -16,7 +16,7 @@ Appwrite supports multiple source destinations for migrating your data. You can |--------|-------|-----------|-----------|-------|-----------| | [Firebase](/docs/products/migrations/firebase) | enabled | enabled | partial | enabled | manual | | [Supabase](/docs/products/migrations/supabase) | enabled | enabled | partial | enabled | manual | -| [NHost](/docs/products/migrations/nhost) | enabled | enabled | partial | enabled | manual | +| [Nhost](/docs/products/migrations/nhost) | enabled | enabled | partial | enabled | manual | | [Cloud](/docs/products/migrations/cloud) | enabled | enabled | enabled | enabled | enabled | | [Self-hosted](/docs/products/migrations/self-hosted) | enabled | enabled | enabled | enabled | enabled | diff --git a/src/routes/docs/products/migrations/nhost/+page.markdoc b/src/routes/docs/products/migrations/nhost/+page.markdoc index 9d6ba193fa..6c8c2522c9 100644 --- a/src/routes/docs/products/migrations/nhost/+page.markdoc +++ b/src/routes/docs/products/migrations/nhost/+page.markdoc @@ -1,6 +1,6 @@ --- layout: article -title: Migrate from NHost +title: Migrate from Nhost description: Learn how to migrate your Nhost project to Appwrite Cloud. difficulty: beginner readtime: 20 @@ -13,25 +13,25 @@ When you migrate data from Nhost to Appwrite Cloud, the resource usage during th {% /info %} {% section #obtain-credentials step=1 title="Obtain credentials" %} -Find all of the following credentials from your NHost project. +Find all of the following credentials from your Nhost project. | Field | Description | | --------------- | -------------------------------------------------------------------------------------------------------------- | -| **Region** | The region your NHost project is hosted in. This can be found in your NHost project environment variables as `NHOST_REGION`. | -| **Subdomain** | The subdomain of your NHost project. This can be found in your NHost project environment variables as `NHOST_SUBDOMAIN`. | -| **Database** | The name of your NHost database. This can be found in your NHost project Database settings. | -| **Username** | The username of your NHost database. This can be found in your NHost project Database settings. | -| **Password** | The password of your NHost database. You set this when you created your NHost project, if you don't remember it you can reset it from your NHost project Database settings. | -| **Admin Secret** | The admin secret of your NHost project. This can be found in your NHost project environment variables as `NHOST_ADMIN_SECRET`. We use this to transfer your NHost files to Appwrite. | +| **Region** | The region your Nhost project is hosted in. This can be found in your Nhost project environment variables as `NHOST_REGION`. | +| **Subdomain** | The subdomain of your Nhost project. This can be found in your Nhost project environment variables as `NHOST_SUBDOMAIN`. | +| **Database** | The name of your Nhost database. This can be found in your Nhost project Database settings. | +| **Username** | The username of your Nhost database. This can be found in your Nhost project Database settings. | +| **Password** | The password of your Nhost database. You set this when you created your Nhost project, if you don't remember it you can reset it from your Nhost project Database settings. | +| **Admin Secret** | The admin secret of your Nhost project. This can be found in your Nhost project environment variables as `NHOST_ADMIN_SECRET`. We use this to transfer your Nhost files to Appwrite. | {% /section %} -{% section #migration-process step=2 title="Migrating to Appwrite from NHost" %} +{% section #migration-process step=2 title="Migrating to Appwrite from Nhost" %} To begin migrating to Appwrite make sure to read the [migration overview](/docs/migrations) and [things to keep in mind](#notices) sections above. 1. Create a new project and click on the **Migrations** tab in **Project Settings**. -1. Click on the **Create Migration** button and select **NHost** as your source. +1. Click on the **Create Migration** button and select **Nhost** as your source. 1. Enter the credentials following the [instructions below](#credentials) and click **Next**. From b5d3fce606b826afc2cff0366ba106ae50325bca Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 17 Sep 2023 08:26:06 +0300 Subject: [PATCH 09/11] Changed Mac OS to macOS --- src/routes/docs/+page.svelte | 2 +- src/routes/docs/advanced/self-hosting/+page.markdoc | 2 +- src/routes/docs/advanced/self-hosting/install/+page.markdoc | 2 +- src/routes/docs/products/migrations/+page.markdoc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/routes/docs/+page.svelte b/src/routes/docs/+page.svelte index c8267101f8..c61ccb3416 100644 --- a/src/routes/docs/+page.svelte +++ b/src/routes/docs/+page.svelte @@ -457,7 +457,7 @@
    • -

      Self-hosted

      +

      Self hosted

      Lorem ipsum dolor sit amet consectetur.

      diff --git a/src/routes/docs/advanced/self-hosting/+page.markdoc b/src/routes/docs/advanced/self-hosting/+page.markdoc index c4eded380d..fb3034ac46 100644 --- a/src/routes/docs/advanced/self-hosting/+page.markdoc +++ b/src/routes/docs/advanced/self-hosting/+page.markdoc @@ -22,7 +22,7 @@ Appwrite requires [Docker Compose Version 2](https://docs.docker.com/compose/ins Set up your first Appwrite instance with a single Docker command. {% tabs %} -{% tabsitem #unix title="Mac OS and Linux" %} +{% tabsitem #unix title="macOS and Linux" %} ### Bash ```sh docker run -it --rm \ diff --git a/src/routes/docs/advanced/self-hosting/install/+page.markdoc b/src/routes/docs/advanced/self-hosting/install/+page.markdoc index 92875f568f..87e26c3a9b 100644 --- a/src/routes/docs/advanced/self-hosting/install/+page.markdoc +++ b/src/routes/docs/advanced/self-hosting/install/+page.markdoc @@ -29,7 +29,7 @@ You will be prompted to configure the following during the setup command: {% tabs %} -{% tabsitem #unix title="Mac OS and Linux" %} +{% tabsitem #unix title="macOS and Linux" %} ### Bash ```sh docker run -it --rm \ diff --git a/src/routes/docs/products/migrations/+page.markdoc b/src/routes/docs/products/migrations/+page.markdoc index 447dabebad..bf8ab50240 100644 --- a/src/routes/docs/products/migrations/+page.markdoc +++ b/src/routes/docs/products/migrations/+page.markdoc @@ -18,7 +18,7 @@ Appwrite supports multiple source destinations for migrating your data. You can | [Supabase](/docs/products/migrations/supabase) | enabled | enabled | partial | enabled | manual | | [Nhost](/docs/products/migrations/nhost) | enabled | enabled | partial | enabled | manual | | [Cloud](/docs/products/migrations/cloud) | enabled | enabled | enabled | enabled | enabled | -| [Self-hosted](/docs/products/migrations/self-hosted) | enabled | enabled | enabled | enabled | enabled | +| [Self hosted](/docs/products/migrations/self-hosted) | enabled | enabled | enabled | enabled | enabled | ## Limitations {% #limitations %} From 9abffc198c0aed7271bf9af6d9f44ef330fbbfac Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 17 Sep 2023 14:22:00 +0300 Subject: [PATCH 10/11] Removed the advanced namespace --- src/routes/docs/+layout.svelte | 4 ++-- src/routes/docs/Sidebar.svelte | 22 +++++++++---------- .../{advanced => }/self-hosting/+page.markdoc | 4 ++-- .../self-hosting/debug/+page.markdoc | 0 .../self-hosting/email/+page.markdoc | 0 .../self-hosting/functions/+page.markdoc | 0 .../self-hosting/install/+page.markdoc | 2 +- .../self-hosting/production/+page.markdoc | 0 .../self-hosting/sms/+page.markdoc | 0 .../self-hosting/storage/+page.markdoc | 0 .../tls-certificates}/+page.markdoc | 0 .../self-hosting/update/+page.markdoc | 0 12 files changed, 16 insertions(+), 16 deletions(-) rename src/routes/docs/{advanced => }/self-hosting/+page.markdoc (97%) rename src/routes/docs/{advanced => }/self-hosting/debug/+page.markdoc (100%) rename src/routes/docs/{advanced => }/self-hosting/email/+page.markdoc (100%) rename src/routes/docs/{advanced => }/self-hosting/functions/+page.markdoc (100%) rename src/routes/docs/{advanced => }/self-hosting/install/+page.markdoc (99%) rename src/routes/docs/{advanced => }/self-hosting/production/+page.markdoc (100%) rename src/routes/docs/{advanced => }/self-hosting/sms/+page.markdoc (100%) rename src/routes/docs/{advanced => }/self-hosting/storage/+page.markdoc (100%) rename src/routes/docs/{advanced/self-hosting/certificates => self-hosting/tls-certificates}/+page.markdoc (100%) rename src/routes/docs/{advanced => }/self-hosting/update/+page.markdoc (100%) diff --git a/src/routes/docs/+layout.svelte b/src/routes/docs/+layout.svelte index acbf0599b2..0aa0f227d5 100644 --- a/src/routes/docs/+layout.svelte +++ b/src/routes/docs/+layout.svelte @@ -10,10 +10,10 @@ const isQuickstart = pathname.includes('/quick-start/'); const isProduct = pathname.includes('/products/') || pathname.includes('/article'); const isTooling = pathname.includes('/tooling'); - const isAdvanced = pathname.includes('/advanced/'); + const isSelfHosting = pathname.includes('/self-hosting'); const isReference = pathname.includes('/reference'); - if (isTutorial || isProduct || isAPIs || isSDKs || isQuickstart || isTooling || isAdvanced) { + if (isTutorial || isProduct || isAPIs || isSDKs || isQuickstart || isTooling || isSelfHosting) { return 'two-side-navs'; } else if (isReference) { return 'expanded'; diff --git a/src/routes/docs/Sidebar.svelte b/src/routes/docs/Sidebar.svelte index c326dcf635..5c44bba4ec 100644 --- a/src/routes/docs/Sidebar.svelte +++ b/src/routes/docs/Sidebar.svelte @@ -323,44 +323,44 @@ }, { label: 'Self-hosting', - href: '/docs/advanced/self-hosting', + href: '/docs/self-hosting', icon: 'icon-server', items: [ { label: 'Install', - href: '/docs/advanced/self-hosting/install' + href: '/docs/self-hosting/install' }, { label: 'Email delivery', - href: '/docs/advanced/self-hosting/email' + href: '/docs/self-hosting/email' }, { label: 'SMS delivery', - href: '/docs/advanced/self-hosting/sms' + href: '/docs/self-hosting/sms' }, { label: 'Functions', - href: '/docs/advanced/self-hosting/functions' + href: '/docs/self-hosting/functions' }, { label: 'Storage', - href: '/docs/advanced/self-hosting/storage' + href: '/docs/self-hosting/storage' }, { - label: 'TLS certificates', - href: '/docs/advanced/self-hosting/certificates' + label: 'TLS Certificates', + href: '/docs/self-hosting/tls-certificates' }, { label: 'Update', - href: '/docs/advanced/self-hosting/update' + href: '/docs/self-hosting/update' }, { label: 'Debug', - href: '/docs/advanced/self-hosting/debug' + href: '/docs/self-hosting/debug' }, { label: 'Production', - href: '/docs/advanced/self-hosting/production' + href: '/docs/self-hosting/production' }, ] } diff --git a/src/routes/docs/advanced/self-hosting/+page.markdoc b/src/routes/docs/self-hosting/+page.markdoc similarity index 97% rename from src/routes/docs/advanced/self-hosting/+page.markdoc rename to src/routes/docs/self-hosting/+page.markdoc index fb3034ac46..5848bb0c12 100644 --- a/src/routes/docs/advanced/self-hosting/+page.markdoc +++ b/src/routes/docs/self-hosting/+page.markdoc @@ -1,7 +1,7 @@ --- layout: article title: Self-hosting -description: Learn how to integrate Appwrite in your application with one of the supported SDKs. +description: Learn how to self host Appwrite on your own server using your favorite cloud provider. --- Appwrite was designed from the ground up with self-hosting in mind. @@ -89,7 +89,7 @@ If you expect large volumes of data or the need to have scalable data storage, y [Configure Appwrite Storage {% icon icon="cheveron-right" /%}](TODO) -## TLS certificates +## TLS Certificates Appwrite uses Let's Encrypt to auto-generate TLS certificates for your Appwrite instance to ensure your API traffic is appropriately encrypted. Configuration is required for Appwrite to properly generate certificates. diff --git a/src/routes/docs/advanced/self-hosting/debug/+page.markdoc b/src/routes/docs/self-hosting/debug/+page.markdoc similarity index 100% rename from src/routes/docs/advanced/self-hosting/debug/+page.markdoc rename to src/routes/docs/self-hosting/debug/+page.markdoc diff --git a/src/routes/docs/advanced/self-hosting/email/+page.markdoc b/src/routes/docs/self-hosting/email/+page.markdoc similarity index 100% rename from src/routes/docs/advanced/self-hosting/email/+page.markdoc rename to src/routes/docs/self-hosting/email/+page.markdoc diff --git a/src/routes/docs/advanced/self-hosting/functions/+page.markdoc b/src/routes/docs/self-hosting/functions/+page.markdoc similarity index 100% rename from src/routes/docs/advanced/self-hosting/functions/+page.markdoc rename to src/routes/docs/self-hosting/functions/+page.markdoc diff --git a/src/routes/docs/advanced/self-hosting/install/+page.markdoc b/src/routes/docs/self-hosting/install/+page.markdoc similarity index 99% rename from src/routes/docs/advanced/self-hosting/install/+page.markdoc rename to src/routes/docs/self-hosting/install/+page.markdoc index 87e26c3a9b..75c6c5c967 100644 --- a/src/routes/docs/advanced/self-hosting/install/+page.markdoc +++ b/src/routes/docs/self-hosting/install/+page.markdoc @@ -81,7 +81,7 @@ Make these configurations to unlock the full power of Appwrite. - [Configure SMS delivery](TODO) - [Configure Appwrite Functions](TODO) - [Configure Appwrite Storage](TODO) -- [Configure TLS certificates](TODO) +- [Configure TLS Certificates](TODO) ## [Manual (using docker-compose.yml)](#manual) diff --git a/src/routes/docs/advanced/self-hosting/production/+page.markdoc b/src/routes/docs/self-hosting/production/+page.markdoc similarity index 100% rename from src/routes/docs/advanced/self-hosting/production/+page.markdoc rename to src/routes/docs/self-hosting/production/+page.markdoc diff --git a/src/routes/docs/advanced/self-hosting/sms/+page.markdoc b/src/routes/docs/self-hosting/sms/+page.markdoc similarity index 100% rename from src/routes/docs/advanced/self-hosting/sms/+page.markdoc rename to src/routes/docs/self-hosting/sms/+page.markdoc diff --git a/src/routes/docs/advanced/self-hosting/storage/+page.markdoc b/src/routes/docs/self-hosting/storage/+page.markdoc similarity index 100% rename from src/routes/docs/advanced/self-hosting/storage/+page.markdoc rename to src/routes/docs/self-hosting/storage/+page.markdoc diff --git a/src/routes/docs/advanced/self-hosting/certificates/+page.markdoc b/src/routes/docs/self-hosting/tls-certificates/+page.markdoc similarity index 100% rename from src/routes/docs/advanced/self-hosting/certificates/+page.markdoc rename to src/routes/docs/self-hosting/tls-certificates/+page.markdoc diff --git a/src/routes/docs/advanced/self-hosting/update/+page.markdoc b/src/routes/docs/self-hosting/update/+page.markdoc similarity index 100% rename from src/routes/docs/advanced/self-hosting/update/+page.markdoc rename to src/routes/docs/self-hosting/update/+page.markdoc From 18ccb8a63627f98cc778db681f00b175f2dfdbb3 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 17 Sep 2023 14:36:47 +0300 Subject: [PATCH 11/11] Remove logo from table --- src/routes/docs/self-hosting/install/+page.markdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/docs/self-hosting/install/+page.markdoc b/src/routes/docs/self-hosting/install/+page.markdoc index 75c6c5c967..6e9f0f1bb8 100644 --- a/src/routes/docs/self-hosting/install/+page.markdoc +++ b/src/routes/docs/self-hosting/install/+page.markdoc @@ -66,7 +66,7 @@ In addition to running Appwrite locally, you can also launch Appwrite using a pr Choose from one of the providers below: -Logo |Provider | Installation Link +  |Provider | Installation Link --- | --- | --- {% icon icon="digitalocean" /%}| DigitalOcean | [Click to install](https://marketplace.digitalocean.com/apps/appwrite) {% icon icon="gitpod" /%}| Gitpod | [Click to install](https://gitpod.io/#https://github.com/appwrite/integration-for-gitpod)