Volver al ranking

nz-m/SocialEcho

JavaScriptsocialecho.netlify.app

Social networking platform with automated content moderation and context-based authentication system

expressjwt-authenticationmern-projectmongodbmongoosenodejsreactreduxbart-large-mnlihuggingface-transformersazure-blob-storageazure-storage
Crecimiento de estrellas
Estrellas
2.4k
Forks
594
Crecimiento semanal
Issues
13
1k2k
feb 2023mar 2024may 2025jul 2026
Artefactosnpmnpm install socialecho
README

SocialEcho

A social networking platform with automated content moderation and context-based authentication system.

Watch Demo

UI-community

Table of Contents

Project Overview

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

Automated Content Moderation

The platform's automated content moderation system utilizes various NLP (Natural Language Processing) APIs. These APIs include:

  • Perspective API: Used for filtering spam, profanity, toxicity, harassment etc.
  • TextRazor API: Integrated for content categorization.
  • Hugging Face Interface API: Utilized with BART Large MNLI for content categorization.

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

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

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

Context-Based Authentication

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

In case of a suspicious login attempt, users are promptly notified via email and are required to confirm their identity to protect against unauthorized access.

User Roles

There are three distinct user roles within the system:

  1. Admin: The admin role manages the overall system, including moderator management, community management, content moderation, monitoring user activity, and more.
  2. Moderators: Moderators manage communities, manually review reported posts, and perform other moderation-related tasks.
  3. General Users: General users have the ability to make posts, like comments, and perform other actions within the platform.

Features

  • User authentication and authorization (JWT)
  • User profile creation and management
  • Post creation and management
  • Commenting on posts
  • Liking posts and comments
  • Following/unfollowing users
  • Reporting posts
  • Content moderation
  • Context-based authentication
  • Device management
  • Admin dashboard
  • Moderator dashboard
  • Email notifications

Technologies

  • React.js
  • Redux
  • Node.js
  • Express.js
  • MongoDB
  • Tailwind CSS
  • JWT Authentication
  • Passport.js
  • Nodemailer
  • Crypto-js
  • Azure Blob Storage
  • Flask
  • Hugging Face Transformers

Schema Diagram

Schema Diagram

Getting Started

Prerequisites

Before running the application, make sure you have the following installed:

  • Node.js
  • MongoDB or MongoDB Atlas account

Installation

  1. Clone the repository
git clone https://github.com/nz-m/SocialEcho.git
  1. Go to the project directory and install dependencies for both the client and server
cd client
npm install
cd server
npm install
  1. Create a .env file in both the client and server directories and add the environment variables as shown in the .env.example files.
  2. Start the server
cd server
npm start
  1. Start the client
cd client
npm start

Configuration

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

./admin_tool.sh

.env Variables

For email service of context-based authentication, the following variables are required:

EMAIL=
PASSWORD=
EMAIL_SERVICE=

For 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:

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

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.

Usage

Admin

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

Moderator

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

Demo

https://youtu.be/Tmncayg7FeU

License

This project is licensed under the MIT License.

Repositorios relacionados
goldbergyoni/nodebestpractices

✅ The Node.js best practices list (July 2026)

DockerfileCreative Commons Attribution Share Alike 4.0 Internationalnodejsjavascript
twitter.com/nodepractices/
105.4k10.7k
expressjs/express

Fast, unopinionated, minimalist web framework for node.

JavaScriptnpmMIT Licensejavascriptnodejs
expressjs.com
69.2k24.3k
payloadcms/payload

Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.

TypeScriptnpmMIT Licenseheadless-cmscms
payloadcms.com
43.7k4k
gofiber/fiber

⚡️ Express inspired web framework written in Go

GoGo ModulesMIT Licensegogolang
gofiber.io
40k2k
goldbergyoni/javascript-testing-best-practices

📗🌐 🚢 Comprehensive and exhaustive JavaScript & Node.js testing best practices (August 2025)

JavaScriptnpmMIT Licensenodejstesting
testjavascript.com
24.6k2.1k
jaredhanson/passport

Simple, unobtrusive authentication for Node.js.

JavaScriptnpmMIT Licensenodejsexpress
passportjs.org
23.5k1.3k
nswbmw/N-blog

《一起学 Node.js》

JavaScriptnpmtutorialnodejs
15.4k4.5k
HabitRPG/habitica

A habit tracker app which treats your goals like a Role Playing Game.

JavaScriptnpmOtherhabiticajavascript
habitica.com
14k4.4k
apollographql/apollo-server

🌍  Spec-compliant and production ready JavaScript GraphQL server that lets you develop in a schema-first way. Built for Express, Connect, Hapi, Koa, and more.

TypeScriptnpmMIT Licensegraphqlgraphql-server
apollographql.com/docs/apollo-server/
13.9k2k
graphile/crystal

🔮 Graphile's Crystal Monorepo; home to Grafast, PostGraphile, pg-introspection, pg-sql2 and much more!

TypeScriptnpmMIT Licensegraphqlpostgres
graphile.org
12.9k620
bailicangdu/node-elm

Backend system based on node.js + Mongodb. 基于 node.js + Mongodb 构建的后台系统

JavaScriptnpmGNU General Public License v2.0nodeexpress
cangdu.org/elm/
12.3k3.7k
linnovate/mean

The MEAN stack uses Mongo, Express, Angular(6) and Node for simple and scalable fullstack js applications

TypeScriptnpmstackangular
mean.io
12.1k3.4k