{"id":25404067,"url":"https://github.com/naufan17/e-commerce","last_synced_at":"2026-04-27T11:31:57.341Z","repository":{"id":160262897,"uuid":"635139729","full_name":"naufan17/e-commerce","owner":"naufan17","description":"Rest API simple online shop, from choosing a product, adding it to cart and checking out the product to the delivery address. The Rest API is built using the Go programming language and MySQL database. Applications are bundled in containers using Docker.","archived":false,"fork":false,"pushed_at":"2023-06-25T16:58:46.000Z","size":1469,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T18:25:48.363Z","etag":null,"topics":["docker","e-commerce","go","rest-api"],"latest_commit_sha":null,"homepage":"","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/naufan17.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-05-02T03:48:08.000Z","updated_at":"2023-06-25T17:19:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"4114bc7f-1b92-4e9b-a99a-474336d14718","html_url":"https://github.com/naufan17/e-commerce","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/naufan17/e-commerce","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naufan17%2Fe-commerce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naufan17%2Fe-commerce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naufan17%2Fe-commerce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naufan17%2Fe-commerce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/naufan17","download_url":"https://codeload.github.com/naufan17/e-commerce/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naufan17%2Fe-commerce/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32335296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["docker","e-commerce","go","rest-api"],"created_at":"2025-02-16T03:39:14.047Z","updated_at":"2026-04-27T11:31:57.326Z","avatar_url":"https://github.com/naufan17.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# e-commerce\nA basic online store API written with Golang Programming language\n\nThis API is basic implementation of an e-commerce(online store)\n- You can diplay product and category data\n- Also can display product by category\n- Authentication is based JWT(JSON Web Token)\n- Register for new user to get token\n- Login for registered user to get token\n- User can display, add and delete shipping address\n- User can display, add and delete product in cart\n- User can orders product in cart by entering shipping address\n- Built using golang programming language and MySQL database\n- Applications are bundled in containers using Docker\n\n## API Documentation and Usage\n\n### 1. View Category\n- **Method** - `GET` \u003cbr\u003e\n- **URL Pattern** - `/categories` \u003cbr\u003e\n- **Authentication** - `false` \u003cbr\u003e\n- **Usage**\n```\ncurl -X GET BASE_URL/categories\n```\n- **Example**\n![Screenshot](/screenshots/GetCategory.png)\n\n### 2. View Product\n- **Method** - `GET` \u003cbr\u003e\n- **URL Pattern** - `/products` \u003cbr\u003e\n- **Authentication** - `false` \u003cbr\u003e\n- **Usage**\n```\ncurl -X GET BASE_URL/products \n```\n- **Example**\n![Screenshot](/screenshots/GetProduct.png)\n\n### 3. View Product by Category\n- **Method** - `GET` \u003cbr\u003e\n- **URL Pattern** - `/products?category={category}` \u003cbr\u003e\n- **Authentication** - `false` \u003cbr\u003e\n- **Usage**\n```\ncurl -X GET BASE_URL/products?=category={category}\n```\n- **Example**\n![Screenshot](/screenshots/GetProductbyCategory.png)\n\n### 4. Register User\n- **Method** - `POST` \u003cbr\u003e\n- **URL Pattern** - `/register` \u003cbr\u003e\n- **Authentication** - `false` \u003cbr\u003e\n- **Usage**\n```\ncurl -X POST \\\n-d '{ \"username\": \"username\", \n    \"password\": \"password\"}' \\\nBASE_URL/register\n```\n- **Example**\n![Screenshot](/screenshots/Register.png)\n\n### 5. Login User\n- **Method** - `POST` \u003cbr\u003e\n- **URL Pattern** - `/login` \u003cbr\u003e\n- **Authentication** - `false` \u003cbr\u003e\n- **Usage**\n```\ncurl -X POST \\\n-d '{ \"username\": \"username\", \n    \"password\": \"password\"}' \\\nBASE_URL/login\n```\n- **Example**\n![Screenshot](/screenshots/Login.png)\n\n### 6. Add Shipping Address\n- **Method** - `POST` \u003cbr\u003e\n- **URL Pattern** - `/address` \u003cbr\u003e\n- **Authentication** - `true` \u003cbr\u003e\n- **Usage**\n```\ncurl -X POST \\\n-H \"Authorization: Bearer \u003cACCESS_TOKEN\u003e\" \\\n-d '{ \"shipping_address\": \"shipping_address\"}' \\\nBASE_URL/address\n```\n- **Example**\n![Screenshot](/screenshots/PostAddress.png)\n\n### 7. View Shipping Address\n- **Method** - `GET` \u003cbr\u003e\n- **URL Pattern** - `/address` \u003cbr\u003e\n- **Authentication** - `true` \u003cbr\u003e\n- **Usage**\n```\ncurl -X GET \\\n-H \"Authorization: Bearer \u003cACCESS_TOKEN\u003e\" \\\nBASE_URL/address\n```\n- **Example**\n![Screenshot](/screenshots/GetAddress.png)\n\n### 8. Update Shipping Address\n- **Method** - `PUT` \u003cbr\u003e\n- **URL Pattern** - `/address` \u003cbr\u003e\n- **Authentication** - `true` \u003cbr\u003e\n- **Usage**\n```\ncurl -X PUT \\\n-H \"Authorization: Bearer \u003cACCESS_TOKEN\u003e\" \\\n-d '{ \"address_id\": \"address_id\",\n    \"shipping_address\": \"shipping_address\"}' \\\nBASE_URL/address\n```\n- **Example**\n![Screenshot](/screenshots/PutAddress.png)\n\n### 9. Delete Shipping Address\n- **Method** - `DELETE` \u003cbr\u003e\n- **URL Pattern** - `/address/{address_id}` \u003cbr\u003e\n- **Authentication** - `true` \u003cbr\u003e\n- **Usage**\n```\ncurl -X DELETE \\\n-H \"Authorization: Bearer \u003cACCESS_TOKEN\u003e\" \\\nBASE_URL/address/{address_id}\n```\n- **Example**\n![Screenshot](/screenshots/DeleteAddress.png)\n\n### 10. Add Product to Cart\n- **Method** - `POST` \u003cbr\u003e\n- **URL Pattern** - `/cart` \u003cbr\u003e\n- **Authentication** - `true` \u003cbr\u003e\n- **Usage**\n```\ncurl -X POST \\\n-H \"Authorization: Bearer \u003cACCESS_TOKEN\u003e\" \\\n-d '{ \"product_id\": \"product_id\", \n    \"count\": \"count\"}' \\\nBASE_URL/cart\n```\n- **Example**\n![Screenshot](/screenshots/PostCart.png)\n\n### 11. View Product in Cart\n- **Method** - `GET` \u003cbr\u003e\n- **URL Pattern** - `/cart` \u003cbr\u003e\n- **Authentication** - `true` \u003cbr\u003e\n- **Usage**\n```\ncurl -X GET \\\n-H \"Authorization: Bearer \u003cACCESS_TOKEN\u003e\" \\\nBASE_URL/cart\n```\n- **Example**\n![Screenshot](/screenshots/GetCart.png)\n\n### 12. Update Product in Cart\n- **Method** - `PUT` \u003cbr\u003e\n- **URL Pattern** - `/cart` \u003cbr\u003e\n- **Authentication** - `true` \u003cbr\u003e\n- **Usage**\n```\ncurl -X PUT \\\n-H \"Authorization: Bearer \u003cACCESS_TOKEN\u003e\" \\\n-d '{ \"cart_id\": \"cart_id\", \n    \"count\": \"count\"}' \\\nBASE_URL/cart\n```\n- **Example**\n![Screenshot](/screenshots/PutCart.png)\n\n### 13. Delete Product in Cart\n- **Method** - `DELETE` \u003cbr\u003e\n- **URL Pattern** - `/cart/{cart_id}` \u003cbr\u003e\n- **Authentication** - `true` \u003cbr\u003e\n- **Usage**\n```\ncurl -X DELETE \\\n-H \"Authorization: Bearer \u003cACCESS_TOKEN\u003e\" \\\nBASE_URL/cart/{cart_id}\n```\n- **Example**\n![Screenshot](/screenshots/DeleteCart.png)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaufan17%2Fe-commerce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaufan17%2Fe-commerce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaufan17%2Fe-commerce/lists"}