Esteros is a microservices demo application. Esteros consists of 4 microservices applications and a front-end. This app is a web-based online ice cream shop where users can search for the ice cream they like, add it to their cart, and purchase it.
This app was created to demonstrate the use of Redis and Minio in modern microservices based web development.
Click here for more screenshots.
Esteros is composed of 4 microservices written in TypeScript (Node.js) that talk to each other over Redis Pub/Sub.
Service | Language | Description |
---|---|---|
front-end | Svelte (TypeScript) | Exposes an HTTP server to serve the website. Does not require signup/login and generates cookie-based session IDs for all users automatically. |
api-gateway | Node.js (TypeScript) | Connecting all back-end microservices into one REST API. |
product-service | Node.js (TypeScript) | Provides the list of products from a RedisJSON and ability to search products and get individual products. |
cart-service | Node.js (TypeScript) | Add the product to the Redis Cache for a user with a specific session ID, then make it available for that user. |
order-service | Node.js (TypeScript) | Create an order from an existing cart with a mocked data. |
To run this app in local environment, you can use below method.
- Git - Latest stable version is recommended.
- Node.js - v16 or higher
- pnpm - v7.8.0 or higher
- Docker Compose (or Podman Compose) - v1 or higher
I personally use Podman Compose to manage all the Containers, but you should also be able to use Docker Compose as they both have similar APIs.
-
Using the terminal of your choice, please move to the directory you want to run this application.
cd <your-dicrectory>
-
Clone this repository, and move to the cloned folder.
git clone -b main --depth 1 --single-branch https://github.com/hapakaien/esteros.git && cd esteros
-
Run all necessary containers with Docker Compose.
docker-compose up -d
-
Create a bucket named "local" in Minio by visiting http://localhost:8900, and make it public access.
-
Upload all initial data to Redis and Minio.
pnpm run setup
-
Install all dependencies in this monorepo.
pnpm install
-
Build all code.
pnpm build
-
Run the application that you built earlier.
pnpm start:prod
-
Now you can visit http://localhost:8080 to try this app.
Here 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 or on Twitter.
- Sign up for a free Redis Cloud account using this link and use the Redis Stack database in the cloud.
- Based on the language/framework you want to use, you will find the following client libraries:
- Redis OM .NET (C#)
- Watch this getting started video
- Follow this getting started guide
- Redis OM Node (JS)
- Watch this getting started video
- Follow this getting started guide
- Redis OM Python
- Watch this getting started video
- Follow this getting started guide
- Redis OM Spring (Java)
- Watch this getting started video
- Follow this getting started guide
- Redis OM .NET (C#)
The 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:
- Developer Hub - The main developer page for Redis, where you can find information on building using Redis with sample projects, guides, and tutorials.
- Redis Stack getting started page - Lists all the Redis Stack features. From there you can find relevant docs and tutorials for all the capabilities of Redis Stack.
- Redis Rediscover - Provides use-cases for Redis as well as real-world examples and educational material
- RedisInsight - Desktop GUI tool - 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
- Youtube Videos
- Official Redis Youtube channel
- Redis Stack videos - Help you get started modeling data, using Redis OM, and exploring Redis Stack
- Redis Stack Real-Time Stock App from Ahmad Bazzi
- Build a Fullstack Next.js app with Fireship.io
- Microservices with Redis Course by Scalable Scripts on freeCodeCamp