Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Start work Docs #401

Merged
merged 12 commits into from
Aug 15, 2023
9 changes: 6 additions & 3 deletions app/views/docs/index.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,13 @@ $cols = [
</li>
<li><a href="/docs/functions">Functions</a></li>
<li>
<a href="/docs/migration"><i class="icon-right-dir"></i> Migration</a>
<a href="/docs/migrations"><i class="icon-right-dir"></i> Migrations</a>
<ul class="margin-top-small margin-bottom-small">
<li>&nbsp;&nbsp;<a href="/docs/migration-firebase" data-selected="/docs/migration-firebase"><i class="icon-angle-circled-right margin-start-negative-tiny margin-end-tiny"></i> Firebase</a></li>
</ul>
<li>&nbsp;&nbsp;<a href="/docs/migrations-firebase" data-selected="/docs/migrations"><i class="icon-angle-circled-right margin-start-negative-tiny margin-end-tiny"></i> Firebase</a></li>
<li>&nbsp;&nbsp;<a href="/docs/migrations-supabase" data-selected="/docs/migrations"><i class="icon-angle-circled-right margin-start-negative-tiny margin-end-tiny"></i> Supabase</a></li>
<li>&nbsp;&nbsp;<a href="/docs/migrations-nhost" data-selected="/docs/migrations"><i class="icon-angle-circled-right margin-start-negative-tiny margin-end-tiny"></i> NHost</a></li>
<li>&nbsp;&nbsp;<a href="/docs/migrations-cloud-to-local" data-selected="/docs/migrations"><i class="icon-angle-circled-right margin-start-negative-tiny margin-end-tiny"></i> Cloud to Local</a></li>
<li>&nbsp;&nbsp;<a href="/docs/migrations-local-to-cloud" data-selected="/docs/migrations"><i class="icon-angle-circled-right margin-start-negative-tiny margin-end-tiny"></i> Local to Cloud</a></li>
</li>
</ul>

Expand Down
3 changes: 0 additions & 3 deletions app/views/docs/migration-firebase.phtml

This file was deleted.

Empty file.
Empty file.
60 changes: 0 additions & 60 deletions app/views/docs/migration.phtml

This file was deleted.

34 changes: 34 additions & 0 deletions app/views/docs/migrations-cloud-to-local.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<p>
Moving to a self-hosted instance? We've got you covered.
Migrations makes it as easy as a couple clicks to move all of your Appwrite Cloud project data to a self-hosted instance.
</p>

<h2><a href="#notices" id="notices">Things to keep in mind</a></h2>

<ol class="margin-top margin-bottom-large text-size-normal">
<li>Data transferred by migrations will reset `$createdAt` and `$updatedAt` timestamps to the date of the migration.</li>
<li>Your self-hosted Appwrite project must be accessible from the internet for the migration to work.</li>
<li>Migrations are non-destructive. No data will be deleted or lost in the source project.</li>
</ol>

<h2><a href="#migrations-process" id="migrations-process">Migrating to Self-hosted from Cloud</a></h2>

<p>
To begin migrating to Appwrite Self-hosted, make sure to read the <a href="/docs/migrations">migrations overview</a>
and <a href="#notices">things to keep in mind</a> sections above.
</p>

<h3>Steps on Your Cloud Project</h3>
<ol class="margin-top margin-bottom-large text-size-normal">
<li>Navigate to your Appwrite Cloud Console and click on the <b>Migrations</b> tab.</li>
<li>Click <b>Export to Self-hosted</b>, you will be prompted to input the URL of your self-hosted Appwrite project.</li>
<li>Optionally, tell us about why you're moving to self-hosted.</li>
<li>After clicking <b>Continue</b>, you'll be directed back to your self-hosted project to complete the process.</li>
</ol>

<h3>Steps on Your Self-hosted Project</h3>
<ol class="margin-top margin-bottom-large text-size-normal">
<li>Once redirected to your self-hosted project, you'll be prompted to select an organization and a project. You can migrate to an existing project or create a new one.</li>
<li>Select the data you wish to migrate. You can choose among accounts, databases, documents, files, and functions.</li>
<li>Click <b>Start migration</b> to start the migration process. You do not need to keep the Appwrite Console open through the process.</li>
</ol>
90 changes: 90 additions & 0 deletions app/views/docs/migrations-firebase.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<p>
Moving your project from Firebase to Appwrite?
Appwrite Migrations can help you streamline the process.

Here's what you need to know to get started.
</p>

<h2><a href="#notices" id="notices">Things to keep in mind</a></h2>

<ol class="margin-top margin-bottom-large text-size-normal">
<li>Appwrite will not incur usage charges during migrations, but Firebase may still incur service charges.</li>
<li>Appwrite Migrations only supports Firestore as a database source. Realtime Database is <b>currently not supported</b>.</li>
<li>At the moment only top level document migration is supported. Nested documents will not be transferred automatically.</li>
<li>OAuth users will not be transferred. Users will need to re-authenticate with your OAuth provider after the migration is complete.</li>
</ol>

<h2><a href="#resources" id="resources">Supported resource types</a></h2>
<table>
<thead>
<tr>
<th></th>
<th>Users</th>
<th>Databases</th>
<th>Documents</th>
<th>Files</th>
<th>Functions</th>
</tr>
</thead>
<tbody>
<tr>
<td>Firebase</td>
<td>✅</td>
<td>✅</td>
<td>✅</td>
<td>✅</td>
<td></td>
</tr>
</tbody>
</table>

<h2><a href="#migration-process" id="migration-process">Migrating to Appwrite from Firebase</a></h2>
<p>
To begin migrating to Appwrite make sure to read the <a href="/docs/migrations">migration overview</a>
and <a href="#notices">things to keep in mind</a> sections above.
</p>

<ol class="margin-top margin-bottom-large text-size-normal">
<li>
Create a new project and click on the <b>Migrations</b> tab.
</li>
<li>
Click on the <b>Create Migration</b> button and select <b>Firebase</b> as your source.
</li>
<li>
Depending on where your Appwrite project is hosted, you'll need to use different methods to authorize with Firebase.
See the <a href="#cloud">Cloud</a> and <a href="#self-hosted">Self-hosting</a> sections for details.
</li>
<li>
Finally, add the platforms for your <a href="/docs/getting-started-for-web">Web</a>, <a href="getting-started-for-flutter/docs/getting-started-for-flutter">Flutter</a>, <a href="/docs/getting-started-for-android">Android</a>, and <a href="/docs/getting-started-for-apple">iOS</a> apps.
</li>
</ol>

<h3><a href="#cloud" id="cloud">Appwrite Cloud</a></h3>
<p>
To simplify the migration process we have created an OAuth application that will allow you to sign in with Google and automatically
discover your Firebase projects. Simply select the source project and follow the migration wizard.
</p>

<h3><a href="#self-hosted" id="self-hosted">Migrating to Appwrite Self-Hosted</a></h3>
<p>
If you are self-hosting Appwrite you will need to create a service account in your Firebase project and download the JSON file.
</p>

<ol class="margin-top margin-bottom-large text-size-normal">
<li>
Navigate to your Firebase console.
</li>
<li>
Click the gear icon to access your <b>Project Settings</b>.
</li>
<li>
Click <b>Service Accounts</b>, then <b>Generate New Private Key</b>. Don't share this key with anyone!
</li>
<li>
Once you've downloaded your private key, head back to Appwrite and click <b>Manual Authentication</b>.
</li>
<li>
Upload the JSON private key and follow the wizard.
</li>
</ol>
38 changes: 38 additions & 0 deletions app/views/docs/migrations-local-to-cloud.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<p>
Making the move to Appwrite Cloud? We've got your back.
Migrations makes it as easy as a couple clicks to move all of your self-hosted project data to a Cloud instance.
</p>

<h2><a href="#notices" id="notices">Things to keep in mind</a></h2>

<ol class="margin-top margin-bottom-large text-size-normal">
<li>Data transferred by migrations will reset <code>$createdAt</code> and <code>$updatedAt</code> timestamps to the date of the migration.</li>
<li>Your self-hosted Appwrite project must be accessible from the internet for the migration to work.</li>
<li>Migrations are non-destructive. No data will be deleted or lost in the source project.</li>
</ol>

<h2><a href="#migration-process" id="migration-process">Migrating to Self-hosted from Cloud</a></h2>
<p>
To begin migrating to self-hosted, make sure to read the <a href="/docs/migrations">migration overview</a>
and <a href="#notices">things to keep in mind</a> sections above.
</p>

<h3>Steps on Your Self-hosted Project</h3>

<ol class="margin-top margin-bottom-large text-size-normal">
<li>Navigate to your self-hosted project's console and click on the <b>Migrations</b> tab.</li>
<li>Click <b>Deploy to cloud</b>, you will be redirected to Appwrite Cloud.</li>
<li>You will complete the migration on Appwrite Cloud.</li>
</ol>

<h3>Steps on Your Cloud Project</h3>
<ol class="margin-top margin-bottom-large text-size-normal">
<li>Once redirected to Appwrite Cloud, you'll be prompted to select an organization and a project. You can migrate to an existing project or create a new one.</li>
<li>Select the data you wish to migrate. You can choose among accounts, databases, documents, files, and functions.</li>
<li>Click <b>Start migration</b> to start the migration process. You do not need to keep the Appwrite Console open through the process.</li>
</ol>

<div class="notice">
<h2>Keep in mind</h2>
<p>Your Self-hosted instance will generate a API Key in the background to pass to Cloud. You can revoke this key after the migration process is complete.</p>
</div>
84 changes: 84 additions & 0 deletions app/views/docs/migrations-nhost.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<p>
Moving your project from NHost to Appwrite?
Appwrite Migrations can help you streamline the process.

Here's what you need to know to get started.
</p>

<h2><a href="#notices" id="notices">Things to keep in mind</a></h2>

<ol class="margin-top margin-bottom-large text-size-normal">
<li>Appwrite will not incur usage charges during migrations, but NHost may still incur service charges.</li>
<li>Appwrite's Database doesn't support all the features of the postgreSQL database so more advanced postgres centric things things like advanced indexes, postgres functions and scheduling will not be migrated.</li>
<li>OAuth users will not be transferred. You will need to re-authenticate with your OAuth provider after the migration is complete.</li>
</ol>

<h2><a href="#resources" id="resources">Supported resource types</a></h2>
<table>
<thead>
<tr>
<th></th>
<th>Users</th>
<th>Databases</th>
<th>Documents</th>
<th>Files</th>
<th>Functions</th>
</tr>
</thead>
<tbody>
<tr>
<td>NHost</td>
<td>✅</td>
<td>✅</td>
<td>✅</td>
<td>✅</td>
<td></td>
</tr>
</tbody>
</table>

<h2><a href="#migration-process" id="migration-process">Migrating to Appwrite from NHost</a></h2>
<p>
To begin migrating to Appwrite make sure to read the <a href="/docs/migrations">migration overview</a>
and <a href="#notices">things to keep in mind</a> sections above.
</p>

<ol class="margin-top margin-bottom-large text-size-normal">
<li>
Create a new project and click on the <b>Migrations</b> tab.
</li>
<li>
Click on the <b>Create Migration</b> button and select <b>NHost</b> as your source.
</li>
<li>
Enter the credentials following the <a href="#credentials">instructions below</a> and click <b>Next</b>.
</li>
<li>
Select the resources you want to migrate and finally click <b>Start migration</b> to begin the migration process.
</li>
</ol>

<h3><a href="#credentials" id="credentials">NHost Credentials</a></h3>
<p>
Enter all the following credentials from your NHost project.
</p>
<ol class="margin-top margin-bottom-large text-size-normal">
<li>
<b>Region</b> - The region your NHost project is hosted in. This can be found in your NHost project environment variables as <b>NHOST_REGION</b>.
</li>
<li>
<b>Subdomain</b> - The subdomain of your NHost project. This can be found in your NHost project environment variables as <b>NHOST_SUBDOMAIN</b>.
</li>
<li>
<b>Database</b> - The name of your NHost database. This can be found in your NHost project Database settings.
</li>
<li>
<b>Username</b> - The username of your NHost database. This can be found in your NHost project Database settings.
</li>
<li>
<b>Password</b> - 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.
</li>
<li>
<b>Admin Secret</b> - The admin secret of your NHost project. This can be found in your NHost project environment variables as <b>NHOST_ADMIN_SECRET</b>. We use this to transfer your NHost files to Appwrite.
</li>
</ol>
Loading