after a bit of writing the logic, it grows to be not good to included directly in the project for reasons!
so It's ended up to published on NPM, perhaps it will help anyone.
DocumentStorage, the name looks weird a bit, but I didn't find a good one.
You can find the documentation in the link
also, you can find my other personal project here