Home

Awesome

🔖 Todo With React Native and Appwrite

A simple todo app built with Appwrite and React Native

🎉 Now with Social Login! Includes Github Sign In!

🎬 Getting Started

🤘 Install Appwrite

Follow Appwrite's simple Installation Guide to get Appwrite up and running in no time. You can either deploy Appwrite on your local machine or, on any cloud provider of your choice.

Note: If you setup Appwrite on your local machine, you will need to create a public IP so that your hosted frontend can access it.

You need to make a few configuration changes to your Appwrite server.

  1. Add a new Web App in Appwrite and enter the endpoint of your website (localhost, <project-name>.vercel.app etc) Create Web App

  2. Create a new collection with the following properties

Add the following rules to the collection.

Make sure that your key exactly matches the key in the images

<p align="center"> <img src="https://user-images.githubusercontent.com/20852629/113019972-c3753c80-919f-11eb-9b3a-c3690785bbf4.png" alt="Content Rule" width="400"/> </p> <p align="center"> <img src="https://user-images.githubusercontent.com/20852629/113020008-cec86800-919f-11eb-8cc2-473f8d15fc3f.png" alt="IsComplete Rule" width="400"/> </p>

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

<p align="center"> <img src="https://user-images.githubusercontent.com/20852629/113019801-99bc1580-919f-11eb-9a94-13b1529cb925.png" alt="Collection Permissions" width="400"/> </p>

🚀 Configure and Run the Application

You will need to open the file src\utils\sdk.ts, and at the top, fill in these variables that will help your application connect to Appwrite.

If you decide to include Github Sign In in your application, you will also need to configure the Github OAuth provider in your Appwrite server. You can use the following article as a reference which shows how to configure Google OAuth provider, but it's similar to any other OAuth provider for Appwrite.

Run on your device (or simulator)

Follow these instructions to run the application

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

Fill the following src\utils\sdk.ts variables:

const REACT_APP_ENDPOINT = '';
const REACT_APP_PROJECT_ID = '';
const REACT_APP_COLLECTION_ID = '';
const USE_GITHUB_SIGNIN = true;

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

$ npm install

For iOS devices you'll need to link the relevant CocoaPods. From the /ios directory run:

pod install

To run on Android:

$ npx react-native run-android

To run on iOS:

$ npx react-native run-ios

😧 Remarks