REPOSITORY OVERVIEWLive repository statistics
★ 1Stars
⑂ 0Forks
◯ 0Open issues
◉ 1Watchers
49/100
OPENREPOHUB HEALTH SIGNALMixed signals
A transparent discovery signal based on current public GitHub metadata.
Recent activity35% weight
72 Community adoption25% weight
0 Maintenance state20% weight
100 License clarity10% weight
0 Project information10% weight
35 This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
README preview
Microservice with FastAPI
A small example microservices project using FastAPI, Redis OM and a simple React frontend.
This repository contains two FastAPI microservices and a React frontend used to manage a simple inventory and payments flow:
inventory — product storage and management (uses Redis OM)
payment — creates orders and publishes events for inventory updates
inventory-frontend — React app that interacts with the services
Architecture overview
- The
payment service calls the inventory service to fetch product details before creating an order.
- When an order completes the
payment service publishes an order_completed stream entry to Redis.
- The
inventory consumer (inventory/consumer.py) listens to order_completed and decrements product quantities.
- If something goes wrong the
inventory consumer writes to a refund_order stream which the payment consumer listens to and marks orders as refunded.
Services and endpoints
Running locally
Prerequisites:
- Python 3.8+ (venv recommended)
- Node.js + npm (for the frontend)
- A Redis instance accessible to the services. The example code currently uses a hosted Redis instance with credentials in
main.py; for production or local testing update the connection settings appropriately.
Backend (Python services)
- Create a virtual environment and install dependencies for each service. From repository root:
python -m venv .venv
.venv\Scripts\activate # Windows
pip install -r inventory/requirements.txt
pip install -r payment/requirements.txt
- Start the services in separate terminals:
# Inventory service
uvicorn inventory.main:app --reload --port 8000
# Payment service
uvicorn payment.main:app --reload --port 8001
- Start the background consumers (separate terminals):
python inventory/consumer.py
python payment/consumer.py
Notes about Redis
- The code currently creates a
redis connection inline in inventory/main.py and payment/main.py. For safer local development, either run a local Redis server and update the connection parameters, or refactor to use environment variables (recommended).
Frontend
- Install and start the React frontend:
cd inventory-frontend
npm install
npm start
The frontend is configured to call http://localhost:8000 and http://localhost:8001 by default; ensure the backend services are running on those ports or update the frontend accordingly.
Development tips
- Port mapping: inventory -> 8000, payment -> 8001, frontend -> 3000
- Run consumers to process Redis streams and keep state consistent.
- Consider moving the Redis connection settings to environment variables or a config file before sharing or deploying this repo.
Files of interest
License
This example is provided as-is for learning purposes.
ALGORITHMICALLY RELATEDSimilar Open-Source Projects
Selected from shared topics, language and repository description—not editorial ratings.
Instagram Clone React Native Tutorial 2021 👨💻 I'll show you how you can do this in the simplest way and terms possible. By the end of this series you'll have learned how the big companies do it and will be able to do the same, you not only will be able to do this app, but you'll be able to put what you learn into your very own projects! In this series, we use React Native with Expo to quickly deploy the project. We use firebase for all our microservice needs like the auth system, database, storage, amongst others. firebase, redux, react native, javascript, expo. In this series, we'll use all of them and you'll learn them by doing an iconic app. Welcome to this Simcoder project and make an Instagram Clone!
85/100 healthRecently updatedActive repository
JavaScriptApache-2.0#app#expo#firebase#instagram
⑂ 347 forks◯ 42 issuesUpdated today
TIKTOK Clone React Native Tutorial 2021 👨💻 I'll show you how you can do this in the simplest way and terms possible. By the end of this series you'll have learned how the big companies do it and will be able to do the same, you not only will be able to do this app, but you'll be able to put what you learn into your very own projects! In this series, we use React Native with Expo to quickly deploy the project. We use firebase for all our microservice needs like the auth system, database, storage, amongst others. firebase, redux, react native, javascript, expo. In this series, we'll use all of them and you'll learn them by doing an iconic app. Welcome to this Simcoder project and make a TikTok Clone!