Warehouse Module

The Warehouse module provides comprehensive inventory management capabilities including product tracking, stock control, and order management.

Purpose

This module handles:

  • Product and inventory tracking
  • Warehouse order management
  • Unit of measurement handling
  • Stock level monitoring
  • RFID-based product identification

Key Concepts

Position

Product definitions and types:

  • Product metadata - Name, description, pricing
  • Barcode/RFID - Unique identifiers
  • Units - Default unit of measurement
  • Categories - Product classification

Product

Individual inventory items:

  • RFID tracking - Unique identifier per item
  • Position reference - Links to product type
  • Status - Available, Reserved, Sold, etc.
  • Location - Physical warehouse location

Unit

Units of measurement:

  • Standard units - Pieces, kilograms, liters, meters
  • Conversions - Unit conversion factors
  • Symbol - Display symbol (pcs, kg, L, m)

Order

Warehouse operations:

  • Order items - Products requested
  • Status workflow - Draft → Confirmed → Processing → Completed
  • Types - Inbound (receiving) or Outbound (shipping)
  • Counterparty - Client or supplier

Architecture

graph TB
    subgraph "Warehouse Module Architecture"
        A[Controllers] --> B[Services]
        B --> C[Domain Layer]
        C --> D[Repositories]
        D --> E[(Database)]
        
        subgraph "Domain Aggregates"
            C --> F[Product]
            C --> G[Position]
            C --> H[Order]
        end
        
        subgraph "Entities"
            C --> I[Unit]
            C --> J[OrderItem]
        end
        
        subgraph "Value Objects"
            C --> K[RFID]
            C --> L[Barcode]
        end
    end
    
    subgraph "External Dependencies"
        B --> M[Core UploadService]
        B --> N[Finance CounterpartyService]
    end

Data Flow

Inventory Tracking

sequenceDiagram
    participant RFID
    participant Scanner
    participant ProductService
    participant Repository
    participant DB
    
    RFID->>Scanner: Scan tag
    Scanner->>ProductService: Lookup RFID
    ProductService->>Repository: Find by RFID
    Repository->>DB: Query
    DB-->>Repository: Product data
    Repository-->>ProductService: Product entity
    ProductService-->>Scanner: Display info

Order Processing

graph TD
    A[Create Order] -->|Draft| B[Add Items]
    B -->|Confirm| C[Check Stock]
    C -->|Available| D[Reserve Products]
    C -->|Insufficient| E[Backorder]
    D -->|Process| F[Pick & Pack]
    F -->|Complete| G[Ship/Receive]
    G -->|Update| H[Inventory Levels]

Components

Positions

Product catalog management:

  • Create product definitions
  • Set pricing information
  • Assign barcodes
  • Define units of measure
  • Categorize products

Products

Individual item tracking:

  • RFID-based identification
  • Status tracking
  • Location management
  • Movement history
  • Quality control

Units

Measurement management:

  • Define units (pcs, kg, m, L)
  • Set conversion rates
  • Assign display symbols
  • Link to positions

Orders

Warehouse operations:

  • Inbound orders - Receiving from suppliers
  • Outbound orders - Shipping to clients
  • Internal transfers - Warehouse movements
  • Status tracking - Full workflow visibility

Inventory

Stock level monitoring:

  • Real-time quantity tracking
  • Low stock alerts
  • Inventory valuation
  • Movement reporting

API Reference

GraphQL Schema

The Warehouse module exposes GraphQL endpoints:

EntityQueriesMutations
Positionposition, positionscreatePosition, updatePosition
Productproduct, productscreateProduct, updateProduct
Orderorder, orderscreateOrder, updateOrder
Unitunit, unitscreateUnit, updateUnit
Inventoryinventory-

See API Reference for detailed schema documentation.

REST Endpoints

EndpointMethodPurpose
/warehouse/positionsGETList positions
/warehouse/positionsPOSTCreate position
/warehouse/productsGETList products
/warehouse/productsPOSTCreate product
/warehouse/ordersGETList orders
/warehouse/ordersPOSTCreate order
/warehouse/unitsGETList units

Permissions

Available Permissions

PermissionDescription
Position.Read, Position.Create, Position.Update, Position.DeleteProduct catalog (positions)
Product.Read, Product.Create, Product.Update, Product.DeleteProducts
Order.Read, Order.Create, Order.Update, Order.DeleteOrders
Unit.Read, Unit.Create, Unit.Update, Unit.DeleteUnits
Inventory.Read, Inventory.Create, Inventory.Update, Inventory.DeleteInventory

Integration with Other Modules

Core Module

Uses Core services:

  • UploadService - Product images
  • UserService - Track operators

Finance Module

Integration points:

  • Inventory valuation
  • Cost of goods sold
  • Asset tracking

CRM Module

Integration points:

  • Client orders
  • Counterparty linking
  • Delivery tracking

Events

Published domain events:

EventDescription
ProductCreatedNew product added
ProductMovedProduct location changed
OrderCreatedNew order placed
OrderStatusChangedOrder progressed
StockLevelChangedInventory quantity updated
PositionCreatedNew product type defined

RFID Integration

Scanning Workflow

graph LR
    A[RFID Tag] -->|Scan| B[Reader Device]
    B -->|ID| C[API Lookup]
    C -->|Query| D[Product Database]
    D -->|Data| E[Display Info]

Use Cases

  • Quick check-in/check-out - No manual entry
  • Inventory counts - Rapid stocktaking
  • Location tracking - Know where items are
  • Theft prevention - Track item movement

Best Practices

  1. Consistent labeling - Use standardized barcodes/RFID
  2. Regular counts - Physical inventory verification
  3. Status accuracy - Keep product statuses current
  4. Order workflow - Follow status transitions
  5. Location discipline - Products in correct locations
  6. Unit consistency - Standardize measurements

Next Steps

Last updated on