Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: overall routes #18

Merged
merged 6 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/lib/actions/rect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ type Args = Writable<DOMRect | null>;
export const rect: Action<HTMLElement, Args> = (node, store) => {
let observer: ResizeObserver | null = null;
const update = (store: Args) => {
console.log('rect update');
observer?.disconnect();

store.set(node.getBoundingClientRect());
Expand Down
1 change: 0 additions & 1 deletion src/lib/animations/OpenSource.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@
on:aw-resize={({ detail }) => {
scrollHandler.reset();
const { percentage } = detail;
console.log('resize', percentage);

scrollHandler(percentage);
}}
Expand Down
2 changes: 0 additions & 2 deletions src/lib/animations/Products.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
$: sectionIndex = Math.floor(
clamp(0, toScale(scrollInfo.percentage, percentScale, animScale), sections.length - 1)
);
$: section = sections[sectionIndex];
$: console.log(section);

let scrollInfo: ScrollInfo = {
percentage: 0,
Expand Down
22 changes: 11 additions & 11 deletions src/lib/components/FooterNav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
<ul class="aw-footer-nav-secondary-list">
<li class="aw-footer-nav-secondary-item"><a href="/docs/products/auth">Auth</a></li>
<li class="aw-footer-nav-secondary-item"><a href="/docs/products/databases">Databases</a></li>
<li class="aw-footer-nav-secondary-item"><a href="#">Functions</a></li>
<li class="aw-footer-nav-secondary-item"><a href="#">Storage</a></li>
<li class="aw-footer-nav-secondary-item"><a href="#">Realtime</a></li>
<li class="aw-footer-nav-secondary-item"><a href="/docs/products/functions">Functions</a></li>
<li class="aw-footer-nav-secondary-item"><a href="/docs/products/storage">Storage</a></li>
<li class="aw-footer-nav-secondary-item"><a href="/docs/apis/realtime">Realtime</a></li>
</ul>
</li>
<li class="aw-footer-nav-main-item">
Expand All @@ -86,8 +86,8 @@
<li class="aw-footer-nav-secondary-item"><a href="/docs">Docs</a></li>
<li class="aw-footer-nav-secondary-item"><a href="/community">Community</a></li>
<li class="aw-footer-nav-secondary-item"><a href="/blog">Blog</a></li>
<li class="aw-footer-nav-secondary-item"><a href="#">Roadmap</a></li>
<li class="aw-footer-nav-secondary-item"><a href="#">Changelog</a></li>
<li class="aw-footer-nav-secondary-item"><a href="/roadmap">Roadmap</a></li>
<li class="aw-footer-nav-secondary-item"><a href="https://github.com/appwrite/appwrite/releases" target="_blank">Changelog</a></li>
<li class="aw-footer-nav-secondary-item"><a href="https://status.appwrite.io" target="_blank">Status</a></li>
</ul>
</li><li class="aw-footer-nav-main-item">
Expand All @@ -112,16 +112,16 @@
</button>
<ul class="aw-footer-nav-secondary-list">
<li class="aw-footer-nav-secondary-item"><a href="/pricing">Pricing</a></li>
<li class="aw-footer-nav-secondary-item"><a href="#">Company</a></li>
<li class="aw-footer-nav-secondary-item"><a href="#">Careers</a></li>
<li class="aw-footer-nav-secondary-item"><a href="/company">Company</a></li>
<li class="aw-footer-nav-secondary-item"><a href="/careers">Careers</a></li>
<li class="aw-footer-nav-secondary-item"><a href="/heroes">Heroes</a></li>
<li class="aw-footer-nav-secondary-item"><a href="https://store.appwrite.io" target="_blank">Store</a></li>
<li class="aw-footer-nav-secondary-item"><a href="/brand">Brand</a></li>
<li class="aw-footer-nav-secondary-item"><a href="#">Contact us</a></li>
<li class="aw-footer-nav-secondary-item"><a href="/contact-us">Contact us</a></li>
</ul>
</li>
<li class="aw-footer-nav-main-item">
<h5 class="aw-footer-nav-main-title aw-is-not-mobile"><a href="#">Legal</a></h5>
<h5 class="aw-footer-nav-main-title aw-is-not-mobile">Legal</h5>
<button class="aw-footer-nav-button aw-is-only-mobile">
<span class="aw-caption-500">Legal</span>
<svg
Expand All @@ -143,8 +143,8 @@
<ul class="aw-footer-nav-secondary-list">
<li class="aw-footer-nav-secondary-item"><a href="/terms">Terms</a></li>
<li class="aw-footer-nav-secondary-item"><a href="/privacy">Privacy</a></li>
<li class="aw-footer-nac-secondary-item" on:click={() => globalThis.OneTrust.ToggleInfoDisplay()}>Cookies</li>
<li class="aw-footer-nav-secondary-item"><a href="#">Security</a></li>
<li class="aw-footer-nav-secondary-item"><a href="/cookies">Cookies</a></li>
<li class="aw-footer-nav-secondary-item"><a href="/security">Security</a></li>
</ul>
</li>
</ul>
Expand Down
10 changes: 5 additions & 5 deletions src/lib/components/MainFooter.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
},
{
icon: 'aw-icon-linkedin',
link: '#'
link: 'https://www.linkedin.com/company/appwrite'
},
{
icon: 'aw-icon-youtube',
label: 'YouTube',
link: '#'
link: 'https://www.youtube.com/c/appwrite?sub_confirmation=1'
}
];

Expand Down Expand Up @@ -80,13 +80,13 @@
</div>
<ul class="aw-main-footer-grid-1-column-3 aw-main-footer-links">
<li>
<a href="#">Support</a>
<a href="/support">Support</a>
</li>
<li>
<a href="#">Status</a>
<a href="https://status.appwrite.io" target="_blank">Status</a>
</li>
<li>
<a href="#">Changelog</a>
<a href="https://github.com/appwrite/appwrite/releases" target="_blank">Changelog</a>
</li>
</ul>
<div class="aw-main-footer-grid-1-column-4 aw-main-footer-copyright">
Expand Down
2 changes: 1 addition & 1 deletion src/lib/layouts/Docs.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
>
<section class="aw-mobile-header is-transparent">
<div class="aw-mobile-header-start">
<a href="#">
<a href="/">
<img
class="aw-logo u-only-dark"
src="/images/logos/appwrite.svg"
Expand Down
24 changes: 12 additions & 12 deletions src/lib/layouts/Sidebar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,18 @@
{/if}
<ul>
{#each navGroup.items as groupItem}
<li>
<a
class="aw-side-nav-button"
class:is-selected={$page.url?.pathname === groupItem.href}
href={groupItem.href}
>
{#if groupItem.icon}
<span class={groupItem.icon} aria-hidden="true" />
{/if}
<span class="aw-caption-400">{groupItem.label}</span>
</a>
</li>
<li>
<a
class="aw-side-nav-button"
class:is-selected={$page.url?.pathname === groupItem.href}
href={groupItem.href}
>
{#if groupItem.icon}
<span class={groupItem.icon} aria-hidden="true" />
{/if}
<span class="aw-caption-400">{groupItem.label}</span>
</a>
</li>
{/each}
</ul>
{/if}
Expand Down
14 changes: 10 additions & 4 deletions src/lib/utils/specs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function getParameters(
return parameters;
}

function getSchema(id: string, api: OpenAPIV3.Document): OpenAPIV3.SchemaObject {
export function getSchema(id: string, api: OpenAPIV3.Document): OpenAPIV3.SchemaObject {
const schema = api.components?.schemas?.[id] as OpenAPIV3.SchemaObject;
if (schema) {
return schema;
Expand All @@ -150,6 +150,14 @@ async function getSpec(version: string, platform: string) {
return specs[target]();
}

export async function getApi(version: string, platform: string): Promise<OpenAPIV3.Document> {
const spec = await getSpec(version, platform);
const parser = new SwaggerParser();
const api = (await parser.bundle(spec as unknown as OpenAPIV3.Document)) as OpenAPIV3.Document;

return api;
}

export async function getService(
version: string,
platform: string,
Expand All @@ -167,9 +175,7 @@ export async function getService(
const isAndroidJava = platform === Platform.ClientAndroidJava;
const isAndroidKotlin = platform === Platform.ClientAndroidKotlin;
const isAndroid = isAndroidJava || isAndroidKotlin;
const spec = await getSpec(version, platform);
const parser = new SwaggerParser();
const api = (await parser.bundle(spec as unknown as OpenAPIV3.Document)) as OpenAPIV3.Document;
const api = await getApi(version, platform);
const tag = api.tags?.find((n) => n.name === service);

const data: Awaited<ReturnType<typeof getService>> = {
Expand Down
15 changes: 15 additions & 0 deletions src/routes/careers/+page.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<script lang="ts">
import { Main } from '$lib/layouts';

import FooterNav from '../../lib/components/FooterNav.svelte';
import MainFooter from '../../lib/components/MainFooter.svelte';
</script>

<Main>
<div class="aw-container">
<div class="aw-grid-120-1fr-auto" />

<FooterNav />
<MainFooter />
</div>
</Main>
4 changes: 2 additions & 2 deletions src/routes/contact-us/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@
</a>
</li>
<li>
<a href="#" class="aw-icon-button" aria-label="Appwrite on aw-icon-linkedin" target="_blank">
<a href="https://linkedin.com/company/appwrite" class="aw-icon-button" aria-label="Appwrite on aw-icon-linkedin" target="_blank">
<span class="aw-icon-linkedin" aria-hidden="true"></span>
</a>
</li>
<li>
<a href="#" class="aw-icon-button" aria-label="Appwrite on YouTube" target="_blank">
<a href="https://youtube.com/c/appwrite?sub_confirmation=1" class="aw-icon-button" aria-label="Appwrite on YouTube" target="_blank">
<span class="aw-icon-youtube" aria-hidden="true"></span>
</a>
</li>
Expand Down
32 changes: 18 additions & 14 deletions src/routes/docs/+error.svelte
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
<script lang="ts">
import { page } from '$app/stores';
import { page } from '$app/stores';
import { Docs } from '$lib/layouts';
import Sidebar from './Sidebar.svelte';
</script>
<main class="u-contents">
<article class="aw-article u-contents">
<header class="aw-article-header">
<div class="aw-article-header-start u-flex-vertical aw-u-cross-start">
<div class="u-position-relative u-flex u-cross-center">
<h1 class="aw-title">{$page?.error?.message}</h1>

<Docs variant="two-side-navs">
<Sidebar />
<main class="u-contents">
<article class="aw-article u-contents">
<header class="aw-article-header">
<div class="aw-article-header-start u-flex-vertical aw-u-cross-start">
<div class="u-position-relative u-flex u-cross-center">
<h1 class="aw-title">{$page?.error?.message}</h1>
</div>
</div>
</div>
</header>
<div class="aw-article-content">
I am a placeholder for an error site.
</div>
</article>
</main>
</header>
<div class="aw-article-content">I am a placeholder for an error site.</div>
</article>
</main>
</Docs>
26 changes: 18 additions & 8 deletions src/routes/docs/Sidebar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
href: '/docs/sdks',
icon: 'icon-cog'
},
{
label: 'Command Line',
href: '#',
icon: 'icon-terminal'
},
{
label: 'References',
href: '/docs/references',
Expand Down Expand Up @@ -76,17 +71,32 @@
}
]
},
{
label: 'Tooling',
items: [
{
label: 'Command Line',
href: '/docs/tooling/command-line',
icon: 'icon-terminal'
},
{
label: 'Assistant',
href: '/docs/tooling/assistant',
icon: 'icon-sparkles'
}
]
},
{
label: 'Advanced',
items: [
{
label: 'Integration',
href: '#',
href: '/docs/advanced/integration',
icon: 'icon-puzzle'
},
{
label: 'Platform',
href: '#',
href: '/docs/advanced/platform',
icon: 'icon-play'
},
{
Expand All @@ -96,7 +106,7 @@
},
{
label: 'Self-hosting',
href: '#',
href: '/docs/advanced/self-hosting',
icon: 'icon-server'
}
]
Expand Down
23 changes: 23 additions & 0 deletions src/routes/docs/advanced/integration/+layout.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<script lang="ts">
import Docs from '$lib/layouts/Docs.svelte';
import Sidebar, { type NavParent, type NavTree } from '$lib/layouts/Sidebar.svelte';

const parent: NavParent = {
backlink: '/docs',
href: '/docs/advanced/integration',
label: 'Integration',
icon: 'icon-puzzle'
};

const navigation: NavTree = [
{
label: 'Guides',
items: []
}
];
</script>

<Docs variant="two-side-navs">
<Sidebar {navigation} {parent} />
<slot />
</Docs>
33 changes: 33 additions & 0 deletions src/routes/docs/advanced/integration/+page.markdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
layout: article
title: Migrations
description: Learn how to migrate your projects from other vendors to Appwrite Cloud or how to move from self-hosting to Cloud and the other way around using Appwrite Migrations service.
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.

## Sources {% #sources %}

Appwrite supports multiple source destinations for migrating your data. You can transfer data from these sources to a new or existing Appwrite project. Resources marked as 'enabled' are migrated automatically. Resources marked as 'partial' can be migrated but with limitations or caveats; please refer to the guide for each source to learn more. Resources marked as 'manual' require manual migration.

| Source | Users | Databases | Documents | Files | Functions |
|--------|-------|-----------|-----------|-------|-----------|
| [Firebase](/docs/advanced/migrations/firebase) | enabled | enabled | partial | enabled | manual |
| [Supabase](/docs/advanced/migrations/supabase) | enabled | enabled | partial | enabled | manual |
| [Nhost](/docs/advanced/migrations/nhost) | enabled | enabled | partial | enabled | manual |
| [Cloud](/docs/advanced/migrations/cloud) | enabled | enabled | enabled | enabled | enabled |
| [Self hosted](/docs/advanced/migrations/self-hosted) | enabled | enabled | enabled | enabled | enabled |

## Limitations {% #limitations %}

Migrations cannot transfer all data perfectly, so certain fields, such as `$createdAt` and `$updatedAt`, may not be transferred.
More information can be found on the migration page for each source.

Migrations help you jump-start your move, but because each product is unique, complex databases and product unique features like functions might need to be migrated manually.
We also recommend you carefully **validate permissions and data integrity** when moving between platforms.

## Charges {% #charges %}

When you migrate data from another source to Appwrite Cloud, the resource usage during the migration will not count towards your Appwrite Cloud usage charges. However, your source vendor may have data transfer charges. The same is true for moving data between self-hosted Appwrite instances hosted on different cloud providers.
23 changes: 23 additions & 0 deletions src/routes/docs/advanced/platform/+layout.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<script lang="ts">
import Docs from '$lib/layouts/Docs.svelte';
import Sidebar, { type NavParent, type NavTree } from '$lib/layouts/Sidebar.svelte';

const parent: NavParent = {
backlink: '/docs',
href: '/docs/advanced/platform',
label: 'Platform',
icon: 'icon-play'
};

const navigation: NavTree = [
{
label: 'Guides',
items: []
}
];
</script>

<Docs variant="two-side-navs">
<Sidebar {navigation} {parent} />
<slot />
</Docs>
Loading