Skip to content

mrpthemrp/package-delivery-tracker-client

Repository files navigation

Package Delivery Tracker Web App 📦

This repository contains a ☕ Java Swing application.
This project needs to be run with its 🍃🥾 Spring Boot Web Server.

⚠️ Please DO NOT FORK this repository/project! ⚠️
🟥 Please DO NOT COPY ANY CODE from this project! 🟥

This project is not intended to be open-source, feel free to use it as a reference but DO NOT FORK OR COPY!
If used as reference, please cite by providing link to project and author name (see section below).

♨️ JavaDocs Link

Watch a quick demo of the project through the link below!
📼 Video Demo Link

📑 Table of Contents

  1. Project Description and Summary
    1. Project Takeaways
    2. Project Shortcomings
  2. Installation Guide
    1. Software Requirements
    2. Steps
  3. References
  4. Citation Format

1. Project Description and Summary

This project is the final assignment for CMPT 213 (Dr. Victor Cheung) at SFU.

Main Screen
This project is a package delivery tracker. On program start, the user will be brought to a simple screen that has three lists: All Packages, Upcoming Packages, and Overdue Packages. Existing packages in the system will appear sorted from earliest delivery date. The screen will also show the current date and time, as well as a button for adding a package. If ADD PACKAGE button is clicked, a pop-up will appear that prompts the user to create a new package entry.

Packages
The user is able to add 3 different types of packages: Book, Perishable, and Electronic. Based on the delivery date added on package creation, it will be sorted under upcoming or overdue on the main screen. The user is able to mark padckage as delivered or remove the package on the main screen. On package removal, from any of the lists, the package will immediately be deleted from all lists. If the package is marked as delivered the package will only appear in the ALL PACKAGES list.

Saving and Exiting
If the user wants to delete a package, a pop-up will appear to confirm. If the user wants to exit, simply click the exit button and the program will automatically save the data to the server. The server will continue running if the client stops.

User needs to stop the server side by themselves! Exiting the client app will not terminate the server.

See video demo for more comprehensive walkthrough.

✨ Project Takeaways

  • Coded with OOP/D in mind.
    • Fine-tuned OOP/D skills with this project.
  • Practiced using MVC Model intentionally.
  • Learned how to use Java's File Separator to account for backslash differences in different OS.
  • Extensively used Java Swing's built in GUI Components to build UI
    • Learned how to use JFrame, JPanels, etc.
  • Created a lot of custom UI components through OOD concepts of Inheritance, Abstraction, and Polymorphism.
  • Built simple Spring Boot web server to emulate the Client-Server Model.
  • Practiced writing both front and backend code for this project.
  • Practiced using CRC Cards and UML Diagrams to plan out code prior to writing code.
  • Practiced iterative programming as this project was completed in 4 different increments.

❗ Project Shortcomings

  • UI is not 100% adaptive to different screen sizes.
  • UI Pop-up windows are not centered on screen properly.
  • UI Pop-up is not always responsive to changes.
  • Package UI is not cohesive in width, some are longer and others are shorter.
    • This causes information to be cut off from the screen at times.
  • 🐞 There is a bug! Packages that turn overdue as the program is running does not automatically get marked as overdue.
    • This minor bug is an error on the backend algorithm.

2. Installation Guide

This project was created through IntelliJ.

💻 Software Requirements

  • Windows OS or MacOS
    • This project HAS BEEN tested on MacOS and does work.
    • Windows 7 and up is recommended
    • MacOS 10.12 and up is recommended.
  • Latest version of IntelliJ
    • Either Ultimate or Community version works.

📝 Steps

The following steps are intended for use with the IntelliJ IDE

Part I - Download Code and Open on IntelliJ


  1. Download this project as a ZIP file.
    • Click 'Code' and then 'Download ZIP'.
  2. Unzip the main folder - 'package-delivery-tracker-client-master'.
    • This may take a few minutes, make sure your machine has ample space!
  3. Open IntelliJ and select 'Open' or 'Open Project'.
  4. Locate where the unzipped folder from step 2 is on your machine. Click on the folder to open the project.
    • Click 'Trust Project' when the pop-up appears.
    • The project will now open.

Part II - Configure Libraries and Run Program


  1. Configure the SDK by File > Project Structure > Project Settings > Project
    • We will set the JDK, Language Level, and Compiler output here.
  2. Select JDK 18
    • It is HIGHLY important that JDK 18 and up is used!
  3. Select 'Language Level' to be 18
    • Or whichever JDK number you are using.
  4. Make sure 'Compiler output:' is set to the out folder
    • It should already be set but if not make sure the path is ../package-delivery-tracker-client-master/out
  5. Go to Libraries which is also under Project Settings
  6. Click on the "+" button to add a library
  7. Click "Maven" from the library options
  8. Type 'com.google.gson' and click on the search button
  9. Select the newest gson library and click ok
    • Version 2.9.1 was used to write this project
  10. Click 'OK' when pop-up comes up on adding 'client app' to module
    • If asked to replace old libary, click CANCEL and the old libary will be added to path.
  11. Click 'Apply' and then 'OK'
  12. Click Run and the app will run properly. Make sure to run the server side of the program too!
    • The console will print Status Codes on each operation.
      • Usually 200, 201 are the SUCCESS codes that will print

3. References

All references are cited within the program's API.

However, there are a few external libraries used that should be noted:

4. Citation Format

Example of citing this project as a reference:

Reference used for creating MVC model: https://github.com/mrpthemrp/package-delivery-tracker-client/tree/master/src/cmpt213/assignment4/packagedeliveries/client
Date Accessed: August 2022
Developer: Deborah Wang

If using this project as a reference please copy and paste the following into your references/citations:

Reference for <code referenced>: <file/folder URL>
Date Accessed: <date accessed>
Developer: Deborah Wang (https://github.com/mrpthemrp)

Last Code Update Date: August 2022

Copyright August 2022, Deborah Wang

About

Package Delivery Tracker Web App | CMPT 213 (Dr. Victor Cheung) | Summer 2022

Resources

Stars

Watchers

Forks

Contributors

Languages