{"id":17007365,"url":"https://github.com/leoelicos/taggr","last_synced_at":"2026-05-07T13:07:09.015Z","repository":{"id":40246185,"uuid":"493464108","full_name":"leoelicos/taggr","owner":"leoelicos","description":"Express, Sequelize, MySQL","archived":false,"fork":false,"pushed_at":"2023-04-07T16:25:37.000Z","size":157,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T11:48:27.571Z","etag":null,"topics":["dotenv","express","mysql2","sequelize"],"latest_commit_sha":null,"homepage":"https://taggr.herokuapp.com/api/products","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leoelicos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-05-18T01:14:15.000Z","updated_at":"2023-04-07T16:29:44.000Z","dependencies_parsed_at":"2025-03-22T11:46:36.632Z","dependency_job_id":"c3302ab0-41b5-4786-8764-206192357f07","html_url":"https://github.com/leoelicos/taggr","commit_stats":null,"previous_names":["leoelicos/taggr"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leoelicos/taggr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoelicos%2Ftaggr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoelicos%2Ftaggr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoelicos%2Ftaggr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoelicos%2Ftaggr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leoelicos","download_url":"https://codeload.github.com/leoelicos/taggr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoelicos%2Ftaggr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272815818,"owners_count":24997661,"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-08-30T02:00:09.474Z","response_time":77,"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":["dotenv","express","mysql2","sequelize"],"created_at":"2024-10-14T05:25:31.899Z","updated_at":"2026-05-07T13:07:08.983Z","avatar_url":"https://github.com/leoelicos.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# E-Commerce Back End\n\n![Sequelize](https://img.shields.io/badge/6.3.5-0?label=Sequelize\u0026style=for-the-badge\u0026labelColor=white\u0026color=black) ![Express](https://img.shields.io/badge/4.17.1-0?label=Express\u0026style=for-the-badge\u0026labelColor=white\u0026color=black) ![mysql2](https://img.shields.io/badge/2.2.1-0?label=mysql2\u0026style=for-the-badge\u0026labelColor=white\u0026color=black) ![dotenv](https://img.shields.io/badge/8.2.0-0?label=dotenv\u0026style=for-the-badge\u0026labelColor=white\u0026color=black)\n\n## Introduction\n\nThis RESTful e-commerce back end allows developers to perform CRUD API calls like view, add, update and delete. It would allow a developer to test requests using Insomnia to prepare for front-end integration.\n\nThis CLI application uses npm packages `Express`, `Sequelize`, `mysql2` and `dotenv`.\n\nI made this app in order to learn how to implement a database model using Sequelize.\n\nI used GitHub Projects and various Pull Requests to create this app: https://github.com/leoelicos/taggr/projects/1\n\nDeployed: https://taggr.herokuapp.com/api/products\n\n## Installation\n\n### 0. Required\n\n| Programs   | Download links                             |\n| ---------- | ------------------------------------------ |\n| `Node`     | https://nodejs.org/en/download/            |\n| `Mysql`    | https://dev.mysql.com/downloads/installer/ |\n| `Insomnia` | https://insomnia.rest/download             |\n\n### 1. Git clone and go inside\n\n```sh\ngit clone https://github.com/leoelicos/taggr.git\n\ncd taggr\n```\n\n### 2. Rename `.env.EXAMPLE` to `.env`\n\n```sh\nmv .env.Example .env\n```\n\nInput your Mysql credentials. _Don't forget to save!_\n\n- `DB_USER={username}`\n- `DB_PW={password}`\n\n### 3. Go inside `db`, invoke `Mysql`, enter {password}, run `schema`\n\n```sh\ncd db\n\nmysql -u root -p\n\n{password}\n\nsource schema.sql;\n\nexit\n```\n\n### 4. Return to root, install dependencies, (optionally) run seed\n\n```sh\ncd ..\n\nnpm install\n\n//optional\nnpm run seed\n```\n\n## Usage\n\n1. Start the server: `npm start`\n\n2. Access the APIs with Insomnia\n\n## Video Demo\n\nhttps://user-images.githubusercontent.com/99461390/169060902-aa4b208f-06e7-4906-9732-afa4881f74bc.mp4\n\n## API\n\n### Base URL\n\nAll URLs start with `http://localhost:3001/api/`.\n\nNo API key or authentication is required.\n\n---\n\n### Searching\n\nGET request to `/{type}` searches for items which have a specified type.\n\nPossible types include:\n\n- categories: `categories`\n- tags: `tags`\n- products: `products`\n- product tags: `product_tags`\n\n**Example**:\n\n```sh\nGET http://localhost:3001/api/categories\n```\n\n---\n\n### Requesting a specific item\n\nGET request to `/{type}/{id}` searches for items which have a specified type and specified id.\n\nPossible types include:\n\n- categories: `categories`\n- tags: `tags`\n- products: `products`\n\n**Example**:\n\n```sh\nGET http://localhost:3001/api/categories/1\n```\n\n---\n\n### Adding a specific item\n\nPOST request to `/{type}/` adds an item of the specified type. You need to include a JSON with a valid body.\n\nPossible types and the JSON body:\n\n| `{type}`     | JSON                                                                                                                  |\n| ------------ | --------------------------------------------------------------------------------------------------------------------- |\n| `categories` | `{ \"category_name\": STRING }`                                                                                         |\n| `tags`       | `{ \"tag_name\": STRING, \"productIds\": [INTEGER, INTEGER…] }`                                                           |\n| `products`   | `{ \"product_name\": STRING, \"price\": DECIMAL, \"stock\": INTEGER, category_id: INTEGER, \"tagIds\": [INTEGER, INTEGER…] }` |\n\n**Example**\n\n```sh\nPOST http://localhost:3001/api/tags/\n{ \"tag_name\": \"Golf\", \"productIds\": [3] }\n```\n\n---\n\n### Editing a specific item\n\nPUT request to `/{type}/` edits an item of the specified type. You need to include a JSON with a valid body.\n\nPossible types and the JSON body:\n\n| `{type}`     | JSON                                                                                                                  |\n| ------------ | --------------------------------------------------------------------------------------------------------------------- |\n| `categories` | `{ \"category_name\": STRING }`                                                                                         |\n| `tags`       | `{ \"tag_name\": STRING, \"productIds\": [INTEGER, INTEGER…] }`                                                           |\n| `products`   | `{ \"product_name\": STRING, \"price\": DECIMAL, \"stock\": INTEGER, category_id: INTEGER, \"tagIds\": [INTEGER, INTEGER…] }` |\n\n**Example**\n\n```sh\nPUT http://localhost:3001/api/products/\n{ \"product_name\": \"Baseball Bats\", \"price\": 20.00, \"stock\": 3, category_id: 2, \"tagIds\": [2] }\n```\n\n---\n\n### Deleting a specific item\n\nDELETE request to `/{type}/{id}` deletes items which have a specified type and specified id.\n\nPossible types include:\n\n- categories: `categories`\n- tags: `tags`\n- products: `products`\n\n**Example**:\n\n```sh\nDELETE http://localhost:3001/api/categories/1\n```\n\n---\n\n## Example of API response\n\nRequest:\n\n```sh\nGET http://localhost:3001/api/categories\n```\n\nResponse:\n\n```sh\n[\n\t{\n\t\t\"id\": 1,\n\t\t\"category_name\": \"Shirts\",\n\t\t\"products\": []\n\t},\n\t{\n\t\t\"id\": 2,\n\t\t\"category_name\": \"Shorts\",\n\t\t\"products\": [\n\t\t\t{\n\t\t\t\t\"id\": 5,\n\t\t\t\t\"product_name\": \"Cargo Shorts\",\n\t\t\t\t\"price\": 30,\n\t\t\t\t\"stock\": 22,\n\t\t\t\t\"category_id\": 2\n\t\t\t}\n\t\t]\n\t}\n]\n```\n\n## Screenshots\n\n### Screenshot: Insomnia GET Product Tags\n\n![Screenshot: Insomnia GET Product Tags](https://user-images.githubusercontent.com/99461390/169751137-143415fa-7781-4ff6-b183-de7812ce4b3a.jpg)\n\n## Credits\n\n- BCS Resources\n\n## License\n\n\u0026copy; Leo Wong \u003cleoelicos@gmail.com\u003e\n\nLicensed under the [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleoelicos%2Ftaggr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleoelicos%2Ftaggr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleoelicos%2Ftaggr/lists"}