{"id":18575562,"url":"https://github.com/jsiqbal/ecommerce","last_synced_at":"2025-05-16T00:30:28.350Z","repository":{"id":209254321,"uuid":"723314684","full_name":"JsIqbal/ecommerce","owner":"JsIqbal","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-26T19:46:18.000Z","size":65,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-02-17T15:13:25.941Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/JsIqbal.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":"2023-11-25T09:18:50.000Z","updated_at":"2024-09-10T15:56:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"762b2fba-4f8a-4d91-8fea-ddefbd279b73","html_url":"https://github.com/JsIqbal/ecommerce","commit_stats":null,"previous_names":["jsiqbal/ecommerce"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JsIqbal%2Fecommerce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JsIqbal%2Fecommerce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JsIqbal%2Fecommerce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JsIqbal%2Fecommerce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JsIqbal","download_url":"https://codeload.github.com/JsIqbal/ecommerce/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254447280,"owners_count":22072753,"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":[],"created_at":"2024-11-06T23:20:17.198Z","updated_at":"2025-05-16T00:30:28.322Z","avatar_url":"https://github.com/JsIqbal.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ecommerce\n\nYour Comprehensive Guide for the Project\n\n## Table of Contents\n\n1. [Seed Database](#seed-database)\n2. [Start Application Locally](#start-application-locally)\n3. [Start Application with Docker](#start-application-with-docker)\n\n\u003ca name=\"seed-database\"\u003c/a\u003e\n\n## 1. Seed Database(locally) - you need to run postgresql locally\n\nTo seed the database:\n\n-   Configure your `.env` file.\n-   Navigate to the root of the application.\n-   Run the following command in the terminal:\n\n```bash\nmake seed\n\n```\n\n## 1.1. Seed Database(Docker)\n\nTo seed the database:\n\n-   Configure your `.env` file.\n-   Navigate to the root of the application.\n-   Run the following command in the terminal:\n\n```bash\nmake serve\n```\n\n-   After executing the command you will be prompt with 2 options:\n\n    -   option 1: Docker\n    -   option 2: local\n\n-   Choose the Docker\n-   You will see an error saying that connection failed but a db container will be created\n-   Run the following command in another termianl in the same directory:\n\n```bash\nmake seed\n```\n\n-   Terminate the make serve terminal and restart the project using\n\n```bash\nmake serve\n```\n\n\u003c!-- Start Application --\u003e\n\n# Start Application\n\nTo start the application locally\n\n-   configure the .env file\n-   go to root of the application\n-   run the following command in the terminal\n\n```bash\nmake serve\n```\n\n-   After executing the command you will be prompt with 2 options:\n\n    -   option 1: Docker\n    -   option 2: local\n\n-   Choose the Docker\n-   You will see an error saying that connection failed but a db container will be created\n-   Run the following command in another termianl in the same directory:\n\n```bash\nmake seed\n```\n\n# API Docs (Swagger Documentation):\n\n-   if used docker: http://localhost:5000/docs/index.html\n-   if used local: http://localhost:8080/docs/index.html\n\n# Brand APIs:\n\n## End-point: Create brand (Method: POST)\n\n```\nhttp://localhost:5000/api/brands\n```\n\n### Body (**raw**)\n\n```json\n{\n    \"name\": \"ASUS\",\n    \"status_id\": 1\n}\n```\n\n## End-point: Get brand (Method: GET)\n\n```\nhttp://localhost:5000/api/brands/:id\n```\n\n## End-point: Update Brand (Method: PUT)\n\n```\nhttp://localhost:5000/api/brands/:id\n```\n\n### Body (**raw**)\n\n```json\n{\n    \"name\": \"Lenevo\",\n    \"status_id\": 1\n}\n```\n\n## End-point: Delete Brand (Method: DELETE)\n\n```\nhttp://localhost:5000/api/brands/:id\n```\n\n## End-point: Get brands (Method: GET)\n\n```\nhttp://localhost:5000/api/brands?page=1\u0026limit=2\n```\n\n### Query Parameters:\n\n| Param | value |\n| ----- | ----- |\n| page  | 1     |\n| limit | 2     |\n\n⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃\n\n# Product\n\n## End-point: Create product (Method: POST)\n\n```\nhttp://localhost:5000/api/products\n```\n\n### Body (**raw**)\n\n```json\n{\n    \"name\": \"Lenovo Think V2\",\n    \"description\": \"Powerful laptop for professional use.\",\n    \"brand_id\": \"5f2dc58e-d3a8-4580-b4fb-0e72d93f0afe\",\n    \"category_id\": \"8ace9e3f-3bca-4deb-8128-e0f67b0c0924\",\n    \"supplier_id\": \"5d96a2df-370b-4afd-a7c4-cfcc1e7241d2\",\n    \"unit_price\": 50.05,\n    \"discount_price\": 12.54,\n    \"tags\": [\"business\", \"professional\"],\n    \"status_id\": 1,\n    \"stock_quantity\": 100\n}\n```\n\n## End-point: Get product (Method: GET)\n\n```\nhttp://localhost:5000/api/products/:id\n```\n\n## End-point: Update product (Method: PUT)\n\n```\nhttp://localhost:5000/api/products/:id\n```\n\n### Body (**raw**)\n\n```json\n{\n    \"productName\": \"Lenovo Think V2\",\n    \"productDescription\": \"A powerful laptop designed for professional use.\",\n    \"brandId\": \"5f2dc58e-d3a8-4580-b4fb-0e72d93f0afe\",\n    \"categoryId\": \"8ace9e3f-3bca-4deb-8128-e0f67b0c0924\",\n    \"supplierId\": \"5d96a2df-370b-4afd-a7c4-cfcc1e7241d2\",\n    \"unitPrice\": 50.05,\n    \"discountPrice\": 12.54,\n    \"tags\": [\"abc\", \"xyz\"],\n    \"statusId\": 1,\n    \"stockQuantity\": 100\n}\n```\n\n## End-point: Delete product (Method: DELETE)\n\n```\n http://localhost:5000/api/products/:id\n```\n\n## End-point: Get products\n\n### Method: GET\n\n```\nhttp://localhost:5000/api/products?page=1\u0026limit=20\n```\n\n### Query Params\n\n| Param | value |\n| ----- | ----- |\n| page  | 1     |\n| limit | 20    |\n\n⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃\n\n# Supplier APIs\n\n## End-point: Create supplier (Method: POST)\n\n```\nhttp://localhost:5000/api/suppliers\n```\n\n### Body (**raw**)\n\n```json\n{\n    \"name\": \"Iqbal Hossain\",\n    \"email\": \"zafar.iq3089@gmail.com\",\n    \"phone\": \"01403229479\",\n    \"status_id\": 1,\n    \"is_verified_supplier\": true\n}\n```\n\n## End-point: Get supplier (Method: GET)\n\n```\nhttp://localhost:5000/api/suppliers/:id\n```\n\n## End-point: Update supplier (Method: PUT)\n\n```\nhttp://localhost:5000/api/suppliers/:id\n```\n\n### Body (**raw**)\n\n```json\n{\n    \"name\": \"THE KRAKEN\",\n    \"email\": \"kraken@gmail.com\",\n    \"phone\": \"01403229479\",\n    \"status_id\": 1,\n    \"is_verified_supplier\": true\n}\n```\n\n## End-point: Delete supplier (Method: DELETE)\n\n```\nhttp://localhost:5000/api/suppliers/:id\n```\n\n## End-point: Get suppliers (Method: GET)\n\n```\nhttp://localhost:5000/api/suppliers?page=1\u0026limit=5\n```\n\n### Query Params\n\n| Param | value |\n| ----- | ----- |\n| page  | 1     |\n| limit | 5     |\n\n⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃\n\n# Category APIs:\n\n## End-point: Create category (Method: POST)\n\n```\nhttp://localhost:5000/api/categories\n```\n\n### Body (**raw**)\n\n```json\n{\n    \"name\": \"Android\",\n    \"parent_id\": \"pef438e9-2c04-4e12-961d-d35e2d75e5cf\",\n    \"status_id\": 1\n}\n```\n\n## End-point: Get category (Method: GET)\n\n```\nhttp://localhost:5000/api/categories/:id\n```\n\n## End-point: Update categories (Method: PUT)\n\n```\nhttp://localhost:5000/api/categories/:id\n```\n\n### Body (**raw**)\n\n```json\n{\n    \"name\": \"iphone\",\n    \"status_id\": 1\n}\n```\n\n## End-point: Delete Brand (Method: DELETE)\n\n```\nhttp://localhost:5000/api/categories/:id\n```\n\n## End-point: Get categories (Method: GET)\n\n```\nhttp://localhost:5000/api/categories?page=1\u0026limit=5\n```\n\n## End-point: Get category tree (Method: GET)\n\n```\nhttp://localhost:5000/api/categories/tree\n```\n\n### Query Params\n\n| Param | value |\n| ----- | ----- |\n| page  | 1     |\n| limit | 5     |\n\n⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃\n\n## Thank You!\n\nThank you for your time and assistance! 🙌 If you have any more questions or need further help, feel free to [reach out](https://github.com/JsIqbal). Have a great day!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsiqbal%2Fecommerce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsiqbal%2Fecommerce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsiqbal%2Fecommerce/lists"}