Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔧 Library of Hardwares

A role-based hardware inventory management system designed for educational institutions to streamline the borrowing and tracking of electronic components and equipment for students and faculty.

Live Demo: https://lohamrita.vercel.app

📋 Overview

The Library of Hardwares is a web-based platform that enables students, operators, and administrators to manage hardware requests in an educational setting. Built with a modern tech stack, it provides a seamless experience for requesting, approving, and returning lab equipment.

Key Features

  • 🔐 Role-Based Access Control – Three distinct user roles with different permissions
  • 📦 Hardware Inventory Management – Track available and allocated equipment
  • 📝 Request Management – Students can request items with approval workflows
  • ✅ Approval System – Operators approve requests with quantity allocation
  • ↩️ Return Processing – Track equipment returns and availability
  • 📊 Dashboard Analytics – View pending, approved, and returned requests at a glance
  • 🎨 Responsive UI – Works seamlessly on desktop and mobile devices

👥 User Roles

Student

  • View hardware inventory
  • Submit equipment requests
  • Track request status (pending, approved, returned)
  • View request history and collection details

Operator

  • View all pending requests from students
  • Approve/deny requests with quantity adjustments
  • Assign collection locations and times
  • Process equipment returns
  • Manage hardware inventory

Admin

  • Full inventory management (add, update, delete items)
  • View all student requests across the system
  • Update stock quantities
  • Manage all hardware records

Tech Stack

Frontend:

  • HTML5
  • CSS3 (29.9% of codebase)
  • JavaScript Vanilla (64.6% of codebase)

Backend:

  • Runtime: Node.js (Express 5.2.1)
  • Database: PostgreSQL (pg 8.19.0)
  • Authentication: JWT (jsonwebtoken 9.0.3) + Bcrypt (6.0.0)
  • Middleware: CORS, dotenv
  • Development: Nodemon (3.1.14)

🚀 Getting Started

Prerequisites

  • Node.js (v18+)
  • PostgreSQL database
  • npm or yarn

Installation

  1. Clone the Repository git clone https://github.com/Rohan7511/Library-Of-Hardwares.git cd Library-Of-Hardwares

  2. Backend Setup cd backend npm install

Create a .env file in the backend/ directory: PORT=5000 DATABASE_URL=postgresql://user:password@localhost:5432/hardware_lib JWT_SECRET=your_jwt_secret_key NODE_ENV=development

Start the backend server:

Development mode (with auto-reload): npm run dev

Production mode: npm start

The API will run at http://localhost:5000

  1. Frontend Setup cd frontend

No installation needed - vanilla JS application

Open index.html in your browser or serve via a local server:

Using Python 3: python -m http.server 8000

Using Node.js: npx http-server

Or use the included batch script (Windows): start.bat

Navigate to http://localhost:8000 (or your chosen port)

📡 API Endpoints

Authentication

POST /api/auth/login – User login (email + password)

Student Routes

GET /api/student/products – View available hardware POST /api/student/request – Submit equipment request GET /api/student/my-requests – Get user's requests

Operator Routes

GET /api/operator/products – View inventory GET /api/operator/pending – Get pending requests POST /api/operator/approve – Approve a request with quantity allocation POST /api/operator/return – Mark equipment as returned

Admin Routes

GET /api/admin/requests – Get all requests in the system POST /api/admin/add-product – Add new hardware item to inventory PUT /api/admin/update-stock – Update inventory quantity DELETE /api/admin/delete/:id – Delete a product from inventory

🔐 Authentication & Security

  • JWT Tokens – Secure session management with Bearer tokens
  • Password Hashing – Bcrypt for secure password storage (salt rounds: 10)
  • CORS Protection – Cross-origin request handling enabled
  • Session Storage – Client-side token management via sessionStorage
  • Authorization Headers – All protected routes require valid JWT token

🎨 UI/UX Features

  • Sidebar Navigation – Role-based dynamic menu system
  • Responsive Design – Mobile-first approach, works on all devices
  • Toast Notifications – Real-time success/error feedback
  • Status Badges – Visual indicators (pending, approved, partial, denied, returned)
  • Modal Dialogs – Detailed item and request information views
  • Data Tables – Organized tabular information display
  • CSS Variables – Modern theming system for consistent styling
  • Breadcrumb Navigation – Easy-to-understand page hierarchy

🔄 Request Workflow

  1. Student submits request → Status: pending
  2. Operator reviews request → Can approve or adjust quantities based on availability
  3. Operator approves → Status: approved, collection location and time assigned
  4. Student collects items → Physical handoff at specified location and time
  5. Student returns items → Operator processes return, Status: returned

📊 Request Statuses

  • pending – Awaiting operator review
  • approved – Operator approved, ready for collection
  • partial – Partially approved (lower qty than requested)
  • denied – Request denied by operator
  • returned – Items have been returned by student

💾 Database Schema Overview

The system uses PostgreSQL with tables for:

  • Users – Student, operator, and admin accounts
  • Products – Hardware items with inventory tracking
  • Requests – Student requests and their status
  • Request Items – Individual items within each request
  • Approvals – Operator approval details and collection info

👨‍💻 Developed By

  • Gubba Rohan
  • Ananta Aditya
  • Bhashyam Sree Darshan

Institution: Amrita Vishwa Vidyapeetham

📞 Support & Issues

For issues, questions, or feature requests, please create a GitHub issue on the repository.

🎯 Future Enhancements

  • Email notifications for request status updates
  • QR code generation for hardware tracking
  • Advanced analytics and reporting
  • Mobile app (React Native/Flutter)
  • Integration with institution management systems
  • Real-time notifications using WebSockets

Happy requesting! 🎉


About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages