{"id":20427464,"url":"https://github.com/mtwn105/shopable","last_synced_at":"2025-12-30T20:06:42.981Z","repository":{"id":58169670,"uuid":"526955658","full_name":"mtwn105/Shopable","owner":"mtwn105","description":"A Platform to create an online store for your business. Powered by Redis Stack!","archived":false,"fork":false,"pushed_at":"2022-08-29T21:51:26.000Z","size":584,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-29T01:38:54.061Z","etag":null,"topics":["angular","express","gcs","javascript","nginx","nodejs","northflank","redis","redis-om","redis-server","redis-stack"],"latest_commit_sha":null,"homepage":"https://shoppable.amitwani.dev","language":"TypeScript","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/mtwn105.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}},"created_at":"2022-08-20T14:50:37.000Z","updated_at":"2022-08-29T21:08:03.000Z","dependencies_parsed_at":"2022-09-23T03:11:08.148Z","dependency_job_id":null,"html_url":"https://github.com/mtwn105/Shopable","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mtwn105/Shopable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtwn105%2FShopable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtwn105%2FShopable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtwn105%2FShopable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtwn105%2FShopable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mtwn105","download_url":"https://codeload.github.com/mtwn105/Shopable/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtwn105%2FShopable/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263400483,"owners_count":23460905,"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":["angular","express","gcs","javascript","nginx","nodejs","northflank","redis","redis-om","redis-server","redis-stack"],"created_at":"2024-11-15T07:20:32.480Z","updated_at":"2025-12-30T20:06:42.962Z","avatar_url":"https://github.com/mtwn105.png","language":"TypeScript","readme":"# Shoppable - E-commerce for Everyone\n\nA Platform to create an online store for your business. \nPowered by Redis Stack!\n\n![image](https://user-images.githubusercontent.com/12975481/187288703-1ff8c94f-75d7-4547-b86d-f01959a9511f.png)\n\n## Powered By\n\n**Redis Stack** (RedisJSON, RedisSearch, Redis Streams)\n**NodeJS**\n**Angular**\n\n## Demo Video\nCheckout video [here](https://youtu.be/sxY6KHoRkn8)\n\n## How it works\n\n### Process flow\n\n- Merchant can register on the platform and create a store\n- He can add the items to inventory\n- A customer can visit that merchant store\n- Customer can purchase items listed by merchant\n- Merchant will receive the order and will fulfill it\n- Customer will receive notifications regarding the order\n\n### Technical Overview\n\n- There are 6 microservices (merchant, inventory, customer, order, update, file-upload)\n- All servers are based on **NodeJS**\n- The client is based on **Angular** and **Angular Material**\n- An nginx is used to route request to various microservices as a reverse proxy\n- Redis Stack is integrated with the help of **[Redis OM](https://github.com/redis/redis-om-node)** and **[Node Redis](https://github.com/redis/node-redis)** NodeJS libraries\n- Redis Stack is hosted on Redis Cloud itself\n- **RedisJSON**, **RedisSearch** and **Redis Streams** has been used\n- **RedisJSON** is used to store JSON documents for various schema such as Merchant, Customer, Product, Order, etc.\n- **RedisSearch** is used alongside RedisJSON to search through different repositories\n- **Redis Streams** is used for publishing and listening to order updates and send email using **Mailjet** to the customer regarding the update\n- Apart from this, **Google Cloud Storage** is also used to store images of the products uploaded by the merchant\n\n### Architecture Diagram\n\n![shoppable_architecture](https://user-images.githubusercontent.com/12975481/187291224-8f99a51d-ca8b-4f3c-b312-b051ebcf636c.png)\n\n### How the data is stored:\n\nThere are many schemas involved in different microservices and each having their own fields\n\nHere's an example of a **Order** schema:\n```javascript\nconst orderSchema = new Schema(Order, {\n  merchantId: { type: \"string\" },\n  customerId: { type: \"string\" },\n  status: { type: \"string\" },\n  price: { type: \"number\" },\n  name: { type: \"string\" },\n  phoneNumber: { type: \"number\" },\n  email: { type: \"string\" },\n  address: { type: \"string\" },\n  state: { type: \"string\" },\n  country: { type: \"string\" },\n  createdDate: { type: \"date\", sortable: true },\n  modifiedDate: { type: \"date\" },\n});\n```\n\nHere's the save command:\n\n```javascript\n// Create Order\nlet order = {\n  merchantId,\n  customerId,\n  status: \"PLACED\",\n  price: totalPrice,\n  name,\n  phoneNumber,\n  email,\n  address,\n  state,\n  country,\n  createdDate: new Date(),\n  modifiedDate: new Date(),\n};\n\norder = await orderRepository.createAndSave(order);\n```\n\nHere's a look at RedisInsight:\n\n![image](https://user-images.githubusercontent.com/12975481/187294325-96845300-3795-4c1c-8368-d260adea74c2.png)\n\n### How the data is accessed:\n\nThere are many different types of data access operations happened in the process flow.\n\nHere's an example of fetching orders for a customer on a store:\n```javascript\n const orders = await orderRepository\n      .search()\n      .where(\"customerId\")\n      .equals(customerId)\n      .sortBy(\"createdDate\", \"DESC\")\n      .return.all();\n```\n\nFor listening to Redis Stream this command is used:\n\n```sh\nXRANGE orders-update - +\n```\n\n## How to run it locally?\n\n- Install dependencies in both `backend` and `client` using `npm install`\n- Create `.env` file and fill necessary variable values\n- Run all the microservices in `backend` folder by `npm run start`\n- Run angular client in `client` folder by running `ng s`\n\n### Prerequisites\n\n- Node\n- Redis Stack\n- Google Cloud Storage\n- Mailjet API\n\n## Deployment\n\nThe project is deployed on **Northflank** - [Visit Here](https://shoppable.amitwani.dev)\n\n![image](https://user-images.githubusercontent.com/12975481/187292974-b755f9da-2b9a-4212-a035-a90b55f218fa.png)\n\n## More Information about Redis Stack\n\nHere some resources to help you quickly get started using Redis Stack. If you still have questions, feel free to ask them in the [Redis Discord](https://discord.gg/redis) or on [Twitter](https://twitter.com/redisinc).\n\n### Getting Started\n\n1. Sign up for a [free Redis Cloud account using this link](https://redis.info/try-free-dev-to) and use the [Redis Stack database in the cloud](https://developer.redis.com/create/rediscloud).\n1. Based on the language/framework you want to use, you will find the following client libraries:\n    - [Redis OM .NET (C#)](https://github.com/redis/redis-om-dotnet)\n        - Watch this [getting started video](https://www.youtube.com/watch?v=ZHPXKrJCYNA)\n        - Follow this [getting started guide](https://redis.io/docs/stack/get-started/tutorials/stack-dotnet/)\n    - [Redis OM Node (JS)](https://github.com/redis/redis-om-node)\n        - Watch this [getting started video](https://www.youtube.com/watch?v=KUfufrwpBkM)\n        - Follow this [getting started guide](https://redis.io/docs/stack/get-started/tutorials/stack-node/)\n    - [Redis OM Python](https://github.com/redis/redis-om-python)\n        - Watch this [getting started video](https://www.youtube.com/watch?v=PPT1FElAS84)\n        - Follow this [getting started guide](https://redis.io/docs/stack/get-started/tutorials/stack-python/)\n    - [Redis OM Spring (Java)](https://github.com/redis/redis-om-spring)\n        - Watch this [getting started video](https://www.youtube.com/watch?v=YhQX8pHy3hk)\n        - Follow this [getting started guide](https://redis.io/docs/stack/get-started/tutorials/stack-spring/)\n\nThe above videos and guides should be enough to get you started in your desired language/framework. From there you can expand and develop your app. Use the resources below to help guide you further:\n\n1. [Developer Hub](https://redis.info/devhub) - The main developer page for Redis, where you can find information on building using Redis with sample projects, guides, and tutorials.\n1. [Redis Stack getting started page](https://redis.io/docs/stack/) - Lists all the Redis Stack features. From there you can find relevant docs and tutorials for all the capabilities of Redis Stack.\n1. [Redis Rediscover](https://redis.com/rediscover/) - Provides use-cases for Redis as well as real-world examples and educational material\n1. [RedisInsight - Desktop GUI tool](https://redis.info/redisinsight) - Use this to connect to Redis to visually see the data. It also has a CLI inside it that lets you send Redis CLI commands. It also has a profiler so you can see commands that are run on your Redis instance in real-time\n1. Youtube Videos\n    - [Official Redis Youtube channel](https://redis.info/youtube)\n    - [Redis Stack videos](https://www.youtube.com/watch?v=LaiQFZ5bXaM\u0026list=PL83Wfqi-zYZFIQyTMUU6X7rPW2kVV-Ppb) - Help you get started modeling data, using Redis OM, and exploring Redis Stack\n    - [Redis Stack Real-Time Stock App](https://www.youtube.com/watch?v=mUNFvyrsl8Q) from Ahmad Bazzi\n    - [Build a Fullstack Next.js app](https://www.youtube.com/watch?v=DOIWQddRD5M) with Fireship.io\n    - [Microservices with Redis Course](https://www.youtube.com/watch?v=Cy9fAvsXGZA) by Scalable Scripts on freeCodeCamp\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtwn105%2Fshopable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmtwn105%2Fshopable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtwn105%2Fshopable/lists"}