- Resonate Flutter App
- Resonate Backend (You are here)
Go to this repository to know more about the project.
-
Pre-requisites :
(a) Fork the Repo
(b) Clone the Repo :
git clone https://github.com/AOSSIE-Org/Resonate-Backend -
Follow this guide to obtain your
HOST,API-KEY,API-SECRETfrom livekit-cloud. -
Create a new project on Appwrite Cloud or self host it locally by pulling their docker image. Know more about Appwrite here.
Here's a list of the functions available in the Resonate Backend:
-
create-room: Creates a new room, interacting with Appwrite and Livekit. Generates an access token for the admin. -
database-cleaner: Cleans up old data in the participants, active pairs, and OTP collections using Appwrite. -
delete-room: Deletes a room from both Appwrite and Livekit, including associated participant records. Ensures only the room admin can delete the room. -
join-room: Generates a Livekit access token for a user to join a specified room. -
livekit-webhook: Handles webhooks from Livekit. Specifically, it validates the webhook event and, if aroom_finishedevent is received, it deletes the corresponding room from Appwrite. -
match-maker: Matches random user requests based on language and anonymity, creating active pairs and deleting the matched requests. This function is triggered by an Appwrite event when a new request document is created. -
send-otp: Generates a 6-digit OTP, sends it to the recipient's email via a mail service, and stores the OTP with its creation date in Appwrite. -
send-story-notification: Sends push notifications to followers of a user when a new story is created, using Firebase Cloud Messaging (FCM) and Appwrite to retrieve follower tokens. -
start-friend-call: Sends a Firebase Cloud Messaging (FCM) data message to a specific recipient's FCM token, likely to initiate a call. -
sync-all-documents-with-meilisearch: Synchronizes all story and user documents from Appwrite databases to Meilisearch indexes in chunks. -
sync-stories-with-meilisearch: Synchronizes individual story documents to Meilisearch based on Appwrite document events (create, update, delete). -
sync-users-with-meilisearch: Synchronizes individual user documents to Meilisearch based on Appwrite document events (create, update, delete). -
upcomingRoom-isTime-checker: Checks upcoming rooms and updates theirisTimestatus to true if the scheduled time is within a 5-minute window (before or after), using Appwrite to manage room data. (Note: Notification sending functionality is commented out.) -
upcomingRoom-Message-Notification: Sends notifications to subscribers and the creator of an upcoming room, using Firebase Cloud Messaging (FCM) and Appwrite to retrieve tokens. -
verify-email: Updates the email verification status of a user in Appwrite to true for a given user ID. -
verify-otp: Verifies a user-provided OTP against a stored OTP in Appwrite and records the verification status.
If you have any questions, need clarifications, or want to discuss ideas, feel free to reach out through the following channels:
We appreciate your contributions and look forward to working with you to make this project even better!