Skip to content

Java-based Lab Management System that handles user accounts, laboratories, and lab activities using MongoDB as the backend database.

Notifications You must be signed in to change notification settings

SuzyUwU/LabManagement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧪 Lab Management System (Java + MongoDB)

A Java-based Lab Management System that handles user accounts, laboratories, and lab activities using MongoDB as the backend database.

This project demonstrates backend-focused application logic, including:

  • User authentication
  • Laboratory data management
  • Activity scheduling and participation
  • MongoDB integration using the official Java driver

🗄️ Database Setup

This project relies on a MongoDB database structure provided separately.

📦 Database Repository:
👉 Database file

Make sure the database collections are available before running the application.


✨ Features

👤 User Management

  • User registration with auto-incremented user ID
  • Credential validation (login)
  • User data stored in MongoDB
  • Persistent user ID tracking via a counter collection

🧪 Lab Management

  • Add laboratory records
  • Store lab details such as:
    • Lab ID
    • Lab name
    • Function
    • Specifications
    • Location
  • Retrieve all available labs

📅 Activity Management

  • Create lab activities
  • Assign activities to labs
  • Define active time slots per activity
  • Join or cancel activities
  • Track participants per activity
  • Track user participation history

🧠 How It Works

User System

  • Users are stored in the Users collection
  • A Counters collection is used to generate sequential user IDs
  • Authentication checks user ID or username + password
  • Current user session is tracked internally

Lab System

  • Labs are stored in the Labs collection
  • Each lab contains metadata describing its purpose and location
  • Labs can be listed and referenced by activities

Activity System

  • Activities are stored in the Activities collection
  • User participation is stored in UserActivities
  • Each activity:
    • Belongs to a lab
    • Has selectable time slots
    • Tracks registered participants
  • Users can only join activities with active time slots

⏰ Time Slot System

Activities use predefined time slots:

  • 08:00
  • 09:00
  • 13:00
  • 15:00

Each activity stores a boolean array indicating which slots are active.


🧱 Database Collections

The system uses the following MongoDB collections:

  • Users
  • Counters
  • Labs
  • Activities
  • UserActivities

Collections are automatically created if they do not exist.


🚀 How to Run

  1. Clone the project repository
  2. Ensure MongoDB access is available
  3. Update the MongoDB connection URI if needed
  4. Run the application using your Java IDE or command line
  5. Interact with users, labs, and activities through the application logic

⚠️ Internet access is required if using MongoDB Atlas.


🛠️ Technical Details

  • Language: Java
  • Database: MongoDB
  • Driver: MongoDB Java Driver
  • Architecture: Model-based backend logic
  • Data Format: BSON (MongoDB Documents)

📌 Learning Objectives

This project demonstrates:

  • Java–MongoDB integration
  • CRUD operations in MongoDB
  • Backend application structure
  • Data modeling for real-world systems
  • Exception handling and validation
  • Multi-collection database design

🔮 Future Improvements

  • Password hashing and security improvements
  • Role-based access control (admin / user)
  • REST API layer (Spring Boot)
  • GUI or web frontend
  • Improved concurrency handling
  • Better ID generation strategy

📜 License

This project is intended for educational purposes.
You are free to modify and extend it for learning or academic projects.

About

Java-based Lab Management System that handles user accounts, laboratories, and lab activities using MongoDB as the backend database.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages