A Java-based clothing marketplace platform supporting user accounts, item listings, and transactions.
Team Members:
- Adrian Mathew
- Anagh Sheth
- Enrique Zavala
- Kashyap Maddala
- Prerequisites
- Installation
- Project Structure
- Dependencies
- Running Tests
- Building the Project
- Phase 1
- Phase 2
- Phase 3
- Java JDK 11 or later
- Apache Maven 3.8.1+
- Git (for cloning the repository)
Here is a link for instructions on how to install Maven for any platform
- Clone repository:
git clone https://github.com/kashyapmaddala/Team_Project_CS180
- Install dependencies and build project (Current path must be root directory)
mvn clean install
Our project has multiple Java classes, a Java interface for each class (non-tester, non JUnit), JUnit for the four main classes, and other Enums and Exception classes.
- Item.java represents an item that can be listed or sold (clothing items).
- User.java represents a single user in the database that can add reviews, list, buy, or sell items.
- ItemManager.java manages many different item objects and reads them from/writes them to a file (where it's either a current listing, sold, or deleted). Items can be added, deleted, or their listing status can be changed.
- UserManager.java manages many different users and reads their details from/writes them to a file. New users can be added or deleted and then this information can be saved (no duplicate usernames/users).
- DataBase.java is only for testing purposes but tests an ItemManager and UserManager object. (No methods in this class).
- Message.java is a class that represents a message object. It does not have methods besides setters and getters.
- ApplicationClient.java represents the class with the required methods for a client in the client-server system. It deals with the user.
- ApplicationClientGUI.java represents the class with a functional GUI that represents a client in the client-server system. The user interacts with the GUI (runs on Event Dispatch Thread).
- ApplicationServer.java represents the class with the required methods for a server in the client-server system. It handles the data
- ApplicationClientOutdated.java represents an outdated version of our client in the client-server system. (It is not in use!)
- ApplicationServerOutdated.java represents an outdated version of our server in the client-server system. (It is not in use!)
- ApplicationClientGUI.java contains the GUI that users can interact with, functioning similar to the client class but more visual.
- itemInterface.java represents an interface with the required methods for a single item.
- UserInterface.java represents an interface with the required methods for a single user.
- UserManagerInterface.java represents an interface with the required methods for a user manager.
- ItemManagerInterface.java represents an interface with the required methods for an item manager.
- MessageInterface.java represents an interface with the required methods for a message object.
- ClientInterface.java represents an interface with the required methods for a client in the client-server system.
- ServerInterface.java represents an interface with the required methods for a server in the client-server system.
- ItemTest.java tests the Item.java class methods via some test cases.
- UserTest.java tests the User.java class methods via some test cases.
- ItemManagerTest.java tests the ItemManager.java class methods via some test cases.
- UserManagerTest.java tests the UserManager.java class methods via some test cases.
- ApplicationClientTest.java tests the server-client system via some test cases.
- ApplicationServerTest.java tests the server-client system via some test cases.
- Gender.java contains constant values that any Item could have (MEN, WOMEN, UNISEX)
- ItemCategory.java contains constant values for the possible types of items that could be sold (CLOTHING, FOOTWEAR, ACCESSORIES)
- ItemStatus.java contains constant values for the possible states of an item's listing (ACTIVE, SOLD, DELETED)
- Size.java contains constant values for the possible sizes of an item (EXTRA_SMALL, SMALL, MEDIUM, LARGE, EXTRA_LARGE)
- SubCategory.java contains the type of item it is given its current category (SHIRTS, SNEAKERS)
- ItemNotFoundException.java is an exception class for exceptions that are thrown if an item is not found in the database.
- UserNotFoundException.java is an exception class for exceptions that are thrown if a user is not found in the database.
- items.json
- item_history_copy.json
- user_information.txt
- message_history.txt
- message_history.json
- items_copy.json
- user_information_copy.txt
- itemIDtracker.txt
To run the JUnit tests, please run the following command (Current path must be root directory):
mvn clean test
After running the JUnit tests, ensure that the repository is reset with git checkout . so that the database is set to how it was before.
If you are running this through IntelliJ, ensure that you create a new configuration to allow multiple instances to run.
- At the top panel, hover above the icon showing "Run" and press the option "Edit Configurations" (Run -> Edit Configurations).
- Select the option to add a new configuration (either press the '+' button in the top left or press the text "Add new run configuration".
- When asked what type of configuration, press Application.
- Press "Modify options" (Alt + M on Windows) and press "Allow multiple instances" (Alt + U on Windows).
- When asked for the main class, type "ApplicationClient" (this is the class that should be able to have many instances).
- Give this configuration any name.
- Press "Apply" then "OK".
- Repeat steps 1 through 7 but in step 5, use "ApplicationClientGUI" instead (this allows multiple instances of our GUI class as well).
To run the program (if done through terminal -- NOT RECOMMENDED BECAUSE THERE ARE TOO MANY FILES TO COMPILE INDIVIDUALLY),
- Ensure that the current directory is ...../Team_Project_CS180 (this is the root directory).
- Compile every Java class. (javac ......)
- On one terminal window and type java src/main/java/marketplace/ApplicationServer.java
- Open a new terminal window and type java src/main/java/marketplace/ApplicationClient.java
To run with IntelliJ (user interface -- RECOMMENDED),
- Ensure that the current file configuration is selected (at the top right corner, immediately to the left of the play button, you can select the configuration).
- Navigate to the ApplicationServer.java file (src/main/java/marketplace/ApplicationServer.java)
- Click the green "play" button (to run)
- Navigate to the ApplicationClient.java file (src/main/java/marketplace/ApplicationClient.java)
- Switch the configuration to the previously created one.
- Click the green "play" button (to run).
Phase 1 of our team project is submitted by Kashyap Maddala on Vocareum.
The following files were created during Phase 1:
- Item.java
- User.java
- ItemManager.java
- UserManager.java
- DataBase.java
- itemInterface.java
- UserInterface.java
- ItemTest.java
- UserTest.java
- ItemManagerTest.java
- UserManagerTest.java
- Gender.java
- ItemCategory.java
- ItemStatus.java
- Size.java
- SubCategory.java
- ItemNotFoundException.java
- items.json
- item_history_copy.json
- user_information.txt
- message_history.txt
- message_history.json
Phase 2 of our team project is submitted by Kashyap Maddala on Vocareum.
The following files were created during Phase 2:
- ItemManagerInterface.java
- UserManagerInterface.java
- MessageInterface.java
- UserNotFoundException.java
- Message.java
- ApplicationServer.java
- ApplicationClient.java
- ApplicationServerOutdated.java
- ApplicationClientOutdated.java
- ClientInterface.java
- ServerInterface.java
- ApplicationClientTest.java
- ApplicationServerTest.java
- items_copy.json
- user_information_copy.txt
Phase 3 of our team project includes the implementation of a graphical user interface (GUI) for the marketplace application.
The following files were created during Phase 3:
- ApplicationClientGUI.java
- itemIDtracker.txt
- Modern, user-friendly graphical interface
- Real-time item browsing and searching
- Interactive messaging system
- Visual item management
- Account management dashboard
- Responsive design with dark theme
- Real-time updates for listings and messages
- Phase 3 workspace: Submitted by Kashyap Maddala on Vocareum
- Phase 3 project report: Submitted by Enrique Zavala on Brightspace
- Phase 3 presentation video: Submitted by Enrique Zavala on Brightspace
The project now includes all files from Phases 1, 2, and 3:
- Item.java: Represents clothing items with properties like name, price, size, and status. Handles item categorization and seller information.
- User.java: Manages user accounts, authentication, balance, and transaction history. Tracks user ratings and item history.
- ItemManager.java: Manages the marketplace's item collection, file persistence, and search capabilities.
- UserManager.java: Handles user registration, authentication, and data persistence. Manages user sessions and search functionality.
- Message.java: Represents user-to-user messages with content and sender/receiver info.
- ApplicationServer.java: Manages server-side operations, client connections, and data synchronization.
- ApplicationClient.java: Handles client-side operations, user input processing, and server communication.
- ApplicationClientGUI.java: Provides a modern GUI with real-time browsing, messaging, and account management features.
- itemInterface.java: Defines required methods for item management and properties.
- UserInterface.java: Specifies user management methods and properties.
- ItemManagerInterface.java: Defines item collection management and search operations.
- UserManagerInterface.java: Specifies user collection management and authentication methods.
- MessageInterface.java: Defines message handling methods and properties.
- ClientInterface.java: Specifies client-server communication methods.
- ServerInterface.java: Defines server-client communication methods.
- ItemTest.java: Tests Item class functionality and properties.
- UserTest.java: Tests User class methods and user operations.
- ItemManagerTest.java: Tests item management and persistence operations.
- UserManagerTest.java: Tests user management and authentication.
- ApplicationClientTest.java: Tests client-server communication.
- ApplicationServerTest.java: Tests server operations and data handling.
- Gender.java: Defines clothing gender categories (MEN, WOMEN, UNISEX).
- ItemCategory.java: Specifies item types (CLOTHING, FOOTWEAR, ACCESSORIES).
- ItemStatus.java: Defines item states (ACTIVE, SOLD, DELETED).
- Size.java: Specifies clothing sizes (EXTRA_SMALL to EXTRA_LARGE).
- SubCategory.java: Defines specific item types within categories.
- ItemNotFoundException.java: Handles cases when requested items aren't found.
- UserNotFoundException.java: Handles cases when requested users aren't found.
- items.json: Stores current marketplace listings
- item_history_copy.json: Maintains item transaction history
- user_information.txt: Stores user account data
- message_history.txt: Records user message history
- message_history.json: Structured message data storage
- items_copy.json: Backup of item listings
- user_information_copy.txt: Backup of user data
- itemIDtracker.txt: Stores what should be next ID number
Note: ApplicationServerOutdated.java and ApplicationClientOutdated.java are kept for reference but are not in active use.