Skip to content

Commit bcfdf49

Browse files
committed
add migration guide section to Sites documentation with Vercel migration path
1 parent 2d3d1ee commit bcfdf49

File tree

2 files changed

+38
-27
lines changed

2 files changed

+38
-27
lines changed

src/routes/docs/products/sites/+page.markdoc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,14 @@ Try out one of our most popular framework quick-starts:
3838
{% /cards %}
3939

4040
Or, [setup your first site using your favorite framework >](/docs/products/sites/quick-start)
41+
42+
# Migrating from other platforms?
43+
44+
Looking to migrate existing web applications from other hosting platforms to Appwrite Sites? Find detailed migration guides for various platforms:
45+
46+
{% cards %}
47+
48+
{% cards_item href="/docs/products/sites/migrations/vercel" title="Migrating from Vercel" icon="icon-vercel" %}
49+
{% /cards_item %}
50+
51+
{% /cards %}

src/routes/docs/products/sites/migrating-from-vercel/+page.markdoc renamed to src/routes/docs/products/sites/migrations/vercel/+page.markdoc

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ Understanding the key differences between Vercel and Appwrite Sites will help yo
4343
- Domain-level redirects and framework-level path redirects
4444
{% /table %}
4545

46-
# Migration steps
46+
# Migration process
4747

48-
Follow these steps to migrate your application from Vercel to Appwrite Sites.
48+
Follow these steps to move your application from Vercel to Appwrite Sites.
4949

5050
{% section id="create-project" step=1 title="Create an Appwrite project" %}
5151
Start by setting up a new project in Appwrite:
@@ -70,11 +70,11 @@ Next, create a new site by connecting your existing repository:
7070
Appwrite will auto-detect your framework. Verify this is correct or select manually from the dropdown menu.
7171
{% /section %}
7272

73-
## Configure your domain
73+
# Configure your domain
7474

7575
One of the most significant differences between Vercel and Appwrite is how they handle domain configuration, particularly for apex domains.
7676

77-
## Domain setup comparison
77+
# Domain setup comparison
7878

7979
{% only_dark %}
8080
![Domain configuration](/images/docs/sites/dark/add-domain.png)
@@ -83,7 +83,7 @@ One of the most significant differences between Vercel and Appwrite is how they
8383
![Domain configuration](/images/docs/sites/add-domain.png)
8484
{% /only_light %}
8585

86-
## Migrating an apex domain
86+
# Migrating an apex domain
8787

8888
Vercel uses A records for apex domains, while Appwrite uses nameserver (NS) records. This means you'll need to delegate DNS management to Appwrite.
8989

@@ -118,7 +118,7 @@ Changing nameservers delegates your entire domain's DNS management to Appwrite.
118118
{% /info %}
119119
{% /section %}
120120

121-
## Migrating a subdomain
121+
# Migrating a subdomain
122122

123123
For subdomains, both Vercel and Appwrite use CNAME records, making the migration process simpler.
124124

@@ -138,7 +138,7 @@ At your domain registrar or DNS provider:
138138
3. Wait for DNS propagation and verification
139139
{% /section %}
140140

141-
## Understanding domain rule types
141+
# Understanding domain rule types
142142

143143
When adding a domain in Appwrite, you can choose from three rule types:
144144

@@ -170,7 +170,7 @@ When adding a domain in Appwrite, you can choose from three rule types:
170170
When using domain-level redirects in Appwrite, path and query parameters are ignored. For example, if you redirect `example.com` to `appwrite.io`, then `example.com/docs?id=123` will redirect to `appwrite.io` (not `appwrite.io/docs?id=123`).
171171
{% /info %}
172172

173-
## Configure build settings
173+
# Configure build settings
174174

175175
After setting up your project and domain, you'll need to configure your build settings to match your Vercel configuration.
176176

@@ -192,7 +192,7 @@ Navigate to your site > **Settings** > **Build settings** and configure the foll
192192
{% /only_light %}
193193
{% /section %}
194194

195-
## Framework defaults
195+
# Framework defaults
196196

197197
Appwrite automatically detects and applies default settings for popular frameworks:
198198

@@ -238,7 +238,7 @@ Appwrite automatically detects and applies default settings for popular framewor
238238
- `./dist`
239239
{% /table %}
240240

241-
## Manage environment variables
241+
# Manage environment variables
242242

243243
Environment variables require special attention during migration, as they control how your application behaves in different environments.
244244

@@ -268,7 +268,7 @@ Vercel automatically provides system variables like `VERCEL_URL`. You'll need to
268268
{% /only_light %}
269269
{% /section %}
270270

271-
## Appwrite system variables
271+
# Appwrite system variables
272272

273273
Appwrite automatically injects these variables into your site:
274274

