Skip to content

SepehrKalantariSol/device-management-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Device Management System

A full-stack web application for managing devices, users, and IT support requests within an organization.
This system simulates a real-world IT asset management and support workflow, including device tracking, user roles, and request lifecycle management.

Demo video: https://drive.google.com/file/d/1h-W3AQhQrTLvGjQEmpAHPV4lUeXLO4B6/view?usp=share_link


Overview

The Device Management System allows organizations to:

  • Track devices across buildings and rooms
  • Manage staff and IT technicians
  • Create and manage support requests
  • Assign and resolve issues through a structured workflow
  • Maintain a centralized relational database for all assets and users

This project demonstrates backend API development, relational database design, and frontend integration.


Database Design

Entity Relationship Diagram

ERD

The schema follows a fully normalised relational design (3NF), covering organisational hierarchy, user roles, device subtypes, and a structured support request workflow.

Live Schema (DBeaver)

DBeaver Schema

The database was built and tested in PostgreSQL, connected via DBeaver. All tables, foreign keys, and relationships are live and queryable.


Key Features

Device Management

  • Create, view, and manage devices
  • Track device location (building and room)
  • Store device metadata (serial number, status, warranty, etc.)

Request Workflow System

  • Create support requests linked to devices
  • Assign requests to IT technicians
  • Track request status: open → in_progress → resolved
  • Add comments and resolution details

User and Role Management

  • Create users (staff and IT technicians)
  • Assign roles dynamically via relational mapping
  • Retrieve user profiles and activity

Relational Database Design

  • Fully normalized PostgreSQL schema
  • Use of foreign keys and junction tables (person_role)
  • Structured entity relationships (device → room → building)

System Architecture

Frontend (HTML, CSS, JavaScript)

REST API (Flask)

PostgreSQL Database

  • Frontend: Static pages with JavaScript handling API requests
  • Backend: Flask REST API with structured endpoints
  • Database: PostgreSQL with normalized schema and constraints

Tech Stack

  • Backend: Python (Flask)
  • Database: PostgreSQL
  • Frontend: HTML, CSS, JavaScript
  • Libraries:
    • psycopg2
    • Flask-CORS

Project Structure

backend/
app.py

database/
schema.sql

docs/
D2_design_document.pdf
images/
erd.png
schema_dbeaver.jpg

frontend/
css/
js/
*.html

.gitignore
README.md


Setup and Installation

  1. Clone the repository
git clone https://github.com/SepehrKalantariSol/device-management-system.git
cd device-management-system
  1. Setup virtual environment
python -m venv venv  
source venv/bin/activate
  1. Install dependencies
pip install flask psycopg2 flask-cors
  1. Configure environment variables
export DB_NAME=device_mng  
export DB_USER=postgres  
export DB_PASSWORD=your_password  
export DB_HOST=localhost  
export DB_PORT=5432  
  1. Setup database
psql -U postgres -d device_mng -f database/schema.sql  
  1. Run the backend
python backend/app.py
  1. Open frontend
Open frontend/index.html in your browser.

API Endpoints (Examples)

Devices  
GET  /api/v1/devices  
POST /api/v1/devices  

Requests  
POST  /api/v1/requests  
PATCH /api/v1/requests/{id}/accept  
PATCH /api/v1/requests/{id}/resolve  

Users  
POST /api/v1/persons  
GET  /api/v1/persons/{id}

What This Project Demonstrates

  • Relational database design (normalisation, foreign keys, junction tables)
  • Writing and structuring SQL schemas for real-world workflows
  • REST API design and implementation with Flask
  • Backend and frontend integration
  • Full-stack development from database to UI
  • Clean project organisation and version control practices

Notes

  • This project is a prototype system built for educational purposes
  • Authentication is simplified (plaintext password comparison)
  • In production, passwords should be hashed and secured properly

Contributors

  • Sepehr Kalantari Soltanieh
  • Seyed Atta Rahimi

License

This project is for educational and portfolio purposes.

About

Full-stack device management system built with Flask, PostgreSQL, and JavaScript, supporting asset tracking and IT request workflows.

Topics

Resources

License

Stars

Watchers

Forks

Contributors