Skip to content
プロジェクト

Zylioth/Nuqtah-Inventory_Management_System

GitHubで見る

概要

A web-based IT inventory management system for ITQSHHB designed to replace manual paper records with a digital, shopping-cart-style borrowing process. *Capstone Project for B20230012

ビジネス・金融

この数値の測り方

できること

  • Browse the inventory with search, category filter, and pagination
  • Add consumables and durable equipment to a cart
  • Submit a borrowing request with a pickup date and a return date
  • Track request status and read notes from the ICT team

計測したスター増加

24時間
0
7日間
履歴を収集中
15日間
履歴を収集中
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

Nuqtah

Nuqtah Inventory Management System

Equipment inventory and borrowing system for the ICT Department of ITQSHHB.

Nuqtah keeps track of the IT equipment a campus owns and handles the borrowing requests for it. Students and staff browse what is in stock, add items to a cart, and send a request with pickup and return dates. The ICT team approves requests, hands items over, records returns, and keeps an audit trail of every action.

I built it as my final year capstone project. The repository is public so other students can read the code, borrow ideas, or run it for their own department.

  • Author: Muhammad Amir Sabrin (B20230012)
  • GitHub: @Zylioth
  • Status: capstone finished, maintained occasionally

Screenshots

The public landing page, sign in, admin dashboard, equipment catalogue, borrowing request queue, and audit log. Captures use the demo dataset, so the names are fictional.

Public landing page Sign in
Admin dashboard Equipment catalogue
Borrowing request queue Audit log

Features

For students and staff:

  • Browse the inventory with search, category filter, and pagination
  • Add consumables and durable equipment to a cart
  • Submit a borrowing request with a pickup date and a return date
  • Track request status and read notes from the ICT team
  • Receive email notifications when an account is activated, a request is approved or rejected, an item is handed over, or a return is recorded
  • Change password, and reset a forgotten password with a 6-digit code sent by email

For administrators:

  • Dashboard with counts for total assets, pending requests, low stock, out of stock, and overdue loans
  • Category chart, restock watchlist, and a list of requests that need attention
  • Add, edit, and delete assets, including an uploaded photo
  • Register individual serial tags per asset, with status per unit (Available, On Loan, Issued, Maintenance, Damaged)
  • Approve or reject requests, issue items with a specific tag and a handover note, and record returns with a condition note
  • Manage users: create accounts, edit details, activate, suspend, and delete
  • Generate borrowing, stock, and audit reports, and print them
  • Searchable audit log of every administrative action

Account and access rules:

  • Sign up with reCAPTCHA and a verification email. New accounts start as Pending and turn Active when the verification link is opened; an administrator can also activate, suspend, or delete an account
  • Three roles: Admin, Staff, Student
  • Pending and suspended accounts cannot sign in

Tech stack

Layer Used
Server PHP 8 (developed on 8.2)
Database MySQL or MariaDB, via PDO with prepared statements
UI Bootstrap 5.3, Bootstrap Icons 1.11, Outfit typeface
Scripts Vanilla JavaScript, Chart.js, SweetAlert2
Email PHPMailer 7 (vendored in vendor/phpmailer)
Bot protection Google reCAPTCHA v2

No build step and no Composer install. The only dependencies are loaded from CDNs, plus the vendored PHPMailer copy.

Project structure

Nuqtah_IT/
├── actions/              Form handlers for signup, login, cart, borrowing, password reset
├── admin/
│   ├── actions/          Handlers for requests, tags, users, handover, returns
│   ├── includes/         Admin sidebar
│   └── *.php             Dashboard, assets, users, requests, reports, audit log
├── assets/
│   ├── css/              Global styles and the auth page styles
│   ├── js/               Password strength validation
│   ├── img/              Logos and campus photos
│   ├── upload/           Uploaded asset photos
│   └── video/            Landing page background video
├── database/
│   ├── schema.sql        Table structure for a fresh install
│   └── migrations/       Schema changes for existing installs
├── docs/screenshots/     Images used in this README
├── includes/
│   ├── db_connect.php    Loads .env and opens the PDO connection
│   ├── mail_helper.php   SMTP mailer and the HTML email template
│   ├── upload_helper.php Image validation and storage
│   ├── header.php        User navbar
│   ├── users_sidebar.php User account drawer
│   └── footer.php        Shared footer
├── vendor/phpmailer/     PHPMailer 7
└── index.php             Public landing page

Getting started

