{"id":21064516,"url":"https://github.com/tawfik-s/product_catalog_api-spring","last_synced_at":"2026-05-03T18:35:12.242Z","repository":{"id":122989259,"uuid":"570995606","full_name":"tawfik-s/Product_Catalog_API-spring","owner":"tawfik-s","description":"API for E commerce app like amazon build with Requirement document","archived":false,"fork":false,"pushed_at":"2023-01-26T18:42:09.000Z","size":983,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-28T06:22:13.221Z","etag":null,"topics":["hibernate","jwt","oracle-database","spring","spring-boot","spring-jpa","spring-rest","spring-rest-api","spring-security"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tawfik-s.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2022-11-26T20:12:35.000Z","updated_at":"2023-09-06T08:06:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"ffeafc7c-f3ba-4754-bde5-87b87413f674","html_url":"https://github.com/tawfik-s/Product_Catalog_API-spring","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tawfik-s/Product_Catalog_API-spring","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tawfik-s%2FProduct_Catalog_API-spring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tawfik-s%2FProduct_Catalog_API-spring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tawfik-s%2FProduct_Catalog_API-spring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tawfik-s%2FProduct_Catalog_API-spring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tawfik-s","download_url":"https://codeload.github.com/tawfik-s/Product_Catalog_API-spring/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tawfik-s%2FProduct_Catalog_API-spring/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32580051,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["hibernate","jwt","oracle-database","spring","spring-boot","spring-jpa","spring-rest","spring-rest-api","spring-security"],"created_at":"2024-11-19T17:49:50.812Z","updated_at":"2026-05-03T18:35:12.223Z","avatar_url":"https://github.com/tawfik-s.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Product_Catalog_API\n\nAPI for E commerce app from Requirement document\n\n[Requirement document](./requirements.md)\n\n\n### post man for API end points map\n[![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/30ef984c008334ca9696?action=collection%2Fimport)\n\n\n### prepare local docker instance for mysql\n\n```shell\n docker run --name mysql1 -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root  mysql:latest\n```\n\n[//]: # ([How to create oracle docker image]\u0026#40;https://github.com/oracle/docker-images/tree/main/OracleDatabase/SingleInstance\u0026#41;)\n\n[//]: # ()\n[//]: # (```shell)\n\n[//]: # ( docker run --name oracle19 )\n\n[//]: # ( -p 1521:1521 -p 5500:5500 )\n\n[//]: # ( -e ORACLE_PWD=system )\n\n[//]: # ( -v E:/docker/oraclexedatabase:/opt/oracle/oradata )\n\n[//]: # ( 6ca1a57e059ad388721234dbcacfcb2e1bd3c60c140ed2a24be32a9e99d1d504)\n\n[//]: # (#last number is the image id )\n\n[//]: # (```)\n### database config \nmodify the properties file\n\n```properties\nspring.datasource.username=root\nspring.datasource.password=root\nspring.datasource.url=jdbc:mysql://127.0.0.1:3306/product_catalog_api\n```\n\n[//]: # (```properties)\n\n[//]: # (spring.datasource.url=jdbc:oracle:thin:@localhost:1521:xe)\n\n[//]: # (spring.datasource.username=system)\n\n[//]: # (spring.datasource.password=system)\n\n[//]: # (```)\n### project entity diagram\n\n![entity diagram](./images/entity%20diagram.png)\n\n### database ERD\n\n![ERD](./images/product_catalog_api@localhost.png)\n\n### run the project\n\n- first install maven [steps](https://maven.apache.org/install.html)\n- use this command to run spring project `mvn spring-boot:run`\n\n### package this app\n\n- clean create jar `mvn clean install`\n- run this jar `java -jar \u003cjar file name\u003e`\n\n### project class diagram\n\n![class diagram](./images/product_catalog_api_class_diagram.png)\n\n\n### database sql \n\n```sql\ncreate table category\n(\n    id   bigint       not null\n        primary key,\n    name varchar(255) null\n);\n\ncreate table customer\n(\n    id       bigint       not null\n        primary key,\n    email    varchar(255) null,\n    password varchar(255) null\n);\n\ncreate table hibernate_sequence\n(\n    next_val bigint null\n);\n\ncreate table order_item\n(\n    id       bigint       not null\n        primary key,\n    image    varchar(255) null,\n    name_ar  varchar(255) null,\n    name_en  varchar(255) null,\n    price    bigint       null,\n    quantity bigint       null\n);\n\ncreate table orders\n(\n    id bigint not null\n        primary key\n);\n\ncreate table customer_orders\n(\n    customer_id bigint not null,\n    orders_id   bigint not null,\n    constraint UK_4m0sjmnfkb97mpn89e5xnw3v3\n        unique (orders_id),\n    constraint FK39sxykqbp8npv4p80lt3p23i8\n        foreign key (orders_id) references orders (id),\n    constraint FK7ntkighomv9fa5287rev8a3wy\n        foreign key (customer_id) references customer (id)\n);\n\ncreate table orders_order_items\n(\n    order_id       bigint not null,\n    order_items_id bigint not null,\n    constraint UK_9d47gapmi35omtannusv6btu3\n        unique (order_items_id),\n    constraint FK3l8rktw0f4w5t6tift31e2d7c\n        foreign key (order_id) references orders (id),\n    constraint FK7nw03p9mxq154wvbsonaq0qrw\n        foreign key (order_items_id) references order_item (id)\n);\n\ncreate table product\n(\n    id                bigint       not null\n        primary key,\n    image             varchar(255) null,\n    limit_quantity    bigint       null,\n    name_ar           varchar(255) null,\n    name_en           varchar(255) null,\n    num_of_sold_units bigint       null,\n    price             bigint       null,\n    quantity          bigint       null\n);\n\ncreate table category_products\n(\n    category_id bigint not null,\n    products_id bigint not null,\n    constraint UK_fdnk3mk70n1rc08vw1cj65kqw\n        unique (products_id),\n    constraint FKe9irm5a62pmolhvr468cip3v3\n        foreign key (products_id) references product (id),\n    constraint FKqwkr0l0xbluhhkm7s0c1tg8en\n        foreign key (category_id) references category (id)\n);\n\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftawfik-s%2Fproduct_catalog_api-spring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftawfik-s%2Fproduct_catalog_api-spring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftawfik-s%2Fproduct_catalog_api-spring/lists"}