📄Backend

Understand Matar backend architecture and its elements.


Matar’s Backend architecture consists of various elements working together to deliver a seamless experience to our users. These elements can be categorized into:


Backend Scripts

The backend algorithms are broadly divided into two types:

  1. Time-based (Cron jobs): These algorithms are scheduled to run at specific intervals, performing tasks such as content sorting updates, analytics, and maintenance. They play a crucial role in largely managing the content order displayed to users in Matar.

  2. Trigger (API) based algorithms: These algorithms are activated by specific events or user actions, triggering actions like user verification (OTP-based), content sourcing based on categories, and user personalization. They respond dynamically to user interactions, enhancing the user journey. An in-depth overview of the backend scripts and their functionalities is provided below:


Storage

The storage component of Matar encompasses Database Architecture and Content Storage.


Database Architecture:

The database is designed following the top-down hierarchical structure of the app:

  1. Organizations: This level defines community rules, language preferences, and users associated with each organization.

  2. Topics/Categories: Categorization of feed into relevant tags, allowing users to explore specific content.

  3. Questions: Parent posts - Questions users ask through audio recordings.

  4. Answers: Replies to questions, forming threads of discussions.


Data Division:

  1. User Data: Contains user-level data, including permissions for each organization/community, user profiles, and preferred language.

  2. Post Data: Stores all information related to posts, differentiating between questions (parent posts) and answers (child posts). This table holds properties like post type (GPT/peer), audio details, duration, transcribed text, post status (active/inactive), category, and organization affiliations. A unique post can belong to multiple categories, but it can only be associated with one organization.

  3. Category Data: Records the categories belonging to each organization.

  4. Organization Data: Contains organization details, default language settings, whether GPT is enabled for the community, and the maximum duration allowed for questions asked within the organization.

  5. Post Activity Data: Stores non-core interactions on posts, such as views and reactions (likes, dislikes, blocks), left by users.


Content Storage:

In addition to storing data in the database, we store raw media content in S3 buckets. This content can be directly streamed on the front end, enabling smooth and efficient access for users.

Last updated