Status: Fully functional simulation; designed for demonstration and learning.
A Kotlin Compose-based client-server application demonstrating modular shipment lifecycle management.
Uses object-oriented design patterns (Factory, Observer, Strategy, State) to model ship,ent states, handle real-time updates, and provide an extensible architecture.
- Object-oriented design with Factory, Observer, Strategy, and State patterns
- Event-driven client-server communication
- Kotlin Compose GUI for real-time simulation
- Modular design for easy extension and experimentation
- Shipment lifecycle modeling and update parsing
- Shipment Lifecycle Management: Models complete shipment journey from creation to delivery
- Real-time Simulation: Event-driven updates allow live tracking of shipment states
created,shipped,delayed,lost,cancelled,location,noteAdded, anddelivered - Client-Server Architecture: Demonstrates networked communication and UI synchronization using the Observer pattern
- Compose UI: Minimal GUI to interact with shipments and view update history
- Single-threaded simulation for simplicity and clarity
- Minimal UI to focus on architecture and design patterns
- Local client-server communication only (no external network integration)
- Designed for demonstration and learning, not production deployment
- JDK 17+
- Gradle (wrapper included)
- Clone repository:
git clone https://github.com/SearParsley/shipment-tracking-server.git
cd shipment-tracking-server- Build and run using Gradle wrapper:
./gradlew build
./gradlew runWindows users: use .\gradlew.bat instead of ./gradlew.
Shipment updates follow this format:
updateType,shipmentId,timestampOfUpdate,otherInfo (optional)
UpdateType: {created,delivered,delayed,lost,cancelled,location,shipped,noteAdded}shipmentId: unique stringtimestampOfUpdate: Unix epoch (ms since 01/01/1970)otherInfo:delayed: timestamp of expected delivery (Unix epoch)location: current shipment locationnoteAdded: note text
created,SHP100,1675852800000
location,SHP100,1675856400000,Denver
delayed,SHP100,1675857000000,1676336400000
- Open both client and server GUI windows
- In the client window, enter a properly formatted shipment update and click Send Update to Server
- In the server window, enter a shipment ID:
- Click
Trackto start observing updates - Click
Stop Trackingto stop observing
- Click
- Repeat as needed to simulate shipment progress and view update history
- State Pattern: Encapsulates shipment states and transitions
- Observer Pattern: Notifies UI of state changes in real-time
- Strategy Pattern: Supports different handling approaches for updates
- Factory Pattern: Simplifies creation of shipment objects with varied initial states
Focus: improved modularity, State and Obverser integration
Focus: initial architecture and object relationships