Skip to content

Backend for Silent Desk – A secure, anonymous messaging platform with JWT authentication, role-based access, and class management. Built with Node.js, Express, and MongoDB.

License

Notifications You must be signed in to change notification settings

madihamalghani/backend-silent-desk

Repository files navigation

Backend Silent-desk

The backend of Silent Desk is built with Node.js, Express.js, and MongoDB.

It provides APIs for class management, anonymous messaging, authentication, and admin controls.


Features

  • Authentication with JWT and bcrypt
  • Class Management: create, join, and manage classes
  • Anonymous Messaging with reply support
  • Admin Controls: approve/block requests, promote users, manage settings
  • Announcements to class members

Tech Stack

  • Core: Node.js, Express.js, MongoDB, Mongoose
  • Security & Auth: bcrypt, JSON Web Tokens (JWT), cookie-parser, dotenv
  • Utilities: cors, date-fns
  • Dev Tools: nodemon

Installation & Setup

1. Clone the repository

git clone https://github.com/madihamalghani/backend-silent-desk.git
cd backend-silent-desk

2. Install dependencies

npm install 

3. Environment Variables

Create a .env file in the backend root:

PORT=5000
MONGO_URI=your_mongodb_connection_string
FRONTEND_URL=http://localhost:5173
JWT_SECRET=your_jwt_secret
JWT_EXPIRE=7d
COOKIE_EXPIRE=5


4. Run the Server

npm run dev

The backend will run at:

👉 http://localhost:5000/


Development Notes

  • Use MongoDB Atlas or local MongoDB instance for the database.
  • JWT secret must be kept safe (do not commit .env).
  • Can be combined with frontend (React + Vite) using concurrently to run both.

📜 License

This project is licensed under the MIT License.

About

Backend for Silent Desk – A secure, anonymous messaging platform with JWT authentication, role-based access, and class management. Built with Node.js, Express, and MongoDB.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published