Skip to content

devdixit-dev/itag-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 ITAG Backend API

A robust and scalable backend API built with Node.js and Express, designed to manage authentication, users, jobs, reports, and media services.
This project provides a well-structured MVC architecture with secure middleware, efficient database integration, and reusable service modules.


🚀 Overview

ITAG Backend serves as the core API for the ITAG ecosystem — handling all server-side logic, authentication, admin management, and CRUD operations for users, jobs, and multimedia content.

It follows clean architecture principles and is production-ready for deployment with Docker, PM2, or cloud environments like AWS, Vercel, or Render.


🧩 Features

  • User Authentication — JWT-based login and registration system
  • Admin Management — Admin-level access for sensitive actions
  • Database Integration — MongoDB-based models with schema validation
  • File Uploads — Multer-based file handling for images and videos
  • Email Service — Integrated mailing system for notifications
  • Error Handling — Centralized and structured error responses
  • Security — Auth middleware, input sanitization, and secure headers
  • Extensible Architecture — Clean separation of concerns with controllers, models, and routes

🛠️ Tech Stack

Layer Technology
Runtime Node.js (v18+)
Framework Express.js
Database MongoDB (Mongoose ODM)
File Uploads Multer
Authentication JWT
Mailing Nodemailer
Middleware Custom Auth + Express Middleware
Services Mailer Service, Multer Service

📁 Project Structure

Itag-backend-main/
├── app.js                  # Main entry point
├── config/
│   └── db.js               # MongoDB connection
├── controllers/
│   ├── admin.controller.js
│   ├── auth.controller.js
│   └── user.controller.js
├── middlewares/
│   └── AuthMiddleware.js   # JWT authentication middleware
├── models/
│   ├── client.model.js
│   ├── email.model.js
│   ├── guide.model.js
│   ├── job.model.js
│   ├── jobApp.model.js
│   ├── report.model.js
│   └── video.model.js
├── routes/
│   ├── admin.route.js
│   ├── auth.route.js
│   └── user.route.js
├── services/
│   ├── mailer.service.js
│   └── multer.service.js
├── images/
│   ├── logo.png
│   └── logo.svg
├── package.json
└── .gitignore

⚙️ Installation & Setup

1️⃣ Clone the Repository

git clone https://github.com/devdixit-dev/Itag-backend.git
cd Itag-backend

2️⃣ Install Dependencies

npm install

3️⃣ Create .env File

PORT=5000
MONGODB_URI=mongodb://localhost:27017/itag
JWT_SECRET=your_jwt_secret
EMAIL_USER=your_email@example.com
EMAIL_PASS=your_password

4️⃣ Start the Development Server

npm start

or for live-reload:

npm run dev

Server runs at:
👉 http://localhost:5000


🔗 API Endpoints

Auth

Method Endpoint Description
POST /api/auth/register Register new user
POST /api/auth/login Login existing user

Admin

Method Endpoint Description
GET /api/admin/users Get all users
DELETE /api/admin/user/:id Delete user
POST /api/admin/announce Send announcement email

User

Method Endpoint Description
GET /api/user/profile Get user profile
PUT /api/user/update Update profile
GET /api/user/jobs Get available jobs

Jobs

Method Endpoint Description
GET /api/jobs Get all jobs
POST /api/jobs/create Create new job
PUT /api/jobs/update/:id Update job
DELETE /api/jobs/delete/:id Delete job

🧰 Scripts

Command Description
npm start Start production server
npm run dev Start development server with nodemon
npm test Run tests (if configured)
npm run lint Lint code for style issues

🔒 Security & Best Practices

  • Uses JWT for secure authentication
  • Protects routes with AuthMiddleware
  • Sanitizes user inputs to prevent XSS/SQL injection
  • Uses Helmet.js and CORS for secure HTTP headers
  • Environment variables managed via .env

📬 Contact

Author: Dev Dixit
Email: devdixitsocial@gmail.com
GitHub: https://github.com/devdixit-dev


📝 License

This project is licensed under the MIT License.

About

I Tag Backend is a modern, high-performance server built to power scalable web applications. It delivers secure authentication, efficient data management, and modular architecture using Node.js, Express, and MongoDB.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors