How to build a JavaScript-based inventory management system?