Stock reading management system that indecate nearest expiration date of products. Along with sync mechanism to keep all connector update to date with latest changes.
Use the package manager pip to install foobar.
pip install -r requirements
- Filter with (product__id, expired_at)
/api/doc/
{
"stock_expiration": "host/api/public/stock_expiration/",
"stock_readings": "host/api/public/stock_readings/",
"products": "host/api/public/products/"
}
(wss/ws)://host/ws/stock/{user_id}
- By connecting to socket you will recieve all updates in realtime.
- If user is offline, all updates are saved to be synced later. There are 4 socket type
- Stock => automatic communication to recieve up to date changes.
- Sync_from => if user miss or want to check if something missing
- Sync_to => if user have made some changes locally
- Synced => to confirm sync
{
"type":"sync.to", "stock_dict": {"id": 1, "server_id":2, "product_id": "567890", "expired_at": "2020-09-19"},
"action_at": "2020-09-18",
"action": "UPDATE"
}
{
"type":"sync.to", "stock_dict": {"product_id": "567890", "expired_at": "2020-09-19"},
"action_at": "2020-09-18",
"action": "CREATE"
}
{
"type":"sync.to", "stock_dict": {"id": 1, "server_id":2, "product_id": "567890", "expired_at": "2020-09-19"},
"action_at": "2020-09-18",
"action": "DELETE"
}
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.