Skip to content

Backend server for Trosc student club website — authentication, courses, events, and dashboard API built with Node.js, Express, and MongoDB.

License

Notifications You must be signed in to change notification settings

Basem3sam/trosc-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎓 Trosc Backend

Backend server for Trosc, the student club at facility of computer science and informatics @ suez canal university, powering authentication, course streaming, events, and more.


🚀 Overview

This project is the backend system for Trosc, a student community website.
It handles user authentication, course & track management, event scheduling, announcements, and admin dashboards — all secured and scalable.


🧰 Tech Stack

Category Technologies
Runtime Node.js (Express.js)
Database MongoDB (Mongoose ODM)
Security Helmet, Rate Limiting, XSS-Clean, HPP, Mongo Sanitize
Validation Joi
Emailing Nodemailer
File Uploads Multer + Cloudinary
Auth JWT (JSON Web Token)
Linting & Formatting ESLint + Prettier
Environment dotenv

🧩 Folder Structure

src/
 ├── app.js
 ├── server.js
 ├── controllers/
 ├── models/
 ├── routes/
 ├── services/
 ├── utils/
 ├── middlewares/
 └── config/

⚙️ Setup & Installation

1️⃣ Clone the repo

git clone https://github.com/basem3sam/trosc-backend.git
cd trosc-backend

2️⃣ Install dependencies

npm install

3️⃣ Add environment variables

Create a .env file in the root directory:

NODE_ENV=development
PORT=5000
MODE=development

DATABASE_URL=mongodb+srv://<username>:<password>@cluster.mongodb.net/trosc
JWT_SECRET=supersecretkey
JWT_EXPIRES_IN=30d

EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
[email protected]
EMAIL_PASS=your_app_password

CLOUDINARY_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret

CORS_ORIGIN=http://localhost:3000

(Don’t forget to replace credentials.)

4️⃣ Start the server

npm start

🧪 Scripts

Script Description
npm start Start server in dev mode with nodemon
npm start:prod Start server in production
npm run lint Run ESLint check
npm run debug Run in debug mode

🔐 Security Features

  • Helmet for HTTP header protection
  • Rate limiting to prevent brute-force
  • Sanitization against NoSQL injection & XSS
  • Secure JWT-based authentication

📦 API Modules (In Progress)

  • Auth — register, login, forgot password
  • Users — manage profiles
  • Tracks — stream courses, rate & comment
  • Events — schedule and manage club events
  • Admin Dashboard — stats and content control

🧑‍💻 Author

Basem Esam Omar
Backend Engineer — Node.js | MongoDB | Express.js
GitHub Profile LinkedIN Profile


🏗️ License

This project is licensed under the ISC License — feel free to use and improve it for educational purposes.

About

Backend server for Trosc student club website — authentication, courses, events, and dashboard API built with Node.js, Express, and MongoDB.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors