Skip to content

Sattar078/Resonate-Backend

 
 

Repository files navigation

Resonate - An Open Source Social Voice Platform

This project is divided into two repositories:

  1. Resonate Flutter App
  2. Resonate Backend (You are here)

Go to this repository to know more about the project.

Environment Setup :

  1. Pre-requisites :

    (a) Fork the Repo

    (b) Clone the Repo : git clone https://github.com/AOSSIE-Org/Resonate-Backend

  2. Follow this guide to obtain your HOST, API-KEY, API-SECRET from livekit-cloud.

  3. Create a new project on Appwrite Cloud or self host it locally by pulling their docker image. Know more about Appwrite here.

Functions :

Here's a list of the functions available in the Resonate Backend:

  1. create-room: Creates a new room, interacting with Appwrite and Livekit. Generates an access token for the admin.

  2. database-cleaner: Cleans up old data in the participants, active pairs, and OTP collections using Appwrite.

  3. delete-room: Deletes a room from both Appwrite and Livekit, including associated participant records. Ensures only the room admin can delete the room.

  4. join-room: Generates a Livekit access token for a user to join a specified room.

  5. livekit-webhook: Handles webhooks from Livekit. Specifically, it validates the webhook event and, if a room_finished event is received, it deletes the corresponding room from Appwrite.

  6. 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.

  7. 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.

  8. 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.

  9. start-friend-call: Sends a Firebase Cloud Messaging (FCM) data message to a specific recipient's FCM token, likely to initiate a call.

  10. sync-all-documents-with-meilisearch: Synchronizes all story and user documents from Appwrite databases to Meilisearch indexes in chunks.

  11. sync-stories-with-meilisearch: Synchronizes individual story documents to Meilisearch based on Appwrite document events (create, update, delete).

  12. sync-users-with-meilisearch: Synchronizes individual user documents to Meilisearch based on Appwrite document events (create, update, delete).

  13. upcomingRoom-isTime-checker: Checks upcoming rooms and updates their isTime status 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.)

  14. upcomingRoom-Message-Notification: Sends notifications to subscribers and the creator of an upcoming room, using Firebase Cloud Messaging (FCM) and Appwrite to retrieve tokens.

  15. verify-email: Updates the email verification status of a user in Appwrite to true for a given user ID.

  16. verify-otp: Verifies a user-provided OTP against a stored OTP in Appwrite and records the verification status.

Communication Channels

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!

About

Appwrite Cloud Functions for Resonate Project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 65.9%
  • PowerShell 17.8%
  • Shell 16.3%