I have a set of complex data, which I use on various subdomains of my project. Data are static most of the time, it changes few times per year.

Currently, it's hardcoded in every project which needs it, but I am looking for a way how to make one "source of truth".

Of course, I can build another api.example.com service to provide those data, but I want to ask. Are there any drawbacks of using public repository on GitHub and accessing them via https://raw.githubusercontent.com/.../.../my_data.json? I already saw some project provide (for example geo) data like this.

Data are fully public and of course I will do some kind of caching on consumer side, but am I missing something why this is not a good approach?

1 Answer 1


In general it's not a good idea to use something in a way that falls outside its stated purpose.

If you do you run the risk of changes to the product breaking your system, or your system outgrowing the products provided features.

There are some additional considerations. You add an off site dependency, security etc but this is the main reason for me.

  • Can I counter this with a YAGNI? In the unlikely event that GitHub changes its API, you can then replace it with something else. Feb 24 at 12:55
  • no. YAGNI is just excuse making. You can do a full risk assessment and accept the risk of your app going down randomly for an unknown amount of time until you can develop an alternative, Or getting sued because of some small print on the licence conditions though.
    – Ewan
    Feb 24 at 17:29

Not the answer you're looking for? Browse other questions tagged or ask your own question.