Skip to content

IT Management System is a secure platform for managing users and devices. Built with Next.js, MongoDB, and JWT, it features authentication, dashboards, device tracking, and admin settings. With search, pagination, and modern UI, it empowers IT teams to efficiently handle assets, employees, and audits with ease.

License

Notifications You must be signed in to change notification settings

be-a-guptaji/IT-Management-System

Repository files navigation

πŸ–₯️ IT Management System

License Status Next.js TypeScript TailwindCSS MongoDB


πŸ“– About The Project

IT Management System is a full-stack IT asset and user management platform that helps organizations securely manage employees, their assigned devices, and authentication. The platform offers admin dashboards, secure login, device tracking, and project scalability.

Built using Next.js, MongoDB, JWT, Zustand, and ShadCN UI, this system ensures robust data handling, a modern responsive design, and enterprise-ready security practices.

It is perfect for IT admins, HR teams, and organizations that need to manage large sets of users and their assets with precision.


✨ Key Features

  • πŸ”‘ JWT Authentication: Secure login and session handling with token expiry and ban mechanism.
  • πŸ‘₯ User Management: Create, edit, list, and delete users with support for pagination and search.
  • πŸ’» Device Tracking: Assign devices to users, track multiple devices per employee, and monitor status.
  • πŸ—‘ Soft Delete System: Devices are not permanently deleted; instead, they are flagged and preserved for audit history.
  • πŸ”’ Admin Settings: Update password, change username, and manage authentication settings.
  • 🧭 Search & Pagination: Optimized for large datasets to ensure smooth browsing.
  • πŸ–Ό Modern Responsive UI: Built with TailwindCSS + ShadCN for an interactive and mobile-first design.
  • ⚑ State Management: Managed with Zustand for predictable app-wide state handling.

πŸ“Έ Screenshots

Login Page

Login

Dashboard

Dashboard

Search User

Search User

Add User

Add User

Device Management

Devices

Admin Settings

Settings

Change Name

Change Name

Change Password

Change Password


πŸ—οΈ Architecture

The system follows a client-server model designed for performance, modularity, and scalability.

  • Frontend (Next.js + TailwindCSS + ShadCN UI):

    • Renders the dashboard, forms, and settings.
    • Manages authentication state and client routing.
    • Zustand for state persistence.
  • Backend (Next.js API Routes):

    • Handles authentication, user, and device CRUD operations.
    • Validates tokens and sessions.
  • Database (MongoDB + Mongoose):

    • Stores user data, admin profiles, devices, and blacklisted tokens.
  • Authentication (JWT):

    • Provides secure login with expiration and token invalidation.
graph TD
    %% ==============================
    %% CLIENT LAYER
    %% ==============================
    subgraph Client
    U[πŸ–₯️ User Browser] --> F[πŸ’» Next.js Frontend]
    end

    %% ==============================
    %% BACKEND & API LAYER
    %% ==============================
    subgraph Backend
    F --> API[βš™οΈ Next.js API Routes]
    API --> DB[(πŸ—„οΈ MongoDB via Mongoose)]
    API --> Auth[πŸ” JWT Authentication Service]
    API --> RT[πŸ”— WebSocket - Real-Time Updates]
    API --> Files[πŸ“‚ File Upload Service]
    end

    %% ==============================
    %% AUTHENTICATION
    %% ==============================
    subgraph Authentication
    Auth --> DB
    U -->|πŸ”‘ Login/Signup| Auth
    Auth -->|βœ… Validate & Issue JWT| U
    end

    %% ==============================
    %% DATABASE
    %% ==============================
    subgraph Database
    DB[(πŸ—„οΈ MongoDB)]
    DB --> Users[πŸ‘€ Users Collection]
    DB --> Devices[πŸ’» Devices Collection]
    DB --> Tickets[🎫 Support Tickets Collection]
    DB --> Logs[πŸ“œ Activity Logs Collection]
    end

    %% ==============================
    %% SERVICES
    %% ==============================
    subgraph Services
    API --> Notif[πŸ”” Notification Service]
    API --> Billing[πŸ’³ Billing/Payments Service]
    API --> Reports[πŸ“Š Reporting & Analytics Engine]
    end

    %% ==============================
    %% FLOWS
    %% ==============================
    U -->|πŸ“Š View Dashboard| F
    U -->|πŸ“‘ Request Device Data| API
    API -->|πŸ“‚ Fetch & Return Data| Devices
    U -->|πŸ“€ Upload Document| Files
    Files --> DB
    API -->|πŸ”” Send Alert| Notif
    Billing --> API
    Reports --> API

    %% ==============================
    %% STYLING
    %% ==============================
    classDef client fill:#6ac6b7,stroke:#000,stroke-width:2px,color:#000;
    classDef backend fill:#f1a4cb,stroke:#000,stroke-width:2px,color:#000;
    classDef auth fill:#92f6c5,stroke:#000,stroke-width:2px,color:#000;
    classDef db fill:#f1e1a4,stroke:#000,stroke-width:2px,color:#000;
    classDef services fill:#82c7f9,stroke:#000,stroke-width:2px,color:#000;
    classDef user fill:#ffcc00,stroke:#000,stroke-width:2px,color:#000;

    %% Apply classes
    class U user;
    class F client;
    class API,RT,Files backend;
    class Auth auth;
    class DB,Users,Devices,Tickets,Logs db;
    class Notif,Billing,Reports services;

