Open kBashar opened 6 months ago
At the start of the application we check for existence of the default public holiday files existence in local storage. If found we do nothing. If not found we fetch it from remote location URL. We add the version of the file in version settings.
We only consider Bangladesh for public holiday, we will consider other countries.
Idea
Holidays.json file will not change much, maybe once or twice in a year. and if there is any mistake in the file then might change, which is rare.
Another thing. my present calculator only works for Bangladesh as the holidays are for Bangladesh only. But I will add support for other countries too. So, then, there will be other files like holidays_usa.json.
Again, this files won't change much.
To avoid fetching files everytime the extension is used, I will use some kind of versioning.
lets say, I will maintain a version file named versions.json
local version will store the version number and every once in while will check if the version has changed, if changed, it will fetch the corresponding holiday file.
We might use AWS S3 with cloudfront