Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

docs: Add note on Document Level Security in Readme #70

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,47 +10,47 @@ If you simply want to try out the App, go ahead and check out the demo at https:
## 🎬 Getting Started

### 🤘 Install Appwrite
Follow our simple [Installation Guide](https://appwrite.io/docs/installation) 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.
Follow our simple [Installation Guide](https://appwrite.io/docs/installation) 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.

We 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](https://user-images.githubusercontent.com/20852629/113019434-3c27c900-919f-11eb-997c-1da5a8303ceb.png)
1. Add a new Web App in Appwrite and enter the endpoint of your website (`localhost, <project-name>.vercel.app, etc.`)
![Create Web App](https://github.com/appwrite/demo-todo-with-react/assets/31401437/13362aa5-7a15-444c-96a7-48ac60647e16)

2. Create a new collection with the following properties
2. Create a new database and collection with the following properties
* **Attributes**
*
Add the following attributes to the collection.

Add the following attributes to the collection.
> Make sure that your Attribute ID exactly matches the key in the images

<p align="center">
<img width="744" alt="Content Attribute" src="https://user-images.githubusercontent.com/29069505/155617343-6ff674b3-9809-42ac-8175-0f76271b1189.png">
<img width="744" alt="Content Attribute" src="https://github.com/appwrite/demo-todo-with-react/assets/31401437/b263fc46-a999-4703-842c-d7b3b02f31f6">
</p>

<p align="center">
<img width="744" alt="IsComplete Attribute" src="https://user-images.githubusercontent.com/29069505/155617393-f30270af-aa07-4392-a7b2-75b8ce9c60da.png">
<img width="744" alt="IsComplete Attribute" src="https://github.com/appwrite/demo-todo-with-react/assets/31401437/71f4cf6f-8529-4c8a-b86a-dfb2cfca444a">
</p>

* **Permissions**

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>
Ensure that you also enable **Document Level Security** in the settings.

![Document Level Security](https://github.com/appwrite/demo-todo-with-react/assets/31401437/072b89cb-07de-42a4-ad12-17c348a786e4)

### 🚀 Deploy the Front End
You have two options to deploy the front-end and we will cover both of them here. In either case, you will need to fill in these environment variables that help your frontend connect to Appwrite.
You have two options to deploy the front-end, and we will cover both of them here. In either case, you will need to fill in these environment variables that help your front-end connect to Appwrite.

* REACT_APP_ENDPOINT - Your Appwrite endpoint
* REACT_APP_PROJECT - Your Appwrite project ID
* REACT_APP_COLLECTION_ID - Your Appwrite collection ID

### **Deploy to a Static Hosting Provider**

Use the following buttons to deploy to your favourite hosting provider in one click! We support Vercel, Netlify and DigitalOcean. You will need to enter the environment variables above when prompted.
Use the following buttons to deploy to your favorite hosting provider in one click! We support Vercel, Netlify, and DigitalOcean. You will need to enter the environment variables above when prompted.

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2Fappwrite%2Ftodo-with-react&env=REACT_APP_COLLECTION_ID,REACT_APP_PROJECT,REACT_APP_ENDPOINT&envDescription=Your%20Appwrite%20Endpoint%2C%20Project%20ID%20and%20Collection%20ID%20)

Expand All @@ -76,9 +76,9 @@ Run the following command to generate your `.env` vars
$ cp .env.example .env
```

Now fill in the envrionment variables we discussed above in your `.env`
Now fill in the environment variables we discussed above in your `.env`

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

```
$ npm install
Expand All @@ -87,10 +87,10 @@ $ npm start

## 🤕 Support

If you get stuck anywhere, hop onto one of our [support channels in discord](https://appwrite.io/discord) and we'd be delighted to help you out 🤝
If you get stuck anywhere, hop onto one of our [support channels in discord](https://appwrite.io/discord), and we'd be delighted to help you out 🤝

## 😧 Help Wanted
Our access credentials were recently compromised and someone tried to ruin these demos. They decided to leave behind 15 easter eggs 🥚 for you to discover. If you find them, submit a PR cleaning up that section of the code (One PR per person across all the repos). You can track the number of claimed Easter Eggs using the badge at the top.
Our access credentials were recently compromised, and someone tried to ruin these demos. They decided to leave behind 15 easter eggs 🥚 for you to discover. If you find them, submit a PR cleaning up that section of the code (One PR per person across all the repos). You can track the number of claimed Easter Eggs using the badge at the top.

The first 15 people to get their PRs merged will receive some Appwrite Swags 🤩 . Just head over to our [Discord channel](https://appwrite.io/discord) and share your PR link with us.

Expand Down