{"id":15102560,"url":"https://github.com/bhupirao/prospecta_coding","last_synced_at":"2026-02-19T13:02:19.424Z","repository":{"id":255810321,"uuid":"853668964","full_name":"bhupirao/Prospecta_Coding","owner":"bhupirao","description":"This Spring Boot application provides a RESTful API for managing products. It interacts with the Fake Store API to fetch product details and add new products. The application uses MySQL for local data storage and RestTemplate for external API communication.","archived":false,"fork":false,"pushed_at":"2024-09-09T14:24:34.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T11:50:58.676Z","etag":null,"topics":["java","springboot","sql-database"],"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/bhupirao.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":"2024-09-07T07:33:40.000Z","updated_at":"2024-09-09T14:24:38.000Z","dependencies_parsed_at":"2024-09-07T08:23:53.912Z","dependency_job_id":"b5ccdbc5-4e22-4d6d-9ad2-2ba327233df6","html_url":"https://github.com/bhupirao/Prospecta_Coding","commit_stats":null,"previous_names":["bhupirao/prospecta_coding"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bhupirao/Prospecta_Coding","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhupirao%2FProspecta_Coding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhupirao%2FProspecta_Coding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhupirao%2FProspecta_Coding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhupirao%2FProspecta_Coding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bhupirao","download_url":"https://codeload.github.com/bhupirao/Prospecta_Coding/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhupirao%2FProspecta_Coding/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29614591,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T10:52:55.328Z","status":"ssl_error","status_checked_at":"2026-02-19T10:52:26.323Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["java","springboot","sql-database"],"created_at":"2024-09-25T19:01:55.965Z","updated_at":"2026-02-19T13:02:19.404Z","avatar_url":"https://github.com/bhupirao.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Product Application\n\n## Overview\n\nThis Spring Boot application provides a RESTful API for managing products. It interacts with the [Fake Store API](https://fakestoreapi.com/) to fetch product details and add new products. The application uses MySQL for local data storage and `RestTemplate` for external API communication.\n\n[Documentation](https://drive.google.com/file/d/1JB_nk6vO0RiwOv9XqgeyPwHK9dSafe78/view?usp=sharing)\n\n\n\n## Features\n\n- Fetch products by category from the Fake Store API.\n- Add new products to the Fake Store API and save them to a local database.\n\n## Endpoints\n\n### 1. Fetch Products by Category\n\n- **URL:** `/api/products/category/{category}`\n- **Method:** `GET`\n- **Description:** Fetches a list of products by category from the Fake Store API.\n- **URL Example:** `http://localhost:8888/api/products/category/jewelery`\n- **Path Variable:**\n  - `category` (string): The category to filter products by.\n- **Response:**\n  - **200 OK:** Returns a list of products in JSON format.\n  - **404 Not Found:** If no products are found for the specified category.\n\n**Response Example:**\njson\n[\n  {\n    \"id\": 5,\n    \"title\": \"Product 1\",\n    \"price\": 19.99,\n    \"description\": \"Description of product 1\",\n    \"category\": \"jewelery\",\n    \"image\": \"https://example.com/image1.jpg\"\n  },\n  {\n    \"id\": 6,\n    \"title\": \"Product 2\",\n    \"price\": 29.99,\n    \"description\": \"Description of product 2\",\n    \"category\": \"jewelery\",\n    \"image\": \"https://example.com/image2.jpg\"\n  }\n]\n## Add a New Product \nURL: /api/products/add\nMethod: POST\nDescription: Adds a new product to the Fake Store API and saves it to the local database.\nRequest Body:\ntitle (string): The title of the product.\nprice (number): The price of the product.\ndescription (string): The description of the product.\ncategory (string): The category of the product.\nimage (string): The URL of the product image.\nRequest Body Example:\njson\n\n{\n  \"title\": \"New Product\",\n  \"price\": 25.99,\n  \"description\": \"This is a description of the new product\",\n  \"category\": \"electronics\",\n  \"image\": \"https://example.com/image.jpg\"\n}\nResponse:\n200 OK: Returns the details of the newly created product in JSON format.\n400 Bad Request: If the request body is invalid.\nResponse Example:\n\njson\n\n{\n  \"id\": 31,\n  \"title\": \"New Product\",\n  \"price\": 25.99,\n  \"description\": \"This is a description of the new product\",\n  \"category\": \"electronics\",\n  \"image\": \"https://example.com/image.jpg\"\n}\n**Configuration**\napplication.properties\nproperties\n\nspring.application.name=Product Application\nserver.port=8888\n\n# MySQL properties\nspring.datasource.url=jdbc:mysql://localhost:3306/fakestore\nspring.datasource.username=root\nspring.datasource.password=root\nspring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver\n\n# JPA properties\nspring.jpa.hibernate.ddl-auto=update\nspring.jpa.show-sql=true\nspring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect\n\n# Timeouts for RestTemplate (in milliseconds)\nresttemplate.connection.timeout=5000\nresttemplate.read.timeout=5000\n\n# Enable HTTP client logging for debugging purposes\nlogging.level.org.springframework.web.client.RestTemplate=DEBUG\n\n# External API URL\nexternal.api.url=https://fakestoreapi.com\nRunning the Application\nClone the Repository\nsh \n[Git Clone](https://github.com/bhupirao/Prospecta_Coding.git) \nNavigate to the Project Directory\n\nsh\ncd product-application\nBuild and Run the Application\n\nsh\n./mvnw spring-boot:run\nAccess the API\nThe application will be available at[LocalHost](http://localhost:8888) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhupirao%2Fprospecta_coding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbhupirao%2Fprospecta_coding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhupirao%2Fprospecta_coding/lists"}