i am trying to code a website that keeps track of a variable that changes value on everyones computer i have tried local storage but it did it just localy and i don't know what to do.
This would mainly be left to the backend and the database management system. The frontend should render the stock value it receives from your api. If someone purchases the goods or the shop owner adds goods, the value should be updated by the backend into the database which will send the correct data to your frontend in the next render