How geniuurievich/sneaker_store works
This repository implements a microservice commerce backend: users authenticate, browse products, manage a cart, and create and inspect orders. The clearest documented transaction path is order creation: the order service resolves the user, reads the cart, checks product availability, records order data, updates stock, and removes cart items. Separate catalog, cart, and user capabilities remain visible. Several messaging listeners and cross-service RPC implementations were not excerpted, so those relationships are omitted or marked unverified rather than inferred from filenames.
Main entry points: Order_service.py Order workflow · api Auth and user API · product_router.py Product API · CartService.py Cart operations
Components 18
Identity
- Auth and user API
users_service/app/api - Authentication
users_service/app/services/AuthService.py - User and token data
users_service/app/repositories - User messaging
users_service/app/messaging
Catalog
- Product API
products_service/app/api/product_router.py - Product management
products_service/app/services/ProductService.py - Catalog and sizes
products_service/app/repositories - Product messaging
products_service/app/messaging
Cart
- Cart API
cart_service/app/api/cart_router.py - Cart operations
cart_service/app/services/CartService.py - Cart data
cart_service/app/repositories/CartRepositories.py - Cart listener
cart_service/app/message/listen.py
Orders
- Order API
orders_service/app/api/order.py - Order workflow
orders_service/app/services/Order_service.py - Order data
orders_service/app/Repositories/OrderRepositories.py
Other components
- Shopper
- Administrator
- Message broker
Connections 26
- Shopper → Auth and user API: authenticates
- Auth and user API → Authentication: routes auth
users_service/app/api/auth.py - Authentication → User and token data: reads and writes
users_service/app/services/AuthService.py - Authentication → User messaging: publishes registration
users_service/app/services/AuthService.py - User messaging → Message broker: publishes events
- Shopper → Product API: browses catalog
- Administrator → Product API: manages catalog
- Product API → Product management: routes product actions
products_service/app/api/product_router.py - Product management → Catalog and sizes: queries catalog
products_service/app/services/ProductService.py - Product management → Auth and user API: checks role
products_service/app/services/ProductService.py - Product messaging → Message broker: listens for events
- Shopper → Cart API: manages cart
- Cart API → Cart operations: routes cart actions
cart_service/app/api/cart_router.py - Cart operations → Cart data: reads and writes
cart_service/app/services/CartService.py - Cart operations → Product API: fetches product
cart_service/app/services/CartService.py - Cart operations → Auth and user API: resolves user
cart_service/app/services/CartService.py - Cart listener → Cart data: updates cart
cart_service/app/message/listen.py - Cart listener → Message broker: listens for events
- Shopper → Order API: places and views orders
- Order API → Order workflow: routes order actions
- Order workflow → Auth and user API: resolves token
orders_service/app/services/Order_service.py - Order workflow → Cart API: fetches and clears cart
orders_service/app/services/Order_service.py - Order workflow → Product API: checks and updates stock
orders_service/app/services/Order_service.py - Order workflow → Order data: creates and queries orders
orders_service/app/services/Order_service.py - Order workflow → Product messaging: requests order updates
orders_service/app/services/Order_service.py - Order workflow → Message broker: coordinates events