{"id":21064529,"url":"https://github.com/tawfik-s/storefront_backend","last_synced_at":"2026-04-11T01:04:35.698Z","repository":{"id":122989266,"uuid":"532311395","full_name":"tawfik-s/storefront_backend","owner":"tawfik-s","description":"backend API ","archived":false,"fork":false,"pushed_at":"2022-09-10T06:07:20.000Z","size":439,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-19T17:58:59.614Z","etag":null,"topics":["bcrypt","eslint","express","jasmine","javascript","jwt-authentication","postgresql","prettier","sql","supertest","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/tawfik-s.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":"2022-09-03T16:16:23.000Z","updated_at":"2022-09-09T16:59:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"72c5dffd-aea2-4fd3-9428-9567ea538418","html_url":"https://github.com/tawfik-s/storefront_backend","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tawfik-s%2Fstorefront_backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tawfik-s%2Fstorefront_backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tawfik-s%2Fstorefront_backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tawfik-s%2Fstorefront_backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tawfik-s","download_url":"https://codeload.github.com/tawfik-s/storefront_backend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234856240,"owners_count":18897402,"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","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":["bcrypt","eslint","express","jasmine","javascript","jwt-authentication","postgresql","prettier","sql","supertest","typescript"],"created_at":"2024-11-19T17:49:53.598Z","updated_at":"2025-10-11T08:39:53.452Z","avatar_url":"https://github.com/tawfik-s.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# store front backend\n\nthis is an API for backend application with the requirements in the requirements document\n\nthe API is full covered by integration and unit testing\n\n## Setup Steps\n\nTo get started:\n\n1-clone the repo on the machine\n\n2-install all dependencies by running command\n\n```bash\nnpm  install\n```\n\n3-create a `.env` file with all the required environment variables:\n\n```bash\nPOSTGRES_HOST=\"localhost\"\nPOSTGRES_DB=\"store_backend\"\nPOSTGRES_TEST_DB=\"store_backend_test\"\nPOSTGRES_USER=\"postgres\"\nPOSTGRES_PASSWORD=\"admin\"\nENV=\"test\"\nBCRYPT_PASSWORD=\"speak-friend-and-enter\"\nSALT_ROUNDS=\"10\"\nPORT=4000\nACCESS_TOKEN_SECRET=\"noobs123\"\n\n```\n\n4-Now, check if Postgres has the database `database_dev`, if not create it:\n\n```bash\n\n# Postgres shell\ncreate database  store_backend;\ncreate database  store_backend_test;\n\n```\n\n5-run npm test to test and build the project all tests must success\n\n6-chenge the value of env in .env to be test when you testing and dev when you run the API\n\n\n7-database is run on localhost port 5432 the project is running on port 4000 to change this please modify the env variables\n\n#### Runing the program locally in development mode\n\n`npm run start`\n\n-and then head to your browser at `localhost:3000` and it should be working.\n\n#### Test the app\n\n```bash\n    npm run test\n\n```\n\n##### before you test the app\n\n```bash\n\ndb-migrate reset --env test\n\n```\n\nto reset the test data base\n\n#### Runing the program locally in production mode\n\n`npm run build`\n\n`node dist/index.js`\n\n#### Code formating\n\nI'm using prettier\n\n`npm run prettier`\nI'm using eslint\n\n`npm run lint`\n\n### scripts\n\n- `npm run test` to test the project\n- `npm run build` convert typescript to javascript in dist folder\n- `npm run run` build and run the project\n- `npm lint` run eslint\n- `npm run prettier`\n\n## Built With\n\n- [NodeJS](https://nodejs.org/) - The JavaScript runtime\n- [npm](https://npm.com/) - The dependency manager\n- [db-migrate](https://db-migrate.readthedocs.io/en/latest/) - The database migration tool\n- [Express](https://expressjs.com) - The web framework\n- [TypeScript](https://www.typescriptlang.org/) - Types JS extension\n- [Jasmine](https://jasmine.github.io/) - The unit testing framework\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftawfik-s%2Fstorefront_backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftawfik-s%2Fstorefront_backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftawfik-s%2Fstorefront_backend/lists"}