Design fulfillment truck routing and inventory system
Company: Axon
Role: Software Engineer
Category: System Design
Difficulty: medium
Interview Round: Technical Screen
## Scenario
You are designing software for a large e-commerce **fulfillment center** to plan **truck routes** and manage **containers/inventory movement** within and across facilities.
The system must support:
- Inbound trucks delivering pallets/containers to a fulfillment center.
- Outbound trucks picking up containers for delivery to other facilities or last-mile hubs.
- Containers (e.g., totes/pallets) that hold inventory items and move between **dock doors**, **staging areas**, and **storage locations**.
## Functional Requirements (FR)
1. **Create and manage shipments**: inbound/outbound loads with a list of containers and planned arrival/departure windows.
2. **Assign trucks to dock doors** and time slots; detect and resolve conflicts.
3. **Route planning**:
- Given a set of stops (facilities/docks) and time windows, produce a feasible route/sequence.
- Support re-planning when conditions change (delays, cancellations).
4. **Track container state** end-to-end:
- Container location (facility + zone), status (created, staged, loaded, in-transit, received), and contents summary.
5. **Inventory correctness**:
- Prevent double-allocation of a container/inventory.
- Reconcile when scans disagree or events arrive late/out of order.
6. **APIs/UI**: dispatchers can view routes, door schedule, and container statuses; operators can scan containers.
## Non-Functional Requirements (NFR)
- High availability for operational workflows (door assignment, scan updates).
- Low-latency updates for scan events (near real-time).
- Auditability: full history of container movements and changes.
- Multi-warehouse support; permissions/access control.
## Constraints / Assumptions (you can state reasonable ones)
- Many scan events per minute; multiple facilities.
- Network partitions can happen; scan devices may buffer events.
## Deliverables
Design:
- High-level architecture (services, data stores, messaging).
- Core data model (key entities and relationships).
- Key APIs/events.
- Consistency strategy (idempotency, ordering, deduplication).
- Routing/optimization approach (exact vs heuristic) and what you optimize for.
- Observability and failure handling.
Quick Answer: This question evaluates system design skills with emphasis on distributed systems, real-time logistics, route optimization, inventory and container state tracking, API design, and consistency strategies for high-availability operational workflows.