Requirements

  • PHP 8.0 or newer with the pdo_mysql, curl, openssl, and mbstring extensions
  • MySQL 5.7+ or MariaDB 10.3+
  • A web server with PHP support, or PHP's built-in server for local work
  • An SMTP account for outgoing email (Gmail with an App Password works)
  • reCAPTCHA v2 keys for the signup form

Local setup

  1. Clone the repository into your web root.

    git clone https://github.com/Zylioth/Nuqtah-Inventory_Management_System.git
    
  2. Create the environment file and fill in your own values.

    cp .env.example .env
    
  3. Create the database and import the schema.

    mysql -u root -p -e "CREATE DATABASE nuqtah_inv CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
    mysql -u root -p nuqtah_inv < database/schema.sql
    
  4. Create the first administrator. Public signup always creates a Pending Student or Staff account, so the first Admin has to be inserted directly.

    php -r "echo password_hash('ChangeMe123!', PASSWORD_DEFAULT), PHP_EOL;"
    
    INSERT INTO users (full_name, username, email, password, role, account_status)
    VALUES ('System Admin', 'admin', '[email protected]', '<paste the hash here>', 'Admin', 'Active');
    

    Change the password after the first sign in.

  5. Make sure assets/upload/ is writable by the web server.

  6. Serve the project and open it in a browser.

    php -S localhost:8000 router.php
    

    router.php stops the built-in server from handing out .env, .git, and the internal folders. With Apache or XAMPP, place the folder in the web root and open http://localhost/Nuqtah_IT/; the .htaccess files do the same job there.

Already have a database from an earlier version? Run the files in database/migrations/ in order.

Configuration

All settings live in .env. The file is ignored by git; .env.example is the template.

Variable Purpose
DB_HOST Database host, usually localhost
DB_NAME Database name, default nuqtah_inv
DB_USER Database user
DB_PASS Database password, empty by default on XAMPP
MAIL_EMAIL SMTP account used as the sender
MAIL_PASSWORD SMTP password. For Gmail this must be an App Password
RECAPTCHA_SECRET reCAPTCHA v2 secret key
APP_URL Base URL used in emailed activation links, without a trailing slash

The reCAPTCHA site key is public and sits in signup.php. The secret key stays in .env. When testing locally, add localhost to the allowed domains of the reCAPTCHA key.

Roles

Role Can do
Student Browse inventory, request items, track own requests, change password
Staff Same as Student
Admin Everything above, plus assets, serial tags, request approvals, handovers, returns, users, reports, audit log

Data model

Five tables, with the request flow built around them.

Table Holds
users Accounts, role, status (Pending, Active, Suspended), activation and reset tokens
assets Asset record, category, total and available stock, photo
asset_tags One row per physical unit with its serial and status
borrowing_requests Request, quantity, assigned tag, dates, status, notes
admin_logs Audit trail of administrative actions

A request moves through Pending to Approved to On Loan and finally Returned, or to Rejected. The dashboard treats an On Loan request past its return date as overdue.

Security notes

  • Credentials are read from .env, which is ignored by git. No key or password is stored in tracked source files.
  • .htaccess files (and router.php for PHP's built-in server) block HTTP access to .env, .git, includes/, database/, and vendor/.
  • Passwords are hashed with password_hash() and verified with password_verify().
  • Database access uses PDO prepared statements.
  • Uploaded photos are checked with getimagesize(), limited to JPG, PNG, GIF, and WebP, capped at 5 MB, and stored under a generated filename. assets/upload/.htaccess blocks script execution in that folder.
  • User-management actions use a CSRF token.
  • Password reset codes expire after one hour and are cleared once used. Activation tokens are cleared once used.

If you find a security problem, open an issue or contact me through GitHub instead of publishing exploit details.

Project status and limitations

The capstone is complete and development has stopped. I fix bugs and take small improvements when I have time.

Known limitations:

  • Built for one department. There is no multi-tenant setup.
  • No automated test suite. Testing was manual.
  • No REST API. Every screen is server rendered PHP.
  • Email depends on the SMTP account in .env; without it, signup and notification emails fail silently.
  • Access control relies on PHP sessions, so HTTPS and hardened session settings are the host's responsibility.

Credits

Built by Muhammad Amir Sabrin (B20230012) for the ICT Department of ITQSHHB, as a final year capstone project.

Third-party work used:

License

MIT. You can use, copy, modify, and share this project, including commercially, as long as the copyright notice and license are kept.

関連プロジェクトを探す

読み込み中…