Loading

πŸ›  Built With

  • Frontend: Next.js 15, TypeScript, TailwindCSS, ShadCN UI
  • Backend: Next.js API Routes, Mongoose, JWT
  • Database: MongoDB
  • State Management: Zustand
  • Forms & Validation: React Hook Form + Zod

βš™οΈ Getting Started

Prerequisites

Ensure you have the following installed:

  • Node.js 18+
  • MongoDB (local or cloud instance)
  • A text editor (VS Code recommended)

Installation

  1. Clone the repository:
git clone https://github.com/username/it-management-system.git
cd it-management-system
  1. Install dependencies:
npm install

Configuration

Rename .env.samples to .env.local and set the following:

NODE_ENV=development
NEXT_PUBLIC_SITE_URL=http://localhost:3000
NEXT_PUBLIC_API_BASE_URL=http://localhost:3000/api
MONGODB_URI=mongodb://localhost:27017/
DB_NAME=IT_Management_System
SALT_ROUNDS=10
JWT_SECRET=your_secret
JWT_EXPIRES_IN=10h
NEXT_PUBLIC_PAGE_SIZE=50

Database Setup

MongoDB is used as the primary database. Ensure your local/remote MongoDB instance is running.

You can verify connection via:

mongosh
use IT_Management_System

Run Development Server

npm run dev

Visit: http://localhost:3000


πŸ“ Directory Structure

The project is organized as follows:

