Back-end code for the inventory app.