{"id":13574801,"url":"https://github.com/mrmodise/nodejs-ecommerce-store","last_synced_at":"2025-04-03T02:11:41.635Z","repository":{"id":10077188,"uuid":"64397353","full_name":"mrmodise/nodejs-ecommerce-store","owner":"mrmodise","description":"An ecommerce store built in NodeJS","archived":false,"fork":false,"pushed_at":"2023-02-28T12:24:20.000Z","size":1781,"stargazers_count":160,"open_issues_count":2,"forks_count":78,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-24T08:14:10.480Z","etag":null,"topics":["elasticsearch","express-js","express-middleware","mongodb","node-mongodb","nodejs"],"latest_commit_sha":null,"homepage":null,"language":"CSS","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/mrmodise.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}},"created_at":"2016-07-28T13:20:55.000Z","updated_at":"2024-07-08T04:26:20.000Z","dependencies_parsed_at":"2024-01-16T21:37:35.393Z","dependency_job_id":null,"html_url":"https://github.com/mrmodise/nodejs-ecommerce-store","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrmodise%2Fnodejs-ecommerce-store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrmodise%2Fnodejs-ecommerce-store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrmodise%2Fnodejs-ecommerce-store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrmodise%2Fnodejs-ecommerce-store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrmodise","download_url":"https://codeload.github.com/mrmodise/nodejs-ecommerce-store/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246922247,"owners_count":20855345,"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":["elasticsearch","express-js","express-middleware","mongodb","node-mongodb","nodejs"],"created_at":"2024-08-01T15:00:54.806Z","updated_at":"2025-04-03T02:11:41.612Z","avatar_url":"https://github.com/mrmodise.png","language":"CSS","funding_links":[],"categories":["CSS"],"sub_categories":[],"readme":"## Nodejs Ecommerce Store\n\nAn amazon clone ecommerce store built in NodeJS utilizing Express, Stripe Payment, MongoDB, Elastic Search, Faker API just to mention a few. Developed with the latest cutting edge industry standard technologies, eTswana stores allows a shopper to browse through the online store and buy products using a credit card. eTswana stores supports social sign up and sign in using Facebook.\n\n### Live Demo\n\nView the live demo as hosted on Heroku at\nhttps://etswana.herokuapp.com/\n(application may take few seconds to open)\n\n### Requirements\n\n```\n1. Internet connection\n2. NodeJS (https://nodejs.org/)\n3. VS Code (optional: I use WebStorm)\n4. MongoDB (you can use www.mlab.com or Docker alternative)\n5. Elastic Search (https://www.elastic.co/ or Docker alternative):\n    Download version 1.7.5 others are not compatable\n6. Stripe account\n```\n\n### Instructions\n\nOpen the project in VS Code, and navigate to config folder. Open the config.js in the editor:\n\nAdd mongodb URL:\n\n```\n database: '\u003cmongo_db_url\u003e' e.g. mongodb://localhost:27017/test\n```\n\nProvide a secret key:\n\n```\nsecretKey: \"\u003cadd_secret_key\u003e\" - e.g. LKSJ\u0026%$#XFE\n```\n\nUsing Facebook developer site, create a Facebook app and retrieve the following:\n\n```\nclientID: process.env.FACEBOOK_ID || '\u003cfacebook_id\u003e'\n\nclientSecret: process.env.FACEBOOK_SECRET || '\u003cfacebook_secret_key\u003e'\n```\n\nCreate an account with Stripe Payment (https://stripe.com/)\n\n```\nOpen routes/main.js to add the 'sk_test_SAF...'\nnumber retrieved from Stripe.com\n```\n\n## Running the application\n\nNow that we are set. Open project in terminal, and:\n\n```\nnpm install (this will install all dependencies)\n```\n\nOnce all dependencies are installed\n\n```\nnpm start\n```\n\naggg!! Project does not run\n\n```\n* Make sure Elasticsearch is running (version 1.7.5).\n* If using MongoDB locally, make sure it is running as well.\n```\n\nalternatively if you have Docker and Docker compose installed then simply docker-compose up. This will install and run MongoD and ElasticSearch.\n\n## Testing\n\nAdd testing data to the application by loading API data from Faker API. To do this,\nopen `http://localhost:3000/api/\u003cname-of-category-added\u003e`. Do this for all categories. I will automate this functionality with Cypress UI automation tool.\n\n`started on automating this`\n\nTo run automated UI tests, run `npm run test`\n\nThe tests are written using the Cypress framework (https://www.cypress.io)\n\n`For Stripe payment testing please use the recommended cards on this: https://stripe.com/docs/testing`\n\n## Docker \u0026 Kubernetes\n\nTo create a Docker container for the application, `docker build -t etswana:1.0.0 .`. Create the Docker image with `docker run etswana:1.0.0`\n\nWIP: add more instructions on setting up Docker and Kubernetes including monitoring.\n\n## Whats Next\n\n1. ~~REFACTOR! Clean code comments~~\n2. ~~REFACTOR! Improved code readability~~\n3. More functionality to the ecommerce\n4. Write a detailed tutorial - probably use a package to generate one\n   from the code comments\n\n### License\n\n```\nThe MIT License (MIT)\n\nCopyright (c) 2016 Mr Modise\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrmodise%2Fnodejs-ecommerce-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrmodise%2Fnodejs-ecommerce-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrmodise%2Fnodejs-ecommerce-store/lists"}