Skip to content

A CLI-based document management system for uploading, storing, and retrieving files via PostgreSQL. Built with Java using MVC architecture.

License

Notifications You must be signed in to change notification settings

COMP-4721-F25/Term-Project-Group-3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

201 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Document Search & Management Tool

logo

Featuring a simple, easy to use CLI-based document management system built in Java. This application utilizes the Model-View-Controller (MVC) architecture to provide a streamlined interface for uploading, searching, and managing documents within a secure database environment.


Table of Contents

Overview

The Document Search & Management Tool is designed to provide a usability-friendly document storage and retrieval system. Unlike simple file systems, this tool abstracts the storage layer, allowing users to interact with a database through a clean command-line interface. Users can upload files from their local machine, search for them by file name or file content, and perform actions like downloading or removing them.

Features

  • Multiplatform: Supports Linux, Windows, and Mac
  • Search Algorithms:
    • Keyword Search: Retrieve documents by querying relevant keywords contained within the file name.
    • Search for internal file content: Retrieve documents by the query contained within the document's content.
  • Practical Uploads: Store uploaded documents and their metadata directly in PostgreSQL, using BYTEA columns for file contents alongside filename and upload timestamp fields.
  • File Management:
    • Download: Retrieve stored documents and save them directly to your OS Downloads folder.
    • Remove: Permanently delete documents from the database.
  • Interactive CLI: Intuitive user interface system with properly decoupled menus (HomeFrame, UploadFrame, ResultsFrame) for navigation.
  • Online and Offline Support:
    • The software can connect to both the localhost database as well as databases over the network.

⚙ Prerequisites

Before running the application, ensure you have the following installed:

  • Java Development Kit (JDK): Version 17 or higher.
  • PostgreSQL: A running instance of PostgreSQL for the backend database.

Installation & Usage

  1. Clone the Repository

    git clone https://github.com/COMP-4721-F25/Term-Project-Group-3.git
    cd ./Term-Project-Group-3-main/
  2. Configure Database Ensure your PostgreSQL database is running at your target computer (local if hosting locally, server if connecting to a server). For instructions on how to setup the database, read and follow the official guide https://www.postgresql.org/docs/current/tutorial-install.html.

  3. Compile

    # Compile
    javac -cp ".:lib/*" -sourcepath src/main/java -d bin src/main/java/com/github/comp4721f25/teamprojectgroup3/ApplicationController.java 
  4. Run

    # Linux/Mac: Run with pre-configured database passed as arguments (databaseURL, username, password)
    java -cp "bin:lib/*" com.github.comp4721f25.teamprojectgroup3.ApplicationController databaseURL username password
    
    # Linux/Mac: Run without arguments
    java -cp "bin:lib/*" com.github.comp4721f25.teamprojectgroup3.ApplicationController
    
    # Linux/Mac: Example with specific values (Multiline)
    java -cp "bin:lib/*" com.github.comp4721f25.teamprojectgroup3.ApplicationController \
    'jdbc:postgresql://website.tld' \
    'username' \
    'password' 
    
    # Windows (CMD): Run command
    java -cp "bin;lib/*" com.github.comp4721f25.teamprojectgroup3.ApplicationController "jdbc:postgresql://website.tld" "username" "password"

Where the databaseURL, username, and passwords are with respect to the database you plan on using from step 2.

Demonstration

Home Screen

logo

Uploading File

logo

Searching for a file

logo

Managing Files

logo

Architecture

The project strictly follows the MVC (Model-View-Controller) design pattern:

Component Responsibilities Key Classes
Model Data logic, database interactions, and business rules. ManageDocument, Document, DatabaseConnection
View User interface rendering (CLI) and input capture. HomeFrame, UploadFrame, ResultsFrame
Controller Mediates input between View and Model. NavigationController, SearchController, UploadController

The interaction flow and structural dependencies are illustrated in the architectural diagram below (see Figure 1)

architectural design Figure 1: Architectural Design Diagram of the Application

Future Roadmap

The following enhancement is currently part of the project's roadmap:

  • Result Ranking: Ranking results based on amount of hits of query.

About the Project

Objective
To demonstrate how robust software architecture principles can be applied to everyday document management tasks -- we created a simple "store-manage-retrieve" document management system, stripped down to its essential core.

The Team

  • Faycal Kilali
  • Abdullah Elashy
  • Peter MacAulay

Licensed under GPL-3.0 License.

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages