sharaha-app-api

Sharaha Anonymous Messaging API: Secure Backend & Privacy-Focused Gateway

Node.js Express.js MongoDB License

خادم منصة صراحة للمصارحة هو خادم برمجيات خلفي مبني باستخدام Express وقاعدة بيانات MongoDB لمعالجة الرسائل المجهولة وإدارتها بشكل يحمي خصوصية البيانات ويمنع تسرب هويات المرسلين.

This repository houses the secure backend RESTful API, authentication handlers, and messaging database tables for the Sharaha Anonymous Feedback App.


🧬 Anonymous Message Flow

The system processes incoming anonymous statements and logs them securely:

graph TD
    Visitor[Anonymous User] -->|Write message & submit| API[REST Routing Endpoint]
    API -->|Strip IP and Sender metadata| Filter[Sanitization Filter]
    Filter -->|Check user link validity| DBQuery[Mongoose DB Check]
    DBQuery -->|Valid| Save[Save Message to MongoDB]
    Save -->|Success| Res[Return JSON message_id]

🧬 Core Services & Layouts

  1. Anonymizer Filter (src/controllers/messages.js): Sanitizes incoming message bodies while avoiding tracking sender metadata.
  2. User Authentication (src/controllers/auth.js): JWT access tokens and bcrypt hashing protect recipient inbox access.

🛠️ Technology Stack & Assets


📂 Repository Module Layout

sharaha-app-api/
├── src/
│   ├── controllers/     # Message handling and auth execution logic
│   ├── models/          # MongoDB Schemas (Users, Messages)
│   ├── routes/          # RESTful endpoint paths
│   └── app.js           # Server application startup configurations
├── package.json         # Node metadata
└── README.md            # System documentation

⚡ Local Setup & Run

git clone https://github.com/Sayed-Herzallah/sharaha-app-api.git
cd sharaha-app-api
npm install
# Configure MONGO_URI inside config/.env
npm start

📄 License

Licensed under the MIT License.