@@ -302,7 +302,7 @@ Appwrite automatically injects these variables into your site:
302302
- Build & Runtime
303303
{% /table %}
304304

305-
## Handle redirects and rewrites
305+
# Handle redirects and rewrites
306306

307307
One key difference between Vercel and Appwrite is how they handle redirects and rewrites.
308308

@@ -324,7 +324,7 @@ Domain redirects in Appwrite do not preserve path or query parameters. For examp
324324
{% section id="framework-redirects" step=2 title="Framework-level redirects" %}
325325
For path-based redirects, use your framework's built-in functionality:
326326

327-
## Next.js
327+
# Next.js
328328
```javascript
329329
// next.config.js
330330
module.exports = {
@@ -340,7 +340,7 @@ module.exports = {
340340
};
341341
```
342342

343-
## SvelteKit
343+
# SvelteKit
344344
```javascript
345345
// src/routes/+layout.server.js
346346
export function load({ url }) {
@@ -353,7 +353,7 @@ export function load({ url }) {
353353
}
354354
```
355355

356-
## Nuxt
356+
# Nuxt
357357
```javascript
358358
// nuxt.config.js
359359
export default {
@@ -372,12 +372,12 @@ export default {
372372
```
373373
{% /section %}
374374

375-
## Configure custom headers
375+
# Configure custom headers
376376

377377
Vercel allows setting custom headers at the platform level through `vercel.json`. Appwrite Sites supports custom headers through your framework's built-in configuration mechanisms.
378378

379379
{% section id="framework-headers" step=1 title="Framework-specific headers" %}
380-
## Next.js
380+
# Next.js
381381
```javascript
382382
// next.config.js
383383
module.exports = {
@@ -397,7 +397,7 @@ module.exports = {
397397
};
398398
```
399399

400-
## SvelteKit
400+
# SvelteKit
401401
```javascript
402402
// src/hooks.server.js
403403
export function handle({ event, resolve }) {
@@ -410,11 +410,11 @@ export function handle({ event, resolve }) {
410410
}
411411
```
412412

413-
## Static sites
413+
# Static sites
414414
For static sites without framework support, consider using client-side solutions or framework-specific configuration files if your static site generator supports them.
415415
{% /section %}
416416

417-
## Migrate serverless functions
417+
# Migrate serverless functions
418418

419419
There are two approaches to serverless functions when migrating from Vercel to Appwrite:
420420

@@ -451,7 +451,7 @@ For standalone serverless functions or more complex use cases:
451451

452452
{% section id="update-endpoints" step=3 title="API endpoints usage" %}
453453

454-
## Framework API routes
454+
# Framework API routes
455455
When using framework API routes within Appwrite Sites (with SSR enabled), your endpoints remain the same:
456456

457457
- Vercel: `/api/hello`
@@ -466,7 +466,7 @@ export default function handler(req, res) {
466466
}
467467
```
468468

469-
## Standalone Appwrite Functions
469+
# Standalone Appwrite Functions
470470
If you're using standalone Appwrite Functions (outside your site's codebase), you'll need to update your frontend code to use the Appwrite Functions API:
471471

472472
```javascript
@@ -483,12 +483,12 @@ const response = await functions.createExecution('your-function-id');
483483
```
484484
{% /section %}
485485

486-
## Handle middleware
486+
# Handle middleware
487487

488488
While Vercel offers platform-level Edge Middleware configured through `vercel.json`, Appwrite Sites fully supports framework-native middleware when using SSR. This means your existing middleware code will continue to work without modification.
489489

490490
{% section id="framework-middleware" step=1 title="Framework-native middleware" %}
491-
## Next.js
491+
# Next.js
492492
```javascript
493493
// middleware.js
494494
export function middleware(request) {
@@ -500,7 +500,7 @@ export const config = {
500500
};
501501
```
502502

503-
## SvelteKit
503+
# SvelteKit
504504
```javascript
505505
// src/hooks.server.js
506506
export async function handle({ event, resolve }) {
@@ -511,7 +511,7 @@ export async function handle({ event, resolve }) {
511511
}
512512
```
513513

514-
## Nuxt
514+
# Nuxt
515515
```javascript
516516
// server/middleware/example.js
517517
export default defineEventHandler((event) => {
@@ -529,7 +529,7 @@ After completing your migration from Vercel to Appwrite Sites, we recommend:
529529
3. **Set up CI/CD** - Configure automatic deployments from your repository
530530
4. **Explore Appwrite services** - Consider integrating with other Appwrite services like Authentication, Databases, and Storage
531531

532-
## Timeouts
532+
# Timeouts
533533

534534
Vercel has a default build timeout of 45 minutes. Appwrite Sites has a default request timeout of 15 seconds (max 30 seconds) for runtime requests, which is configurable.
535535

0 commit comments

Comments
 (0)