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.
- π 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.
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;
- 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
Ensure you have the following installed:
- Node.js 18+
- MongoDB (local or cloud instance)
- A text editor (VS Code recommended)
- Clone the repository:
git clone https://github.com/username/it-management-system.git
cd it-management-system
- Install dependencies:
npm install
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
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
npm run dev
Visit: http://localhost:3000
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
- /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.
- 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.
- 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.
- 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)
MIT License Β© 2025 Aryan Baadlas
π¨βπ» Aryan Baadlas
π§ aryanbaadlas@gmail.com
If you like this project, give it a star β on GitHub!