{"id":15040538,"url":"https://github.com/nz-m/socialecho","last_synced_at":"2025-04-11T11:49:22.754Z","repository":{"id":130556427,"uuid":"601336741","full_name":"nz-m/SocialEcho","owner":"nz-m","description":"Social networking platform with automated content moderation and context-based authentication system","archived":false,"fork":false,"pushed_at":"2024-06-13T11:51:58.000Z","size":19907,"stargazers_count":2291,"open_issues_count":17,"forks_count":545,"subscribers_count":29,"default_branch":"main","last_synced_at":"2025-04-03T18:11:16.108Z","etag":null,"topics":["authentication","azure-blob-storage","azure-storage","bart-large-mnli","express","huggingface-transformers","jwt-authentication","mern-project","mern-stack","mongodb","mongoose","nodejs","react","redux","social-media"],"latest_commit_sha":null,"homepage":"https://socialecho.netlify.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nz-m.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-13T21:15:59.000Z","updated_at":"2025-04-03T16:08:19.000Z","dependencies_parsed_at":"2025-01-16T07:09:02.088Z","dependency_job_id":"916140f0-f614-42cb-a708-68e63b70f8e1","html_url":"https://github.com/nz-m/SocialEcho","commit_stats":{"total_commits":287,"total_committers":3,"mean_commits":95.66666666666667,"dds":0.132404181184669,"last_synced_commit":"4dc6c7822bfff5c0b13e1b8098e8d7ae0084939a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nz-m%2FSocialEcho","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nz-m%2FSocialEcho/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nz-m%2FSocialEcho/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nz-m%2FSocialEcho/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nz-m","download_url":"https://codeload.github.com/nz-m/SocialEcho/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248389156,"owners_count":21095530,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","azure-blob-storage","azure-storage","bart-large-mnli","express","huggingface-transformers","jwt-authentication","mern-project","mern-stack","mongodb","mongoose","nodejs","react","redux","social-media"],"created_at":"2024-09-24T20:44:42.974Z","updated_at":"2025-04-11T11:49:22.734Z","avatar_url":"https://github.com/nz-m.png","language":"JavaScript","readme":"# SocialEcho\n\nA social networking platform with automated content moderation and context-based authentication system.\n\n[Watch Demo](https://youtu.be/Tmncayg7FeU)\n\n![UI-community](https://raw.githubusercontent.com/nz-m/SocialEcho/main/resources/UI-community.png)\n\n## Table of Contents\n\n- [Project Overview](#project-overview)\n- [Features](#features)\n- [Technologies](#technologies)\n- [Schema Diagram](#schema-diagram)\n- [Getting Started](#getting-started)\n- [Usage](#usage)\n- [License](#license)\n\n## Project Overview\n\nThe project is a social networking platform built using the MERN (MongoDB, Express.js, React.js, Node.js) stack. It incorporates two major features: an automated content moderation system and context-based authentication. These features are accompanied by common functionalities found in social media applications, such as profile creation, post creation and sharing, liking and commenting on posts, and following/unfollowing users.\n\n### Automated Content Moderation\n\nThe platform's automated content moderation system utilizes various NLP (Natural Language Processing) APIs. These APIs include:\n\n- Perspective API: Used for filtering spam, profanity, toxicity, harassment etc.\n- TextRazor API: Integrated for content categorization.\n- Hugging Face Interface API: Utilized with BART Large MNLI for content categorization.\n\nA Flask application has been developed to provide similar functionality as the Hugging Face Interface API's classifier. The Flask app utilizes the BART Large MNLI model. It operates as a zero-shot classification pipeline with a PyTorch framework.\n\nThe system allows flexibility in choosing different services for API usage or disabling them without affecting overall functionality by using a common interface for interacting with the APIs.\n\nWhen a user posts content, it undergoes a thorough filtering process to ensure compliance with the community guidelines. Additionally, users have the ability to report posts that they find inappropriate, which triggers a manual review process.\n\n### Context-Based Authentication\n\nThe platform implements context-based authentication to enhance user account security. It takes into consideration user location, IP address, and device information for authentication purposes. Users can conveniently manage their devices directly from the platform. To ensure data privacy, this information is encrypted using the AES algorithm and securely stored in the database.\n\nIn case of a suspicious login attempt, users are promptly notified via email and are required to confirm their identity to protect against unauthorized access.\n\n### User Roles\n\nThere are three distinct user roles within the system:\n\n1. Admin: The admin role manages the overall system, including moderator management, community management, content moderation, monitoring user activity, and more.\n2. Moderators: Moderators manage communities, manually review reported posts, and perform other moderation-related tasks.\n3. General Users: General users have the ability to make posts, like comments, and perform other actions within the platform.\n\n\n\n## Features\n\n- [x] User authentication and authorization (JWT)\n- [x] User profile creation and management\n- [x] Post creation and management\n- [x] Commenting on posts\n- [x] Liking posts and comments\n- [x] Following/unfollowing users\n- [x] Reporting posts\n- [x] Content moderation\n- [x] Context-based authentication\n- [x] Device management\n- [x] Admin dashboard\n- [x] Moderator dashboard\n- [x] Email notifications\n\n\n## Technologies\n\n- React.js\n- Redux\n- Node.js\n- Express.js\n- MongoDB\n- Tailwind CSS\n- JWT Authentication\n- Passport.js\n- Nodemailer\n- Crypto-js\n- Azure Blob Storage\n- Flask\n- Hugging Face Transformers\n\n\n## Schema Diagram\n\n![Schema Diagram](https://raw.githubusercontent.com/nz-m/SocialEcho/main/resources/Schema-Diagram.png)\n\n\n\n## Getting Started\n\n### Prerequisites\n\nBefore running the application, make sure you have the following installed:\n\n- Node.js\n- MongoDB or MongoDB Atlas account\n\n### Installation\n\n1. Clone the repository\n\n```bash\ngit clone https://github.com/nz-m/SocialEcho.git\n```\n2. Go to the project directory and install dependencies for both the client and server\n\n```bash\ncd client\nnpm install\n```\n\n```bash\ncd server\nnpm install\n```\n\n3. Create a `.env` file in both the `client` and `server` directories and add the environment variables as shown in the `.env.example` files.\n4. Start the server\n\n```bash\ncd server\nnpm start\n```\n\n5. Start the client\n\n```bash\ncd client\nnpm start\n```\n\n\n### Configuration\n\nRun the `admin_tool.sh` script from the server directory with permissions for executing the script. This script is used for configuring the admin account, creating the initial communities, and other settings.\n```bash\n./admin_tool.sh\n``` \n\n#### `.env` Variables\n\nFor email service of context-based authentication, the following variables are required:\n\n```bash\nEMAIL=\nPASSWORD=\nEMAIL_SERVICE=\n```\n\nFor content moderation, you need the `PERSPECTIVE_API_KEY` and either the `INTERFACE_API_KEY` or `TEXTRAZOR_API_KEY`. Visit the following links to obtain the API keys:\n\n- [Perspective API](https://developers.perspectiveapi.com/s/docs-get-started)\n- [TextRazor API](https://www.textrazor.com/)\n- [Hugging Face Interface API](https://huggingface.co/facebook/bart-large-mnli)\n\nIf you prefer, the Flask server can be run locally as an alternative to using the Hugging Face Interface API or TextRazor API. Refer to the `classifier_server` directory for more information.\n\n\n\u003e**Note:** Configuration for context-based authentication and content moderation features are **_not mandatory_** to run the application. However, these features will not be available if the configuration is not provided.\n\n\n## Usage\n\n### Admin\n\nThe admin dashboard can be accessed at the `/admin` route. Use the `admin_tool.sh` script to configure the admin account. The admin account can be used to manage moderators, communities, and perform other admin-related tasks. You can also enable/disable or switch API services using the admin dashboard.\n\n### Moderator\n\nModerators have specific email domain (`@mod.socialecho.com`). When registering with an email from this domain, the user is automatically assigned the moderator role. Moderators can be assigned to different communities from the admin dashboard.\n\n#### Demo\nhttps://youtu.be/Tmncayg7FeU\n\n## License\n\nThis project is licensed under the [MIT License](https://github.com/nz-m/SocialEcho/blob/main/LICENSE).\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnz-m%2Fsocialecho","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnz-m%2Fsocialecho","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnz-m%2Fsocialecho/lists"}