How rahul-02825/stocksyncservices works
StockSyncServices is a three-service inventory platform: users register and authenticate, managers create warehouses, suppliers create profiles and products, and managers approve supplier capacity requests. Supplier stock changes are published asynchronously and upserted into approved warehouses; managers can then retrieve synced stock. The README documents the cross-service event flow; sampled controllers and services confirm the main calls and stock handling. User-event linkage implementation and database wiring are not fully shown, so those relationships rely on README documentation.
Main entry points: warehouse.controller.ts Warehouse API and event handler · warehouse.service.ts Warehouse workflow and stock sync · suppliers.service.ts Supplier profiles and products · auth.controller.ts Auth API
Components 16
Identity service
- Auth API
user-service/src/auth/auth.controller.ts - Authentication
user-service/src/auth/auth.service.ts - User model
user-service/src/auth/schemas.ts/user.schema.ts - User database
- User event handler
user-service/src/users/users.controller.ts - User profile updates
user-service/src/users/users.service.ts
Supplier service
- Supplier API
supplier-service/src/suppliers/suppliers.controller.ts - Supplier profiles and products
supplier-service/src/suppliers/suppliers.service.ts - Supplier and product models
supplier-service/src/suppliers/entities - Supplier database
Warehouse service
- Warehouse API and event handler
warehouse-service/src/warehouse/warehouse.controller.ts - Warehouse workflow and stock sync
warehouse-service/src/warehouse/warehouse.service.ts - Warehouse and stock models
warehouse-service/src/warehouse/entities - Warehouse database
Event integration
- RabbitMQ
Other components
- Client
Connections 23
- Client → Auth API: HTTP requests
README.md - Client → Supplier API: HTTP requests
README.md - Client → Warehouse API and event handler: HTTP requests
README.md - Auth API → Authentication: calls
user-service/src/auth/auth.controller.ts - Authentication → User model: uses schema
user-service/src/auth/auth.service.ts - Authentication → User database: reads and writes
user-service/src/auth/auth.service.ts - Auth API → Client: returns JWT
README.md - Supplier API → Supplier profiles and products: calls
supplier-service/src/suppliers/suppliers.controller.ts - Supplier profiles and products → Supplier and product models: uses models
supplier-service/src/suppliers/suppliers.service.ts - Supplier profiles and products → Supplier database: reads and writes
supplier-service/src/suppliers/suppliers.service.ts - Supplier profiles and products → RabbitMQ: publishes events
supplier-service/src/suppliers/suppliers.service.ts - RabbitMQ → User event handler: delivers profile event
README.md - User event handler → User profile updates: calls handlers
user-service/src/users/users.controller.ts - User profile updates → User database: updates user
README.md - Supplier API → Client: returns profile and products
supplier-service/src/suppliers/suppliers.controller.ts - Warehouse API and event handler → Warehouse workflow and stock sync: calls
warehouse-service/src/warehouse/warehouse.controller.ts - Warehouse workflow and stock sync → Warehouse and stock models: uses models
warehouse-service/src/warehouse/warehouse.service.ts - Warehouse workflow and stock sync → Warehouse database: reads and writes
warehouse-service/src/warehouse/warehouse.service.ts - Warehouse workflow and stock sync → RabbitMQ: publishes event
warehouse-service/src/warehouse/warehouse.service.ts - RabbitMQ → User event handler: delivers warehouse event
README.md - RabbitMQ → Warehouse API and event handler: delivers stock event
README.md - Warehouse API and event handler → Warehouse workflow and stock sync: dispatches stock event
warehouse-service/src/warehouse/warehouse.controller.ts - Warehouse API and event handler → Client: returns synced stock
warehouse-service/src/warehouse/warehouse.controller.ts