{"id":31774561,"url":"https://github.com/usebruno/demo-ecommerce-api","last_synced_at":"2025-10-10T04:57:45.051Z","repository":{"id":315737926,"uuid":"1060389735","full_name":"usebruno/demo-ecommerce-api","owner":"usebruno","description":"A Demo Ecommerce API","archived":false,"fork":false,"pushed_at":"2025-09-20T10:47:27.000Z","size":85,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-20T12:31:28.853Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/usebruno.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-19T20:39:35.000Z","updated_at":"2025-09-20T10:47:30.000Z","dependencies_parsed_at":"2025-09-20T12:31:52.386Z","dependency_job_id":"8a566742-58fc-4215-b72b-664627de090b","html_url":"https://github.com/usebruno/demo-ecommerce-api","commit_stats":null,"previous_names":["usebruno/demo-ecommerce-api"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/usebruno/demo-ecommerce-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usebruno%2Fdemo-ecommerce-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usebruno%2Fdemo-ecommerce-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usebruno%2Fdemo-ecommerce-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usebruno%2Fdemo-ecommerce-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usebruno","download_url":"https://codeload.github.com/usebruno/demo-ecommerce-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usebruno%2Fdemo-ecommerce-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002655,"owners_count":26083443,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"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":[],"created_at":"2025-10-10T04:57:42.722Z","updated_at":"2025-10-10T04:57:45.042Z","avatar_url":"https://github.com/usebruno.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# E-commerce API\n\nA simple e-commerce API built with NestJS and TypeORM.\n\n## Table of Contents\n- [Authentication](#authentication)\n- [Products](#products)\n- [Cart](#cart)\n- [Orders](#orders)\n- [Base Endpoints](#base-endpoints)\n- [Product Seeding](#product-seeding)\n\n## Authentication\n\n### Register User\n- **URL:** `/auth/register`\n- **Method:** `POST`\n- **Description:** Register a new user account\n- **Payload:**\n  ```json\n  {\n    \"name\": \"string\",\n    \"email\": \"string (valid email format)\",\n    \"password\": \"string (min length: 6)\"\n  }\n  ```\n- **Response:** User information and authentication token\n- **Authentication Required:** No\n\n### Login\n- **URL:** `/auth/login`\n- **Method:** `POST`\n- **Description:** Authenticate a user and receive a token\n- **Payload:**\n  ```json\n  {\n    \"email\": \"string (valid email format)\",\n    \"password\": \"string\"\n  }\n  ```\n- **Response:** Authentication token and user information\n- **Authentication Required:** No\n\n### Get Profile\n- **URL:** `/auth/profile`\n- **Method:** `GET`\n- **Description:** Retrieve authenticated user's profile information\n- **Response:**\n  ```json\n  {\n    \"message\": \"Profile accessed successfully\"\n  }\n  ```\n- **Authentication Required:** Yes\n\n## Products\n\n### Get All Products\n- **URL:** `/products`\n- **Method:** `GET`\n- **Description:** Retrieve a list of all products, optionally filtered by category\n- **Query Parameters:**\n  - `category` (optional): Filter products by category\n- **Response:** Array of product objects\n- **Authentication Required:** No\n\n### Get Product by ID\n- **URL:** `/products/:id`\n- **Method:** `GET`\n- **Description:** Retrieve detailed information about a specific product\n- **URL Parameters:**\n  - `id`: UUID of the product\n- **Response:** Product object details\n- **Authentication Required:** No\n\n## Cart\n\n### Get User Cart\n- **URL:** `/cart`\n- **Method:** `GET`\n- **Description:** Retrieve the current user's shopping cart\n- **Response:** User's cart with items\n- **Authentication Required:** Yes\n\n### Add Item to Cart\n- **URL:** `/cart/add`\n- **Method:** `POST`\n- **Description:** Add a product to the user's shopping cart\n- **Payload:**\n  ```json\n  {\n    \"productId\": \"string (UUID)\",\n    \"quantity\": \"number (min: 1)\"\n  }\n  ```\n- **Response:** Updated cart information\n- **Authentication Required:** Yes\n\n### Update Cart Item\n- **URL:** `/cart/:id`\n- **Method:** `PUT`\n- **Description:** Update the quantity of an item in the cart\n- **URL Parameters:**\n  - `id`: UUID of the cart item\n- **Payload:**\n  ```json\n  {\n    \"quantity\": \"number (min: 1)\"\n  }\n  ```\n- **Response:** Updated cart information\n- **Authentication Required:** Yes\n\n### Remove Item from Cart\n- **URL:** `/cart/:id`\n- **Method:** `DELETE`\n- **Description:** Remove a specific item from the cart\n- **URL Parameters:**\n  - `id`: UUID of the cart item\n- **Response:** Updated cart information\n- **Authentication Required:** Yes\n\n### Clear Cart\n- **URL:** `/cart`\n- **Method:** `DELETE`\n- **Description:** Remove all items from the user's cart\n- **Response:** Confirmation of cart clearing\n- **Authentication Required:** Yes\n\n## Orders\n\n### Create Order\n- **URL:** `/orders`\n- **Method:** `POST`\n- **Description:** Create a new order using the items in the user's cart\n- **Payload:**\n  ```json\n  {\n    \"shippingAddress\": \"string\",\n    \"paymentMethod\": \"string\"\n  }\n  ```\n- **Response:** Order details\n- **Authentication Required:** Yes\n\n### Get User Orders\n- **URL:** `/orders`\n- **Method:** `GET`\n- **Description:** Retrieve a list of all orders placed by the current user\n- **Response:** Array of user's orders\n- **Authentication Required:** Yes\n\n### Get Order by ID\n- **URL:** `/orders/:id`\n- **Method:** `GET`\n- **Description:** Retrieve detailed information about a specific order\n- **URL Parameters:**\n  - `id`: UUID of the order\n- **Response:** Order details\n- **Authentication Required:** Yes\n\n## Base Endpoints\n\n### Root Endpoint\n- **URL:** `/`\n- **Method:** `GET`\n- **Description:** Simple hello message from the API\n- **Response:** Hello message\n- **Authentication Required:** No\n\n## Product Seeding\n\nThe application automatically seeds the database with sample products if no products exist when the server starts.\n\n### Sample Products\n\nThe following products are seeded on application startup:\n\n1. **Smartphone X**\n   - Description: Latest smartphone with advanced features\n   - Price: $999.99\n   - Category: Electronics\n   \n2. **Running Shoes**\n   - Description: Comfortable running shoes for professional athletes\n   - Price: $129.99\n   - Category: Sports\n   \n3. **Coffee Maker**\n   - Description: Automatic coffee maker with timer\n   - Price: $89.99\n   - Category: Home\n   \n4. **Laptop Pro**\n   - Description: High-performance laptop for professionals\n   - Price: $1499.99\n   - Category: Electronics\n   \n5. **Wireless Earbuds**\n   - Description: Premium wireless earbuds with noise cancellation\n   - Price: $199.99\n   - Category: Electronics\n\n### Seeding Logic\n\n- Product seeding occurs automatically on application startup\n- Seeding is skipped if products already exist in the database\n- Seeding logs are visible in the server console\n\n## Authentication\n\nAll endpoints that require authentication expect a valid authentication token in the Authorization header. The token can be obtained through the login endpoint.\n\nFormat: `Authorization: Bearer \u003ctoken\u003e` ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusebruno%2Fdemo-ecommerce-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusebruno%2Fdemo-ecommerce-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusebruno%2Fdemo-ecommerce-api/lists"}