{"id":24838168,"url":"https://github.com/said-alisic/clothesstore_kea","last_synced_at":"2026-04-08T20:50:38.610Z","repository":{"id":47643793,"uuid":"358515798","full_name":"Said-Alisic/ClothesStore_KEA","owner":"Said-Alisic","description":"Node.js server connected with a MySQL database through sequelize for Software Development Bachelor's semester one databases course mandatory assignment","archived":false,"fork":false,"pushed_at":"2021-10-26T14:23:30.000Z","size":2320,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T04:14:43.479Z","etag":null,"topics":["express","mysql-database","nodejs","sequelize-orm"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Said-Alisic.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}},"created_at":"2021-04-16T07:37:09.000Z","updated_at":"2021-12-09T23:36:19.000Z","dependencies_parsed_at":"2022-09-06T20:30:35.607Z","dependency_job_id":null,"html_url":"https://github.com/Said-Alisic/ClothesStore_KEA","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Said-Alisic/ClothesStore_KEA","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Said-Alisic%2FClothesStore_KEA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Said-Alisic%2FClothesStore_KEA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Said-Alisic%2FClothesStore_KEA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Said-Alisic%2FClothesStore_KEA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Said-Alisic","download_url":"https://codeload.github.com/Said-Alisic/ClothesStore_KEA/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Said-Alisic%2FClothesStore_KEA/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31573788,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["express","mysql-database","nodejs","sequelize-orm"],"created_at":"2025-01-31T06:09:35.844Z","updated_at":"2026-04-08T20:50:38.582Z","avatar_url":"https://github.com/Said-Alisic.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Documentation\r\n\r\nWelcome to the ClothesStore_KEA documentation. The application is not finished yet and is being gradually updated.\r\n\r\n## Setup instructions\r\n\r\n**Prerequisites**\r\n- npm\r\n- node.js\r\n- mysql\r\n- create .env file under server directory\r\n\r\n**.env file contents**\r\n- DB={name}\r\n- DB_HOST={host} (e.g., localhost)\r\n- DB_USER={user} (e.g., admin or root, etc.)\r\n- DB_PASS={password}\r\n- DB_DIALECT={database_dialect} (e.g., mysql or postgres)\r\n- PORT={port} (e.g. we use 8080)\r\n\r\n**Creating database**\r\n1. 001_create_clothes_store_db.sql: Contains all scripts to create new database and add a new user to it\r\n2. 002_create_clothes_store_triggers.sql: Contains scripts to create triggers for database tables\r\n3. 003_populate_clothes_store_db.sql: Contains scripts to populate the database with data\r\n4. 004_reset_clothes_store_db.sql: Contains scripts to delete db content and repopulate it\r\n\r\n**Running the app**\r\n1. Navigate to the folder server folder\r\n2. Run `npm install` to install all dependencies\r\n3. Run `npm run start` to start the backend API server \r\n4. Navigate to http://localhost:8080 for the api (e.g. http://localhost:8080/api/users to GET all users)\r\n5. Navigate to http://localhost:4200 for the client application ( Not yet implemented )\r\n\r\n**Testing the API**\r\n1. Navigate to http://localhost:8080/api-docs\r\n2. Use the Swagger API development tool to test the API CRUD endpoints\r\n\r\n**Sign in - things to note**\\\r\nTo sign in after the database was populated use credentials:  \r\n- sign in as ADMIN with rights to do all operations (role ID 1)\\\r\n    email: jamesjimick@mystore.com \r\n    password: JaJiPass\r\n- sign in as EMPLOYEE (role ID 2)\\\r\n    email: bobbayes@mystore.com\r\n    password: BoBaPass\r\n- sign in as CUSTOMER (role ID 3)\\\r\n    email: jamiejoe@mystore.com\r\n    password: JaJo\r\n- To sign up, add a new user with Swagger or Postman API testing application\r\n\r\n**Data to use with Postman to sign up as a CUSTOMER**\r\n1. POST a new user to the API route http://localhost:8080/api/users\r\n    - {\r\n        \"role_id\": 3,\r\n        \"first_name\": \"new\",\r\n        \"last_name\": \"user\",\r\n        \"email\": \"newuser@email.com\",\r\n        \"password\": \"newpass\"\r\n       }\r\n    \r\n2. POST sign in credentials to sign in with the new user at http://localhost:8080/api/users/signin\r\n    - {\r\n        \"email\": \"newuser@email.com\",\r\n        \"password\": \"newpass\"\r\n       }   \r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaid-alisic%2Fclothesstore_kea","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaid-alisic%2Fclothesstore_kea","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaid-alisic%2Fclothesstore_kea/lists"}