{"id":18981884,"url":"https://github.com/nodeshift/coolstore-nodejs","last_synced_at":"2025-07-08T17:39:51.480Z","repository":{"id":181205925,"uuid":"666098337","full_name":"nodeshift/coolstore-nodejs","owner":"nodeshift","description":"coolstore is a showcase for nodejs based microservices using the broad OpenShift and NodeShift","archived":false,"fork":false,"pushed_at":"2025-04-02T08:04:24.000Z","size":4450,"stargazers_count":0,"open_issues_count":46,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-16T17:27:12.825Z","etag":null,"topics":["nodejs","nodeshift","openshift"],"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/nodeshift.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,"zenodo":null}},"created_at":"2023-07-13T17:52:00.000Z","updated_at":"2024-05-14T15:53:11.000Z","dependencies_parsed_at":"2024-04-14T07:51:42.416Z","dependency_job_id":"b60cf8f0-201f-4be2-89f9-dd80be645f59","html_url":"https://github.com/nodeshift/coolstore-nodejs","commit_stats":null,"previous_names":["sshaaf/coolstore-nodejs","nodeshift/coolstore-nodejs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodeshift%2Fcoolstore-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodeshift%2Fcoolstore-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodeshift%2Fcoolstore-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodeshift%2Fcoolstore-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nodeshift","download_url":"https://codeload.github.com/nodeshift/coolstore-nodejs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249787477,"owners_count":21325571,"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":["nodejs","nodeshift","openshift"],"created_at":"2024-11-08T16:11:35.572Z","updated_at":"2025-04-19T20:01:59.937Z","avatar_url":"https://github.com/nodeshift.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# coolstore\nThis is an example demo showing a retail store consisting of several microservices based on NodeJS.\n\nA Coolstore app where users can buy some cool merchandise.\n\n\n- The UI is built with NodeJS and Angular. And the backend includes multiple Node.js services, such as\n- *Inventory* , The stores inventory, how much items are available etc.\n- *Catalog* , The products API\n- *Cart*, Stores all users carts and intiates the order process by sending a message to Orders\n- *Orders*, Completion and checking of orders\n- *Payments*, Checks whether an payment is successfull given a certain Credit Card.\n\nThe demo is simple. Add an item to the cart. Checkout the item by going to the `Cart` tab. Add payment details. If the Card number starts with 4 the payment is successful else it will show status failed. this is a hard check in the payment service.\n\nOnce done, goto the `Orders` tab. The Order status should be `In Progress`, refresh after a couple of seconds and the status will appear as `COMPLETED` or `FAILED`. It takes a couple of seconds as their is a wait timer in Payment service + the whole process is done in a reactive and event driven way using Kafka and Quarkus.\n\n![Architecture Screenshot](./docs/images/coolstore-ui.png)\n\n## Run Locally\n\nThe whole demo application can be run locally for those using docker/podman.\n\nRun the docker-compose.yml file in the `deploy` directory\n\n```\npodman compose up\n```\n\n## Cluster Setup\n\n* Pre-Req: Have an Openshift cluster and log in using the `oc` client\n\n* Change into the deploy directory\n\n```\ncd deploy\n```\n\n### Create Project/Namespace\n\noc new-project coolstore-dev\n\n### Kafka Related\n\n#### Install Kafka Operator\n\noc apply -f kafka-operator.yaml\n\n\n#### Create instance\n\n#### NEED TO WAIT ON THE OPERATOR READINESS FIRST\n\noc apply -f kafka-cluster-creation.yaml -n coolstore-dev\n\n#### create topics\n\noc apply -f kafka-topics.yaml -n coolstore-dev\n\n### Redis Cache\n\n#### Create Redis Cache\n\noc create -f redis-deployment.yaml -n coolstore-dev\n\n#### Create Service for Deployment\n\noc apply -f redis-service.yaml -n coolstore-dev\n\n\n\n### Mongo DB Service\n\n#### Create Configmap to hold init.js\n\noc create configmap mongo-db-init --from-file ./mongo-init.js -n coolstore-dev\n\n#### Create the MongoDB Instance\n\noc create -f mongo-deployment.yaml -n coolstore-dev\n\n#### Create MongoDB Service\noc apply -f mongo-service.yaml -n coolstore-dev\n\n\n## Node.s Service Deployment\n\nEach Node.js service has a npm script named `deploy` that uses the [Nodeshift cli](https://www.npmjs.com/package/nodeshift) to easily deploy your services to the cluster.\n\nIn each node application directory, run with:\n\n```\nnpm run deploy\n```\n\nThere is also a runnable script in the `deploy` directory that will deploy all the Node.js services in the correct order.\n\n```\ncd deploy/\n\n./deploy-node-services.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodeshift%2Fcoolstore-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodeshift%2Fcoolstore-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodeshift%2Fcoolstore-nodejs/lists"}