arsenalamerica / source

Arsenal America branch apps
<url>
1 stars 0 forks source link

Move branch data from package to API #79

Open brianespinosa opened 1 month ago

brianespinosa commented 1 month ago

Currently all branch data is being consumed via a monorepo package. This requires a new build and deployment of the apps themselves if there are changes to branch data. This also means future contributors would need to navigate through the entire monorepo to manage data, instead of just making their way through a single repo with branch data.

Additionally, a more simple repository could be set up with tooling that would help branch managers update data on their own potentially. Yes, it might be easier to consider moving all of this content to some sort of CMS UI, but using the existing Vercel infra and API routes to make this happen is easier for now, uses the same account... so there is no overhead increase, and for now it is easier for one person to maintain.

brianespinosa commented 2 weeks ago

It might be better to have this data be in a separate repository, but not be an API. The reason here is that we have SVG images in this data. And some of the approach being taken for these branch logos requires us to render SVG images inline to the page. There are security risks for us to allow an API call to get SVG data to render to the page. It may be best for this data to stay in GitHub as code but maybe become a separate package that makes it easy to manage separately if other branches end up needing to update things later on. It would be easier giving collaborator access to data (and to specific branches) than to the whole app source repo.