Sitemap

Building with Appwrite and Netlify

4 min readOct 29, 2022

--

Let us start with an introduction of Appwrite first. Appwrite is a popular backend as a service provider. It is a docker containerized self-hosted environment which lets you build applications with a variety of secure, flexible APIs. It provides solutions through sustainable databases, user management, location, privacy, storage, and functions with easy integration with any platform, and any language.

Netlify is an all-in-one platform for automating modern web projects. Replace your hosting infrastructure, continuous integration, and deployment pipeline with a single workflow. Integrate dynamic functionality like serverless functions, user authentication, and form handling as your projects grow.

Zoom image will be displayed

In this article, we will create a to-do app with React and Appwrite and then we will proceed to deployment via Netlify.

Step 1: Installation

Install the Appwrite via Gitpod like this. It will make you install Gitpod and a few steps of authorization. If you choose to open the IDE in the browser, it will configure and show up like the below image.

Zoom image will be displayed

Click on the Simple Browser in the workspace.

Zoom image will be displayed

Step 2: A new project.

Sign in and create a new project. For creating a todo app, add a new Web App in Appwrite.

Zoom image will be displayed
Zoom image will be displayed

Enter the endpoint of your website according to your choice. (<project-name>, <project-name>.netlify.app)

Zoom image will be displayed

Step 3: Databases

Create a new Database. Create a new collection with the following properties.

Zoom image will be displayed
Zoom image will be displayed

Add the following permissions to your collections. These permissions ensure that only registered users can access the collection.

Zoom image will be displayed

Step 4: Frontend

Create a new folder on the desktop (or any other favorite spot) to set the front end. Fork and git clone this repo in this new folder.

Follow these instructions to run the demo app locally:

$ git clone https://github.com/appwrite/todo-with-react
$ cd todo-with-react

Run the following command to generate your .env vars

$ cp .env.example .env

Now fill in the environment variables in your .env file as below:

  • REACT_APP_ENDPOINT — Your Appwrite endpoint.
  • REACT_APP_PROJECT — Your Appwrite project ID.
  • REACT_APP_COLLECTION_ID — Your Appwrite collection ID.
  • REACT_APP_DATABASE_ID — Your Appwrite database ID.

Now run the following commands and you should be good to go:

$ npm install
$ npm start
Zoom image will be displayed

Step 5: Deploy

To deploy it, head over to https://www.netlify.com and set up your account if not already.

Click add a new site → import an existing project.

Select GitHub and then your forked repo.

In a few minutes, the website will be ready and the URL will be available on the dashboard. By default, Netlify creates websites with URLs ending by .netlify.app.

Zoom image will be displayed
Zoom image will be displayed

Check out my website here: React App (stalwart-syrniki-c71317.netlify.app)

Happy coding.

--

--

No responses yet

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy