{"id":29353767,"url":"https://github.com/karim-ashraf1/ecommerce-system","last_synced_at":"2025-07-09T02:09:17.032Z","repository":{"id":302870456,"uuid":"1013462429","full_name":"Karim-Ashraf1/Ecommerce-system","owner":"Karim-Ashraf1","description":"Ecommerce-system using java with oop","archived":false,"fork":false,"pushed_at":"2025-07-04T13:08:30.000Z","size":134,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-04T14:52:35.061Z","etag":null,"topics":["java","oop"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Karim-Ashraf1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-04T00:23:45.000Z","updated_at":"2025-07-04T13:08:34.000Z","dependencies_parsed_at":"2025-07-04T14:52:38.171Z","dependency_job_id":"abb43969-97a6-444f-8cfc-e9537e01a37d","html_url":"https://github.com/Karim-Ashraf1/Ecommerce-system","commit_stats":null,"previous_names":["karim-ashraf1/ecommerce-system"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Karim-Ashraf1/Ecommerce-system","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karim-Ashraf1%2FEcommerce-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karim-Ashraf1%2FEcommerce-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karim-Ashraf1%2FEcommerce-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karim-Ashraf1%2FEcommerce-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Karim-Ashraf1","download_url":"https://codeload.github.com/Karim-Ashraf1/Ecommerce-system/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karim-Ashraf1%2FEcommerce-system/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264379216,"owners_count":23598824,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","oop"],"created_at":"2025-07-09T02:09:16.342Z","updated_at":"2025-07-09T02:09:17.024Z","avatar_url":"https://github.com/Karim-Ashraf1.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# E-commerce System\n\n## Project Overview\n\nThis is a Java-based e-commerce system that simulates online shopping functionality. The system handles product management, shopping cart operations, customer checkout, and shipping services. It demonstrates object-oriented programming principles with a clean separation of concerns across different packages.\n\n## Features\n\n- **Product Management**: Support for different product types (Expirable/non-Expirable, shippable/non-shippable)\n- **Shopping Cart**: Add items to cart with quantity validation\n- **Customer Management**: Customer balance tracking and transaction processing\n- **Checkout System**: Complete checkout process with receipt generation\n- **Shipping Service**: Automated shipping calculations and shipment notices for shippable items\n- **Error Handling**: Comprehensive validation for stock, expiration, and balance checks\n\n## Project Structure\n\n```\nsrc/\n│── cart/\n│   ├── Cart.java             # Shopping cart management\n│   └── CartItem.java         # Individual cart item representation\n├── customer/\n│   └── Customer.java         # Customer entity and checkout logic\n├── main/\n│   └── Main.java          # Entry point with test cases\n├── product/\n│   └── Product.java          # Product entity with attributes and methods\n└── services/\n    └── ShippingService.java  # Shipping functionality and receipt printing\n```\n\n## How to Run\n\n### Prerequisites\n\n- Java Development Kit (JDK) 8 or higher\n- Command line interface (Terminal/Command Prompt)\n\n### Compilation and Execution\n\n1. **Navigate to the project root directory:**\n\n   ```bash\n   cd path/to/Ecommerce-system\n   ```\n\n2. **Compile all Java files:**\n\n   ```bash\n   javac -d out src/**/*.java\n   ```\n\n3. **Run the application:**\n   ```bash\n   java -cp out src.Main\n   ```\n\n## Expected Output\n\nWhen you run the application, you should see output similar to:\n\n```\nTest 1: Successful Checkout\n** Shipment notice **\n1x TV         10000g\n2x Cheese       200g\nTotal package weight 10.4kg\n\n** Checkout receipt **\n1x TV           1000\n2x Cheese        200\n1x Biscuits      150\n----------------------\nSubtotal        1350\nShipping          30\nAmount          1380\nRemaining        620\n\n-----------------------------\n\nTest 2: Cart is Empty\nError: Cart is empty.\n\n-----------------------------\n\nTest 3: Expired Product\nError: Product expired.\n\n-----------------------------\n\nTest 4: Not Enough Stock\nError: Not enough stock for product.\n\n-----------------------------\n\nTest 5: Insufficient Balance\nError: Insufficient balance.\n\n-----------------------------\n\nTest 6: Only Non-Shippable Items\nError: Insufficient balance.\n\n-----------------------------\n\nTest 7: Successful Checkout then failed Checkout\n** Shipment notice **\n1x TV         10000g\nTotal package weight 10.0kg\n\n** Checkout receipt **\n1x TV           1000\n2x Mobile Scratch Card  100\n----------------------\nSubtotal        1100\nShipping          10\nAmount          1110\nRemaining        590\n-----------------------------\nError: Insufficient balance.\n\nAll tests complete :)\nThanks Fawry team for this great task :)\n```\n\n_This project demonstrates fundamental e-commerce functionality using core Java concepts and object-oriented programming principles._\n\n\n## Screenshots\n\n### Test Execution - Part 1\n![Test Execution Screenshot 1](screenshots/screenshot_1.png)\n\n### Test Execution - Part 2\n![Test Execution Screenshot 2](screenshots/screenshot_2.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarim-ashraf1%2Fecommerce-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarim-ashraf1%2Fecommerce-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarim-ashraf1%2Fecommerce-system/lists"}