How supuzz/amazon-inventory-modelling works
FBA Manager is a browser-based inventory and replenishment simulator. Users configure a simulation, model sales and replenishment batches, then inspect inventory and timing visualizations or generate an AI replenishment plan; simulations can be saved and restored. js/main.js coordinates the UI and updates shared state, while domain modules calculate sales and stock or render views. The supplied excerpts show the Express static server and module interactions, but not index.html, so the browser entry wiring is not represented.
Main entry points: main.js App coordinator · inventory.js Inventory chart · sales.js Sales curves · i18n.js Localization
Components 16
Web delivery
- Static server
server.js - App page
index.html
Simulation workflow
- App coordinator
js/main.js - Sales curves
js/sales.js - AI replenishment
js/ai_replenishment.js - Simulation history
js/history.js
Planning views
- Batch timeline
js/gantt.js - Inventory chart
js/inventory.js - Sales previews
js/sales.js - Plan export view
js/main.js
State and support
- Simulation state
js/state.js - Localization
js/i18n.js - Date and curve helpers
js/utils.js
Other components
- User
- Browser local storage
- Chart.js
Connections 20
- User → Static server: requests page
server.js - Static server → App page: serves
server.js - App coordinator → Simulation state: uses
js/main.js - App coordinator → Sales curves: draws previews
js/main.js - App coordinator → Batch timeline: updates timeline
js/main.js - App coordinator → Inventory chart: updates chart
js/main.js - App coordinator → Simulation history: manages records
js/main.js - App coordinator → Localization: uses translations
js/main.js - App coordinator → AI replenishment: requests plan
js/main.js - App coordinator → Plan export view: renders plan
js/main.js - AI replenishment → Sales curves: gets sales curve
js/ai_replenishment.js - Inventory chart → Sales curves: gets sales curve
js/inventory.js - Inventory chart → Date and curve helpers: formats dates
js/inventory.js - Batch timeline → Date and curve helpers: formats dates
js/gantt.js - Batch timeline → Localization: gets translations
js/gantt.js - Inventory chart → Localization: gets translations
js/inventory.js - Sales curves → Date and curve helpers: uses curve helper
js/sales.js - Simulation history → Browser local storage: reads and writes
js/history.js - Localization → Browser local storage: reads and writes
js/i18n.js - Inventory chart → Chart.js: renders chart
js/inventory.js