Skip to content

Commit fb15549

Browse files
Merge branch 'main' into docs-sites-integration
2 parents a09d3bd + 0f22bfa commit fb15549

File tree

42 files changed

+151
-33
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+151
-33
lines changed

src/lib/components/Search.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
<div id="searchbox"></div>
166166

167167
<input
168-
class="web-input-button bg-greyscale-800/75! relative z-1 !rounded-b-none !pl-10"
168+
class="web-input-button bg-white-800/75! relative z-1 !rounded-b-none !pl-10"
169169
type="text"
170170
id="search"
171171
bind:value

src/routes/(experiments)/new-homepage/(components)/scale.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
];
6363
6464
const numbers = [12, 1000, 50, 300];
65-
const alternateNumbers = [50, 300, 300, 200];
65+
const alternateNumbers = [50, 300, 300, 20];
6666
6767
let animate: boolean = false;
6868
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
---
2+
layout: post
3+
title: Build and deploy a personal portfolio on Appwrite Sites
4+
description: Learn how to configure the Appwrite Sites portfolio template and deploy your changes via the GitHub integration.
5+
date: 2025-05-28
6+
cover: /images/blog/portfolio-template-sites/cover.png
7+
timeToRead: 7
8+
author: aditya-oberai
9+
category: tutorial
10+
featured: false
11+
callToAction: true
12+
---
13+
14+
Today, a personal portfolio website is no less than real estate on the internet for developers. It's your digital home address, where people can discover who you are, what you do, how they can contact you, and so much more in between. However, many of us don't have our portfolio websites ready despite their importance because, even with modern vibe coding tools, a clean and straightforward portfolio is much harder to design than expected.
15+
16+
That's why, as part of the Sites templates, Appwrite offers a portfolio template that you can deploy in just a few short steps.
17+
18+
# Overview of the portfolio template
19+
20+
The Appwrite portfolio template is a personal portfolio app for developers. Built with Next.js and styled with Tailwind CSS, it features several pages:
21+
22+
- Landing page with an about section and project listing
23+
- Individual project pages
24+
- Contact me page with an email form (currently just logs form data on the console)
25+
26+
![Deployed site](/images/blog/portfolio-template-sites/deployed.png)
27+
28+
# Deploy the portfolio template on Appwrite
29+
30+
Firstly, you must head to Appwrite Cloud and [create an account](https://cloud.appwrite.io/console/register) if you haven't already (or [self-host Appwrite 1.7](https://appwrite.io/docs/advanced/self-hosting)). Next, create your first project, which will lead you to the project overview page.
31+
32+
![Get started](/images/blog/portfolio-template-sites/get-started.png)
33+
34+
Head to the **Sites** page from the left sidebar, click on the **Create site** button, and select the **Clone a template** option. This will take you to the Appwrite Sites templates listing, where you should select **Portfolio** under the **Use case** category on the left sidebar. This will show you numerous templates, some developed by our team and some by our partners, from which you must click on the `Portfolio template` option.
35+
36+
![Site templates](/images/blog/portfolio-template-sites/templates.png)
37+
38+
After selecting the template, connect a GitHub repository now (you can do this later, too). Leave the production branch and root directory as is, update the domain name if you want, and click the **Deploy** button. You can watch the deployment logs as Appwrite builds your site.
39+
40+
![Deployment logs](/images/blog/portfolio-template-sites/deployment-logs.png)
41+
42+
After your site has been successfully deployed, Appwrite will show you a **Congratulations** page. You can view the site by clicking the **Visit site** button, or view the site configuration (deployments, logs, domains, usage, and settings) by clicking the **Go to dashboard** button.
43+
44+
![Congratulations](/images/blog/portfolio-template-sites/congrats.png)
45+
46+
# Making changes and deploying them to the site
47+
48+
To learn how to make changes in the portfolio site, let's update the contact form action to email you whenever someone submits a message. For this demo, we shall use Resend, a popular API service for sending emails.
49+
50+
First, create an account on [Resend](https://resend.com/), then go to the **API Keys** tab in the left sidebar to create a new API key. Save this API key for later usage.
51+
52+
![Resend API key](/images/blog/portfolio-template-sites/resend-api-key.png)
53+
54+
> Note: While this isn't mandatory for the demo, for production apps, you should add and verify a [domain](https://resend.com/docs/dashboard/domains/introduction) to send emails via Resend.
55+
56+
Next, you must update the environment variables of our Appwrite Site. Head back to your Appwrite project, visit **Sites** from the left sidebar, and click on your portfolio site. Head to the **Settings** tab of your site, scroll down to the **Environment variables** section, and create the following environment variables:
57+
58+
- `RESEND_API_KEY`: The Resend API key you created earlier
59+
- `EMAIL_ADDRESS`: The email address you want to receive contact form messages on
60+
61+
![Site environment variables](/images/blog/portfolio-template-sites/env-vars.png)
62+
63+
Lastly, clone the repository Appwrite created for your portfolio site. Enter the directory, and install Resend's Node.js library by running the following command:
64+
65+
```js
66+
npm install resend
67+
```
68+
69+
Then, head to the `src/actions/contact.ts` file and update it to the following:
70+
71+
```js
72+
'use server'
73+
import { Resend } from "resend"
74+
75+
export const submitContactForm = async (formData: FormData) => {
76+
try {
77+
const rawFormData = {
78+
name: formData.get('name'),
79+
email: formData.get('email'),
80+
subject: formData.get('subject'),
81+
message: formData.get('message'),
82+
}
83+
84+
console.log(rawFormData);
85+
86+
const resendApiKey = process.env.RESEND_API_KEY;
87+
const emailAddress = process.env.EMAIL_ADDRESS;
88+
if (!resendApiKey || !emailAddress) {
89+
throw new Error('Missing environment variables for Resend API key or email address');
90+
}
91+
92+
const resend = new Resend(resendApiKey);
93+
94+
await resend.emails.send({
95+
from: 'Acme <[email protected]>', // You can switch this out with an email of your domain once added to Resend
96+
to: [emailAddress],
97+
subject: `New message from ${rawFormData.name}`,
98+
text: `Name: ${rawFormData.name}\n\nEmail: ${rawFormData.email}\n\nSubject: ${rawFormData.subject}\n\nMessage: ${rawFormData.message}`
99+
});
100+
} catch (error) {
101+
console.error('Error sending email:', error);
102+
throw new Error('Failed to send contact form. Please try again later.');
103+
}
104+
}
105+
```
106+
107+
You can now commit these changes and push them to GitHub, automatically deploying the updated site to Appwrite.
108+
109+
# Next steps
110+
111+
And with that, the personal portfolio template is deployed to Appwrite Sites. You can explore other templates or deploy any other websites you'd like.
112+
113+
For more information about Appwrite Sites:
114+
115+
- [Appwrite Sites product docs](/docs/products/sites)
116+
- [Quick start to deploy web app](/docs/products/sites/quick-start)
117+
- [Deploy Appwrite Site templates](/docs/products/sites/templates)
118+
- [Appwrite Discord server](/discord)

src/routes/contact-us/enterprise/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@
269269
</div>
270270
</div>
271271
</div>
272-
<Scale />
272+
<Scale alternateInfo />
273273
<LogoList />
274274
<div class="container">
275275
<FooterNav />

src/routes/docs/quick-starts/android-java/+page.markdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ You can skip optional steps.
5353
To add the Appwrite SDK for Android as a dependency, add the following to your app-level **build.gradle** file inside the **dependencies** block.
5454

5555
```groovy
56-
implementation "io.appwrite:sdk-for-android:7.0.0"
56+
implementation "io.appwrite:sdk-for-android:8.1.0"
5757
```
5858

5959
In order to allow creating OAuth sessions, the following activity needs to be added inside the `<application>` tag, along side the existing `<activity>` tags in your [AndroidManifest.xml](https://github.com/appwrite/playground-for-android/blob/master/app/src/main/AndroidManifest.xml).

src/routes/docs/quick-starts/android/+page.markdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ You can skip optional steps.
5353
To add the Appwrite SDK for Android as a dependency, add the following to your app-level **build.gradle.kts** file inside the **dependencies** block.
5454

5555
```kotlin
56-
implementation("io.appwrite:sdk-for-android:7.0.0")
56+
implementation("io.appwrite:sdk-for-android:8.1.0")
5757
```
5858

5959
In order to allow creating OAuth sessions, the following activity needs to be added inside the `<application>` tag, along side the existing `<activity>` tags in your [AndroidManifest.xml](https://github.com/appwrite/playground-for-flutter/blob/master/android/app/src/main/AndroidManifest.xml).

src/routes/docs/quick-starts/angular/+page.markdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ cd my-app
5454
Install the JavaScript Appwrite SDK.
5555

5656
```sh
57-
npm install appwrite@14.0.1
57+
npm install appwrite@18.1.1
5858
```
5959
{% /section %}
6060
{% section #step-4 step=4 title="Import Appwrite" %}

src/routes/docs/quick-starts/apple/+page.markdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ To add the Appwrite SDK for Apple as a dependency, open the **File** menu and cl
5252

5353
In the **Package URL** search box, enter https://github.com/appwrite/sdk-for-apple.
5454

55-
Once the SDK is found, use `5.0.0` as version, select **Up to Next Major Version** as your **Dependency Rule** and click **Add Package**.
55+
Once the SDK is found, use `10.1.0` as version, select **Up to Next Major Version** as your **Dependency Rule** and click **Add Package**.
5656

5757
When dependency resolution is complete, click **Add Package** again to add the SDK package to your target.
5858

src/routes/docs/quick-starts/dart/+page.markdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ After entering the project directory, remove the `lib/` and `test/` directories.
5353
Install the Dart Appwrite SDK.
5454

5555
```sh
56-
dart pub add dart_appwrite:13.0.0
56+
dart pub add dart_appwrite:16.0.0
5757
```
5858
{% /section %}
5959
{% section #step-4 step=4 title="Import Appwrite" %}

src/routes/docs/quick-starts/deno/+page.markdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Install the Deno Appwrite SDK by importing it `deno.land/x` at the top of your f
5555

5656
```
5757
// import all as sdk
58-
import * as sdk from "https://deno.land/x/appwrite@10.0.1/mod.ts";
58+
import * as sdk from "https://deno.land/x/appwrite@15.0.0/mod.ts";
5959

6060
// import only what you need
6161
import { Client, ... other imports } from "https://deno.land/x/appwrite/mod.ts";

0 commit comments

Comments
 (0)