-
Notifications
You must be signed in to change notification settings - Fork 78
Update/readme.md and .gitignore #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # Appwrite Configuration | ||
| APPWRITE_API_KEY= | ||
| APPWRITE_FUNCTION_PROJECT_ID=resonate | ||
| APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1 | ||
|
|
||
| # Livekit Configuration | ||
| LIVEKIT_HOST= | ||
| LIVEKIT_API_KEY= | ||
| LIVEKIT_API_SECRET= | ||
|
|
||
| # Email Configuration (for OTP) | ||
| SENDER_MAIL= | ||
| SENDER_PASSWORD= | ||
|
|
||
| # Database IDs | ||
| VERIFICATION_DATABASE_ID=64a7bfd6b09121548bfe | ||
| OTP_COLLECTION_ID=64a7bfe3a3a7ee5bf7f8 | ||
| VERIFY_COLLECTION_ID=64a7c0100eabfe8d3844 | ||
| MASTER_DATABASE_ID=64a521785f5be62b796f | ||
| ROOMS_COLLECTION_ID=64a5217e695bf2c4ec9c | ||
| PARTICIPANTS_COLLECTION_ID=64a63e508145d1084abf | ||
| ACTIVE_PAIRS_COLLECTION_ID=64d980cd65ff2e08ab97 | ||
| REQUESTS_COLLECTION_ID=64d980211f1395263ebe | ||
| DATABASE_ID=64a521785f5be62b796f | ||
|
|
||
| # Upcoming Rooms | ||
| UPCOMING_ROOMS_DATABASE_ID=6522fcf27a1bbc4238df | ||
| UPCOMING_ROOMS_COLLECTION_ID=6522fd163103bd453183 | ||
| SUBSCRIBER_COLLECTION_ID=6522fd267db6fdad3392 | ||
|
|
||
| # User Data | ||
| USER_DATA_DATABASE_ID=64a1319104a149e16f5c | ||
| USERS_COLLECTION_ID=64a52f0a6c41ded09def | ||
|
|
||
| # Database Cleaner | ||
| RETENTION_PERIOD_DAYS=0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,17 +7,64 @@ | |
|
|
||
| Go to [this repository](https://github.com/AOSSIE-Org/Resonate) to know more about the project. | ||
|
|
||
| ## Environment Setup : | ||
| ## Environment Setup | ||
|
|
||
| 1. Pre-requisites : | ||
| 1. Pre-requisites | ||
|
|
||
| (a) Fork the Repo | ||
|
|
||
| (b) Clone the Repo : `git clone https://github.com/AOSSIE-Org/Resonate-Backend` | ||
| (b) Clone the Repo: `git clone https://github.com/AOSSIE-Org/Resonate-Backend` | ||
|
|
||
| 2. Follow [this guide](https://docs.livekit.io/cloud/project-management/keys-and-tokens/) to obtain your `HOST`, `API-KEY`, `API-SECRET` from [livekit-cloud](https://livekit.io/cloud). | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was necessary as part of the README, please revert |
||
| 2. Follow this guide to obtain your Livekit credentials | ||
|
|
||
| 3. Create a new project on [Appwrite Cloud](https://appwrite.io/) or self host it locally by pulling their [docker image](https://appwrite.io/docs/self-hosting). Know more about Appwrite [here](https://appwrite.io/docs). | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was necessary as part of the README, please revert |
||
| - Guide: https://docs.livekit.io/cloud/project-management/keys-and-tokens/ | ||
| - You will need `LIVEKIT_HOST`, `LIVEKIT_API_KEY`, `LIVEKIT_API_SECRET`. | ||
|
|
||
| 3. Set up environment variables | ||
|
|
||
| ```bash | ||
| cp .env.example .env | ||
| ``` | ||
|
Comment on lines
+25
to
+27
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was no .env.example added with the PR, and bash commands work only on Unix systems, the README should also include instructions for Windows |
||
|
|
||
| Windows: | ||
|
|
||
| ```powershell | ||
| Copy-Item .env.example .env | ||
| ``` | ||
|
|
||
| or (CMD): | ||
|
|
||
| ```cmd | ||
| copy .env.example .env | ||
| ``` | ||
|
|
||
| Then fill in the values in `.env`: | ||
| - Leave the database/collection IDs as they are (they match the project structure) | ||
| - Add your Livekit credentials (see step 2) | ||
| - Add your email credentials (see step 5) | ||
|
|
||
| 4. Set up Appwrite | ||
|
|
||
| - Create a new project on [Appwrite Cloud](https://appwrite.io/) or self host it locally by pulling their [docker image](https://appwrite.io/docs/self-hosting). Know more about Appwrite [here](https://appwrite.io/docs). | ||
| - Create an API key with necessary scopes. | ||
| - Import the database structure: `appwrite deploy collection`. | ||
| - Copy the generated database and collection IDs into your `.env` file. | ||
| - Important: Appwrite functions do not read from your local `.env`. You must set function variables in Appwrite: | ||
| - Console: Go to Project → Functions → Select a function → Settings → Variables → add keys/values. | ||
| - CLI example: | ||
| - `appwrite client --endpoint https://cloud.appwrite.io/v1 --projectId <PROJECT_ID> --key <API_KEY>` | ||
| - `appwrite functions update --functionId <FUNCTION_ID> --vars APPWRITE_API_KEY=<...>,VERIFICATION_DATABASE_ID=<...>,OTP_COLLECTION_ID=<...>,SENDER_MAIL=<...>,SENDER_PASSWORD=<...>` | ||
|
|
||
| 5. Email configuration (for OTP functionality) | ||
|
|
||
| - Set `SENDER_MAIL` to your email address. | ||
| - Set `SENDER_PASSWORD` to your app password (Gmail guide: https://support.google.com/accounts/answer/185833?hl=en). | ||
|
|
||
| 6. Security note | ||
|
|
||
| - Do not hardcode secrets in `appwrite.json`. Use environment variables. The template `.env.example` lists all variables required across functions. | ||
VasuS609 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - Note: `appwrite.json` does not read from `.env`. Set function variables in the Appwrite Console (or via Appwrite CLI) for cloud execution; `.env` is for local configuration/reference. | ||
| - Tip: Keep `.env` as a convenient record of values; replicate them into Appwrite Function Variables for actual use. | ||
|
|
||
| ## Functions : | ||
|
|
||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JSONs do not have notions of env vars and setting them like this will cause the email and password to be set as literal placeholder strings |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -85,15 +85,15 @@ | |
| "vars": [ | ||
| { | ||
| "key": "SENDER_MAIL", | ||
| "value": "[email protected]" | ||
| "value": "" | ||
| }, | ||
| { | ||
| "key": "VERIFICATION_DATABASE_ID", | ||
| "value": "64a7bfd6b09121548bfe" | ||
| }, | ||
| { | ||
| "key": "SENDER_PASSWORD", | ||
| "value": "xizkyvzhduejxjel" | ||
| "value": "" | ||
| }, | ||
| { | ||
| "key": "OTP_COLLECTION_ID", | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unnecessary and breaking change |
Uh oh!
There was an error while loading. Please reload this page.