{"id":25161101,"url":"https://github.com/alvinmdj/jbl-ecomm-api","last_synced_at":"2026-04-29T23:32:05.144Z","repository":{"id":276450832,"uuid":"928415801","full_name":"alvinmdj/jbl-ecomm-api","owner":"alvinmdj","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-25T04:16:18.000Z","size":180,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T13:21:20.645Z","etag":null,"topics":["fastify","jest","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/alvinmdj.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":"2025-02-06T15:50:46.000Z","updated_at":"2025-03-24T08:36:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"b1840dc5-a2d6-4d84-9188-1cbabeee4c01","html_url":"https://github.com/alvinmdj/jbl-ecomm-api","commit_stats":null,"previous_names":["alvinmdj/jbl-ecomm-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alvinmdj/jbl-ecomm-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvinmdj%2Fjbl-ecomm-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvinmdj%2Fjbl-ecomm-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvinmdj%2Fjbl-ecomm-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvinmdj%2Fjbl-ecomm-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alvinmdj","download_url":"https://codeload.github.com/alvinmdj/jbl-ecomm-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvinmdj%2Fjbl-ecomm-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32448399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"ssl_error","status_checked_at":"2026-04-29T22:10:49.234Z","response_time":110,"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":["fastify","jest","postgresql","typescript"],"created_at":"2025-02-09T02:18:00.951Z","updated_at":"2026-04-29T23:32:05.128Z","avatar_url":"https://github.com/alvinmdj.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ecomm API\n\n## Getting started\n\n- install dependencies\n\n```sh\nnpm install\n```\n\n- create \u0026 fill .env\n\n```sh\n# fill .env with .env.example\ncp .env.example .env\n```\n\n- run postgresql (using docker)\n\n```sh\n# build \u0026 migrate init.sql\ndocker-compose up --build\n\n# run detached mode\ndocker-compose up -d\n\n# verify migration\ndocker exec -it db-postgres psql -U postgres -d jbl_ecomm_db -c \"\\dt\"\n```\n\n- run app (watch)\n\n```sh\nnpm run dev\n\n# server listening on http://localhost:4000\n```\n\n- run tests\n\n```sh\nnpm run test\n```\n\n## Personal notes\n\nInitialize git:\n\n```sh\ngit init\n```\n\nInitialize npm:\n\n```sh\nnpm init -y\n```\n\nInitialize tsconfig:\n\n```sh\nnpx tsc --init\n```\n\nClean up docker (db):\n\n```sh\ndocker-compose down -v\n```\n\nSetup test with jest \u0026 typescript ([jest](https://jestjs.io/docs/getting-started#via-ts-jest), [ts-jest](https://kulshekhar.github.io/ts-jest/docs/getting-started/installation)):\n\n```sh\n# install dependencies\nnpm install --save-dev jest typescript ts-jest @types/jest\n\n# initialize jest config with ts-jest\nnpx ts-jest config:init\n\n# path mapping from tsconfig to jest config\n# https://kulshekhar.github.io/ts-jest/docs/getting-started/paths-mapping\n\n# tsconfig.json (if paths configured like this)\n...\n\"paths\": { \"@/*\": [\"./src/*\"] },\n...\n\n# jest.config.js (add config based on tsconfig paths)\n...\nmoduleNameMapper: {\n  \"^@/(.*)$\": \"\u003crootDir\u003e/src/$1\",\n},\n...\n\n# add jest test script to package.json\n...\n\"scripts\": {\n  \"test\": \"jest --watch\"\n}\n...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvinmdj%2Fjbl-ecomm-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falvinmdj%2Fjbl-ecomm-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvinmdj%2Fjbl-ecomm-api/lists"}