How oiasm-system/cnpm507 works
OISM is a multichannel inventory and sales management system. Its principal workflow accepts tenant-scoped order requests, validates products and stock, reserves inventory, and records order and ledger changes; orders can later be confirmed or cancelled. The repository also contains inventory management and history APIs, an admin frontend, and backend utilities for data generation and concurrency runs. AI-assisted replenishment is a documented capability, but no implementation path for it appears in the supplied tree. Some infrastructure and frontend wiring is unsampled, so uncertain links are omitted or marked dashed.
Main entry points: OrderService.cs Order workflow · Repositories Repository adapters · src/index.ts Data generator · src/index.ts Concurrency runner
Components 24
API and application
- Orders API
backend/src/OISM.WebAPI/Controllers/OrdersController.cs - Inventory API
backend/src/OISM.WebAPI/Controllers/InventoryController.cs - Ledger API
backend/src/OISM.WebAPI/Controllers/InventoryLedgerController.cs - Order workflow
backend/src/OISM.Application/Services/OrderService.cs - Inventory workflow
backend/src/OISM.Application/Services/InventoryService.cs - Ledger history
backend/src/OISM.Application/Services/InventoryLedgerService.cs - Order contracts
backend/src/OISM.Application/DTOs/Orders/CreateOrderRequest.cs - Inventory contracts
backend/src/OISM.Application/DTOs/Inventory/AdjustInventoryRequest.cs - AI replenishment
Inventory and orders
- Order model
backend/src/OISM.Domain/Entities/Order.cs - Order items
backend/src/OISM.Domain/Entities/OrderItem.cs - Stock rules
backend/src/OISM.Domain/Entities/Inventory.cs - Movement records
backend/src/OISM.Domain/Entities/InventoryLedger.cs - Movement types
backend/src/OISM.Domain/Enums/InventoryMovementType.cs
Persistence
- Repository adapters
backend/src/OISM.Infrastructure/Repositories - Application database
backend/src/OISM.Infrastructure/Persistence/OismDbContext.cs
Admin frontend
- Admin dashboard
frontend/apps/admin-dashboard/src/app/App.tsx - API client
frontend/packages/api-client/src/order-api.ts
Backend utilities
- Shared CLI
backend/oism-backend-tools/shared/cli.ts - Tool configuration
backend/oism-backend-tools/shared/config.ts - Tool HTTP client
backend/oism-backend-tools/shared/http-client.ts - Data generator
backend/oism-backend-tools/data-generator/src/index.ts - Concurrency runner
backend/oism-backend-tools/concurrency-runner/src/index.ts
Other components
- User or operator
Connections 22
- User or operator → Orders API: submits orders
backend/src/OISM.WebAPI/Controllers/OrdersController.cs - Orders API → Order workflow: calls
backend/src/OISM.WebAPI/Controllers/OrdersController.cs - Inventory API → Inventory workflow: calls
backend/src/OISM.WebAPI/Controllers/InventoryController.cs - Ledger API → Ledger history: calls
backend/src/OISM.WebAPI/Controllers/InventoryLedgerController.cs - Order workflow → Repository adapters: reads and writes
backend/src/OISM.Application/Services/OrderService.cs - Order workflow → Stock rules: reserves stock
backend/src/OISM.Application/Services/OrderService.cs - Order workflow → Order model: creates and changes
backend/src/OISM.Application/Services/OrderService.cs - Order workflow → Order items: creates items
backend/src/OISM.Application/Services/OrderService.cs - Order workflow → Movement records: records movements
backend/src/OISM.Application/Services/OrderService.cs - Stock rules → Movement records: records adjustments
- Inventory workflow → Repository adapters: uses repositories
- Ledger history → Repository adapters: uses repositories
- Repository adapters → Application database: persists data
- Admin dashboard → API client: uses
- API client → Orders API: sends requests
README.md - User or operator → Admin dashboard: operates
README.md - Data generator → Shared CLI: uses
backend/oism-backend-tools/data-generator/src/index.ts - Data generator → Tool configuration: uses
backend/oism-backend-tools/data-generator/src/index.ts - Data generator → Tool HTTP client: sends requests
backend/oism-backend-tools/data-generator/src/index.ts - Concurrency runner → Shared CLI: uses
backend/oism-backend-tools/concurrency-runner/src/index.ts - Concurrency runner → Tool configuration: uses
backend/oism-backend-tools/concurrency-runner/src/index.ts - Concurrency runner → Tool HTTP client: sends requests
backend/oism-backend-tools/concurrency-runner/src/index.ts