Directory structure:
└── it-management-system/
    β”œβ”€β”€ README.md
    β”œβ”€β”€ components.json
    β”œβ”€β”€ eslint.config.mjs
    β”œβ”€β”€ LICENSE
    β”œβ”€β”€ next.config.ts
    β”œβ”€β”€ package.json
    β”œβ”€β”€ pnpm-workspace.yaml
    β”œβ”€β”€ postcss.config.mjs
    β”œβ”€β”€ tsconfig.json
    β”œβ”€β”€ .env.samples
    β”œβ”€β”€ .prettierignore
    β”œβ”€β”€ .prettierrc.json
    β”œβ”€β”€ app/
    β”‚   β”œβ”€β”€ globals.css
    β”‚   β”œβ”€β”€ layout.tsx
    β”‚   β”œβ”€β”€ not-found.tsx
    β”‚   β”œβ”€β”€ page.tsx
    β”‚   β”œβ”€β”€ add-user/
    β”‚   β”‚   └── page.tsx
    β”‚   β”œβ”€β”€ api/
    β”‚   β”‚   β”œβ”€β”€ auth/
    β”‚   β”‚   β”‚   β”œβ”€β”€ log-out/
    β”‚   β”‚   β”‚   β”‚   └── route.ts
    β”‚   β”‚   β”‚   β”œβ”€β”€ login/
    β”‚   β”‚   β”‚   β”‚   └── route.ts
    β”‚   β”‚   β”‚   β”œβ”€β”€ validate/
    β”‚   β”‚   β”‚   β”‚   └── route.ts
    β”‚   β”‚   β”‚   └── verify/
    β”‚   β”‚   β”‚       └── route.ts
    β”‚   β”‚   β”œβ”€β”€ settings/
    β”‚   β”‚   β”‚   β”œβ”€β”€ change-password/
    β”‚   β”‚   β”‚   β”‚   └── route.ts
    β”‚   β”‚   β”‚   └── change-userName/
    β”‚   β”‚   β”‚       └── route.ts
    β”‚   β”‚   └── user/
    β”‚   β”‚       β”œβ”€β”€ edit/
    β”‚   β”‚       β”‚   └── [id]/
    β”‚   β”‚       β”‚       └── route.ts
    β”‚   β”‚       β”œβ”€β”€ get-user-by-id/
    β”‚   β”‚       β”‚   └── [id]/
    β”‚   β”‚       β”‚       └── route.ts
    β”‚   β”‚       β”œβ”€β”€ get-users/
    β”‚   β”‚       β”‚   β”œβ”€β”€ route.ts
    β”‚   β”‚       β”‚   └── [name]/
    β”‚   β”‚       β”‚       └── route.ts
    β”‚   β”‚       └── register-user/
    β”‚   β”‚           └── route.ts
    β”‚   β”œβ”€β”€ home/
    β”‚   β”‚   └── page.tsx
    β”‚   β”œβ”€β”€ manage-user/
    β”‚   β”‚   β”œβ”€β”€ page.tsx
    β”‚   β”‚   └── [userID]/
    β”‚   β”‚       └── page.tsx
    β”‚   └── settings/
    β”‚       └── page.tsx
    β”œβ”€β”€ components/
    β”‚   β”œβ”€β”€ footer/
    β”‚   β”‚   └── Index.tsx
    β”‚   β”œβ”€β”€ header/
    β”‚   β”‚   └── Index.tsx
    β”‚   β”œβ”€β”€ loadings/
    β”‚   β”‚   β”œβ”€β”€ AddUserPageLoading.tsx
    β”‚   β”‚   β”œβ”€β”€ HomePageLoading.tsx
    β”‚   β”‚   └── SettingsPageLoading.tsx
    β”‚   β”œβ”€β”€ navigation/
    β”‚   β”‚   └── Index.tsx
    β”‚   └── ui/
    β”‚       β”œβ”€β”€ button.tsx
    β”‚       β”œβ”€β”€ card.tsx
    β”‚       β”œβ”€β”€ dialog.tsx
    β”‚       β”œβ”€β”€ form.tsx
    β”‚       β”œβ”€β”€ input.tsx
    β”‚       β”œβ”€β”€ label.tsx
    β”‚       β”œβ”€β”€ separator.tsx
    β”‚       β”œβ”€β”€ sheet.tsx
    β”‚       β”œβ”€β”€ sidebar.tsx
    β”‚       β”œβ”€β”€ skeleton.tsx
    β”‚       β”œβ”€β”€ sonner.tsx
    β”‚       β”œβ”€β”€ tooltip.tsx
    β”‚       └── UserBox.tsx
    β”œβ”€β”€ hooks/
    β”‚   β”œβ”€β”€ use-mobile.ts
    β”‚   └── useAuth.ts
    β”œβ”€β”€ lib/
    β”‚   β”œβ”€β”€ axios.ts
    β”‚   β”œβ”€β”€ constant.ts
    β”‚   β”œβ”€β”€ db.ts
    β”‚   β”œβ”€β”€ parseJwtExpiry.ts
    β”‚   β”œβ”€β”€ types.ts
    β”‚   β”œβ”€β”€ utils.ts
    β”‚   β”œβ”€β”€ models/
    β”‚   β”‚   β”œβ”€β”€ Admin.model.ts
    β”‚   β”‚   β”œβ”€β”€ BanToken.model.ts
    β”‚   β”‚   β”œβ”€β”€ Device.model.ts
    β”‚   β”‚   └── User.model.ts
    β”‚   └── store/
    β”‚       └── useStore.ts
    └── services/
        β”œβ”€β”€ GET.tsx
        └── POST.tsx

Key Folders:

  • /app/api β†’ Backend APIs for authentication, users, and devices.
  • /models β†’ Mongoose schemas (User, Device, Admin, Token).
  • /components β†’ UI components (forms, tables, modals).
  • /lib β†’ Helpers (JWT signing, validation, encryption).
  • /hooks β†’ Zustand state hooks.
  • /public β†’ Static assets.

πŸ” Authentication

  • JWT Authentication: All routes are secured via JSON Web Tokens.
  • Password Hashing: Passwords hashed with bcrypt and salt rounds.
  • Token Blacklist: Expired/banned tokens stored in DB to prevent misuse.

πŸš€ Device & User Management

  • Add new users with multiple device assignments.
  • Update, search, and paginate users & devices.
  • Soft-delete devices for audit trail.
  • Admins can reset credentials via settings page.

πŸ›£οΈ Roadmap

  • User Management (CRUD)
  • Device Management (CRUD + Soft Delete)
  • JWT Authentication & Admin Settings
  • Role-Based Access Control (RBAC)
  • Export Reports (PDF, CSV)
  • Cloud Deployment (Vercel/AWS)

πŸ“œ License

MIT License Β© 2025 Aryan Baadlas


πŸ“¬ Contact

πŸ‘¨β€πŸ’» Aryan Baadlas
πŸ“§ aryanbaadlas@gmail.com


⭐ Show some love!

If you like this project, give it a star ⭐ on GitHub!

About

IT Management System is a secure platform for managing users and devices. Built with Next.js, MongoDB, and JWT, it features authentication, dashboards, device tracking, and admin settings. With search, pagination, and modern UI, it empowers IT teams to efficiently handle assets, employees, and audits with ease.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published