Skip to content

Repository files navigation

Computer Laboratory Monitoring System

A desktop application for managing and monitoring computer laboratories in a school or university setting. It tracks labs, machines, installed software, usage logs, reported issues, and maintenance work, and presents the state of the facility through a dashboard and a set of exportable reports.

This is a Java Swing desktop app backed by MySQL over plain JDBC. It was built as a study / coursework project and is uploaded here directly from an Eclipse workspace.

Overview

The system gives lab staff a single place to answer questions like:

  • Which computers are working, under maintenance, or out of order, and in which lab?
  • What software is installed where, and which licenses are expiring?
  • What issues have been reported, who is assigned, and what is their status?
  • What maintenance has been done, by whom, and at what cost?
  • Who used which machine and when?

Access is role-based. There are four roles: Admin, Lab Technician, Instructor, and Student.

Features

  • Role-based login (Admin, Lab Technician, Instructor, Student)
  • Laboratory management (name, location, capacity)
  • Computer inventory (hostname, IP/MAC, specs, status, purchase and warranty dates), linked to a lab
  • Software inventory (name, version, license key, license expiry)
  • Computer-to-software mapping with installation dates (many-to-many)
  • Issue tracking (type, description, priority, status, reporter, assignee, resolution notes)
  • Maintenance records (preventive/corrective, technician, cost, status)
  • Usage logs (login/logout time, purpose, per computer and user)
  • Dashboard with charts for laboratory usage and maintenance history (rendered with JFreeChart)
  • Reports module covering computer health, lab usage analytics, maintenance and issues, software management, user activity, resource planning, financial, security/compliance, equipment lifecycle, and custom reports, with print and text-file export

Tech Stack

  • Language: Java (project is configured for JavaSE-21 in .classpath)
  • UI: Java Swing (AWT/Swing, JFrame/JPanel)
  • Database: MySQL 8
  • Data access: Plain JDBC (no ORM)
  • Charting: JFreeChart 1.5.4 (lib/jfreechart-1.5.4.jar)
  • JDBC driver: MySQL Connector/J 8.0.33 (lib/mysql-connector-j-8.0.33.jar)
  • Build: None. This is a raw Eclipse Java project (.project / .classpath) with dependencies as jars in lib/. There is no Maven or Gradle build file.

Architecture

The code follows a layered structure under the package root computerlaboratorymonitoring.java.com.lab:

main    -> application entry point (Main), boots the DB check then the login window
view    -> Swing UI (LoginFrame, per-entity panels, dashboard, report generator)
dao     -> data access objects, one per entity, using JDBC PreparedStatements
model   -> plain Java objects (POJOs) mapping to database rows
util    -> DatabaseConnection (singleton JDBC connection holder)

Flow at a glance: Main tests the database connection, then launches LoginFrame. On a valid login it opens DashboardFrame, which hosts the entity panels (computers, labs, software, issues, maintenance, users) plus the dashboard charts and the reports panel. UI panels call into DAOs; DAOs use DatabaseConnection.getConnection() and map result sets to model objects.

Project structure

computerlaboratorymonitoring/
├── .classpath, .project, .settings/     Eclipse project metadata
├── lib/
│   ├── jfreechart-1.5.4.jar
│   └── mysql-connector-j-8.0.33.jar
├── src/
│   └── computerlaboratorymonitoring/java/com/lab/
│       ├── main/        Main.java
│       ├── util/        DatabaseConnection.java
│       ├── model/       Computer, Laboratory, SoftwareInventory, Issue, ...
│       ├── dao/         *DAO.java (+ dao/dashboard, dao/report)
│       └── view/        *Panel.java, LoginFrame (+ view/dashboard, view/report)
├── bin/                                 compiled output + copied resources
├── computer_lab_monitoring.sql          schema (structure only)
├── src/files/
│   ├── computer_lab_monitoring.sql          schema
│   └── computer_lab_monitoring-with-data.sql schema + sample seed data
├── Computer Laboratory Monitoring System - User Manual.pdf
└── Computer Laboratory Monitoring System Documentation.pdf

Database

Database name: computer_lab_monitoring (MySQL 8, InnoDB, utf8mb4).

Tables:

Table Purpose
users Accounts and roles (Admin, Lab Technician, Instructor, Student)
laboratories Labs with location and seating capacity
computers Machines, linked to a lab, with status and warranty info
software_inventory Software titles, versions, license keys and expiry
computer_software Join table linking computers to installed software
issues Reported problems with priority, status, reporter and assignee
maintenance_records Preventive/corrective maintenance with technician and cost
usage_logs Per-machine login/logout sessions and purpose

Two SQL files are provided: a structure-only schema (computer_lab_monitoring.sql, also duplicated under src/files/) and a schema-plus-sample-data version (src/files/computer_lab_monitoring-with-data.sql) for a quick populated setup.

Prerequisites

  • JDK 21 (the project is set to JavaSE-21; a recent JDK is expected)
  • MySQL 8 server running locally
  • Eclipse IDE (recommended, since this ships as an Eclipse project) or any setup where you can put the two jars in lib/ on the classpath

Getting Started

1. Set up the database

Start MySQL, then import one of the SQL files. Use the -with-data version if you want sample records and the default logins below.

mysql -u root -p < "src/files/computer_lab_monitoring-with-data.sql"

2. Check the connection settings

Database connection details are set in DatabaseConnection.java:

URL:      jdbc:mysql://localhost:3307/computer_lab_monitoring
username: root
password: root

The code defaults to port 3307. Standard MySQL usually runs on 3306, so update the URL (and the username/password) in DatabaseConnection.java to match your local server before running.

3. Run

In Eclipse: import the project (File > Import > Existing Projects into Workspace), confirm the two jars in lib/ are on the build path, then run computerlaboratorymonitoring.java.com.lab.main.Main as a Java Application.

From the command line (adjust the classpath separator: : on macOS/Linux, ; on Windows):

# Compile
javac -cp "lib/*" -d bin $(find src -name "*.java")

# Run
java -cp "bin:lib/*" computerlaboratorymonitoring.java.com.lab.main.Main

On startup the app verifies the database connection first. If it cannot connect, it shows an error dialog and exits, so make sure MySQL is running and the settings in DatabaseConnection.java are correct.

Default logins (only if you imported the -with-data SQL)

Username Password Role
admin1 admin1 Admin
tech1 tech1 Lab Technician
inst1 inst1 Instructor
stud1 stud1 Student

Change these before using the system for anything real.

Documentation

Two reference documents ship with the repo:

  • Computer Laboratory Monitoring System - User Manual.pdf for end users
  • Computer Laboratory Monitoring System Documentation.pdf for the technical write-up

Known Limitations and Security Notes

This is a study project, and there are a few things worth stating plainly rather than hiding:

  • Passwords are stored and compared in plaintext. The login path passes the raw password straight into the WHERE password = ? query, and the sample data confirms plaintext values. Several code comments say passwords "should be hashed," but no hashing is implemented. For any real deployment, hash with a strong algorithm (for example BCrypt/Argon2) and compare hashes, never plaintext.
  • Database credentials are hardcoded in DatabaseConnection.java (root/root). Move these to environment variables or an external config file, and do not commit real credentials.
  • The JDBC connection uses useSSL=false and a single shared static connection. This is fine for a single-user desktop demo but is not safe for concurrent use and not suitable over a network.
  • No build tool. Dependencies are checked-in jars. Migrating to Maven or Gradle would make the build reproducible and dependency updates easier.
  • Compiled output (bin/) is committed to the repository; normally this would be git-ignored.

License

No license file is currently included in the repository. Add one if you intend others to reuse this code.

About

A desktop application for managing and monitoring computer laboratories in a school or university setting. It tracks labs, machines, installed software, usage logs, reported issues, and maintenance work, and presents the state of the facility through a dashboard and a set of exportable reports.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages