{"id":28321228,"url":"https://github.com/uosyph/ecommerce-api","last_synced_at":"2026-04-04T21:33:24.995Z","repository":{"id":58688539,"uuid":"528667823","full_name":"uosyph/ecommerce-api","owner":"uosyph","description":"A RESTful API for a marketplace, connected to a database, enabling users to perform full CRUD operations seamlessly.","archived":false,"fork":false,"pushed_at":"2022-11-15T19:08:10.000Z","size":24218,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-19T13:39:27.001Z","etag":null,"topics":["express-js","jasmine","jwt","nodejs","postgresql","typescript"],"latest_commit_sha":null,"homepage":"","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/uosyph.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":"2022-08-25T02:35:49.000Z","updated_at":"2024-07-27T02:38:24.000Z","dependencies_parsed_at":"2023-01-23T03:00:17.245Z","dependency_job_id":null,"html_url":"https://github.com/uosyph/ecommerce-api","commit_stats":null,"previous_names":["uosyph/ecommerce-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/uosyph/ecommerce-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uosyph%2Fecommerce-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uosyph%2Fecommerce-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uosyph%2Fecommerce-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uosyph%2Fecommerce-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uosyph","download_url":"https://codeload.github.com/uosyph/ecommerce-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uosyph%2Fecommerce-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31415110,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: 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-js","jasmine","jwt","nodejs","postgresql","typescript"],"created_at":"2025-05-25T12:13:25.512Z","updated_at":"2026-04-04T21:33:24.974Z","avatar_url":"https://github.com/uosyph.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca name=\"readme-top\"\u003e\u003c/a\u003e\n\n\u003ch1 align=\"center\"\u003e\n  E-Commerce API\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cb\u003eSecond Project\u003c/b\u003e for Advanced Full-Stack Web Development, NANODEGREE - Udacity.\n\u003cbr\u003e\nA RESTful API connected to a database for a marketplace that lets users signup/login/delete account,\n\u003cbr\u003e\nview/create/delete products, and make/cancel orders. Products can be filtered by category or most popular.\n\u003cbr\u003e\nPasswords are hashed before being stored in the database, and users get authorized before doing a CRUD operation.\n\u003c/p\u003e\n\n---\n\n## Installation\n\n### Build\n\n```\nnpm run build\n```\n\nBuild the TypeScript files into JavaScript files and save the JS files in the `./dist` directory.\n\n### Start the server\n\n```\nnpm run start\n```\n\nStart running the server on port `3000` and the DB on port `5432` (by default).\n\n\u003cbr\u003e\n\n### Other Scripts\n\n```\ndb-migrate up\n```\n\nRun **migration**\n\n```\nnpm run up\n```\n\nMigrate *dev* and *test* database\n\n```\nnpm run down\n```\n\nMigrate down *dev* and *test* database\n\n```\nnpm run watch\n```\n\nRun **tsc-watch**\n\n```\nnpm run test\n```\nRun **Jasmine**\n\n```\nnpm run lint\n```\n\nRun **ESLint**\n\n\n## Setup Database Using PSQL\n\nCreate dev database:\n\n`CREATE DATABASE store_dev;`\n\nCreate test database:\n\n`CREATE DATABASE store_test;`\n\nCreate a user:\n\n`CREATE USER this_user WITH PASSWORD 'password123';`\n\nGrant access on dev database:\n\n`GRANT ALL PRIVILEGES ON DATABASE store_dev TO this_user;`\n\nGrant access on test database:\n\n`GRANT ALL PRIVILEGES ON DATABASE store_test TO this_user;`\n\n\n## .env file example\n\n```\nPOSTGRES_HOST=127.0.0.1\nPOSTGRES_DEV_DB=store_dev\nPOSTGRES_TEST_DB=store_test\nPOSTGRES_USER=this_user\nPOSTGRES_PASSWORD=password123\nENV=dev\nBCRYPT_PASSWORD=secret-password\nSLAT_ROUNDS=10\nTOKEN_SECRET=secrettoken\n```\n\n\n## Database ER-Diagram and Schema\n\n\u003cimg src=\"db-erdiagram.png\"\u003e\n\u003cimg src=\"db-schema.png\"\u003e\n\n\n## Built With\n\n* [![Node][node.shield]][node-url]\n* [![TypeScript][ts.shield]][ts-url]\n* [![PostgreSQL][pgsql.shield]][pgsql-url]\n* [![Jasmine][jasmine.shield]][jasmine-url]\n* [![Express][express.shield]][express-url]\n* [![JWT][jwt.shield]][jwt-url]\n* [![DB-Migrate][dbmig.shield]][dbmig-url]\n* [![dotenv][dotenv.shield]][dotenv-url]\n\n\n## Resources\n\n- Select most repeated value in a column : https://stackoverflow.com/a/12235631/\n\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eBack to Top\u003c/a\u003e)\u003c/p\u003e\n\n\n[node.shield]: https://img.shields.io/badge/Node-43853D?style=for-the-badge\u0026logo=node.js\u0026logoColor=white\n[node-url]: https://nodejs.org/\n\n[ts.shield]: https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge\u0026logo=typescript\u0026logoColor=white\n[ts-url]: https://www.typescriptlang.org/\n\n[jasmine.shield]: https://img.shields.io/badge/Jasmine-8a4182?style=for-the-badge\u0026logo=jasmine\u0026logoColor=white\n[jasmine-url]: https://jasmine.github.io/\n\n[express.shield]: https://img.shields.io/badge/Express-404D59?style=for-the-badge\u0026logo=express\u0026logoColor=white\n[express-url]: https://expressjs.com/\n\n[pgsql.shield]: https://img.shields.io/badge/PostgreSQL-316192?style=for-the-badge\u0026logo=postgresql\u0026logoColor=white\n[pgsql-url]: https://www.postgresql.org/\n\n[jwt.shield]: https://img.shields.io/badge/json%20web%20tokens-323330?style=for-the-badge\u0026logo=json-web-tokens\u0026logoColor=pink\n[jwt-url]: https://jwt.io/\n\n[dbmig.shield]: https://img.shields.io/badge/db--migrate-d4d0cb?style=for-the-badge\n[dbmig-url]: https://db-migrate.readthedocs.io/\n\n[dotenv.shield]: https://img.shields.io/badge/.dotenv-ecd53f?style=for-the-badge\n[dotenv-url]: https://www.dotenv.org/\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuosyph%2Fecommerce-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuosyph%2Fecommerce-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuosyph%2Fecommerce-api/lists"}