openspending-archive / satellite-template

Create dedicated Where Does My Money Go style websites quickly and easily
6 stars 15 forks source link

Config data isolation to support multitenancy #5

Open takoratta opened 11 years ago

takoratta commented 11 years ago

_config.yml, img/functions/confog.js and img/functions/cofog_dailybread.js store site specific data (* though there seems a bug reported as https://github.com/openspending/satellite-template/issues/4).

However, you still need to fork Github repository to change at least these three files to support other local governments. Considering the maintenance, there could be better way to support multiple local governments. Otherwise, once some sources are updated, every site which forked the repository needs to update them as well.

A feature request I'm proposing is to store all necessary site specific data in one (or a few) files with proper naming and switch the data based on user's request.

For example, when you as a user visit the site, let's say http://spending.jp/yokohama, spending.jp site which is the main host of WDMMG in Japan detects that you want to see Yokohama's data by seeing the URL and load Yokohama data.

There might be several ways to make it but one option is:

Again, this is just an idea but what we need is multitenancy with separate config files.

trickvi commented 11 years ago

This is great idea. Something similar has been done for cameroon.openspending.org. Would something like that work?

takoratta commented 11 years ago

Thanks, I took a rough look at http://cameroon.openspending.org/ and found it useful. I think having a unique link to each regional page is good if we share it on social medias.

anderspeders commented 11 years ago

Hi @takoratta, Do you have any update on this? If you need help let the rest of the team at OKF Japan or us know :-)