Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 1.13 KB

Description.md

File metadata and controls

35 lines (26 loc) · 1.13 KB

Inventory API (Stockroom)

Background

Stockroom is a private, MongoDB-backed inventory API. Successful creates disappear, updates return stale data, and users can access other accounts' items.

Task

Persist items to the real database and return what was actually stored. Authenticate every request, validate its input, and scope all reads, updates, and deletes to the owner. Updates must check and increment the version atomically, so concurrent edits on one version succeed exactly once. Enforce unique SKUs per owner, and map storage errors to the correct status codes.

What This Problem Tests

  • MongoDB persistence and CRUD
  • Authorization and ownership checks
  • Optimistic locking and atomic updates
  • Uniqueness constraints and concurrency
  • Input validation and error mapping
  • HTTP REST APIs and status codes

Topics

  • Debugging
  • Database
  • Authorization
  • Optimistic Locking
  • Concurrency
  • Input Validation
  • REST API
  • CRUD