jondot / awesome-react-native

Awesome React Native components, news, tools, and learning material!
http://www.awesome-react-native.com
34.29k stars 3.97k forks source link

Github Pages & Dynamic Showcase #1083

Open ylkhayat opened 2 years ago

ylkhayat commented 2 years ago

This is more of a suggestion than an actual issue, I would love if whoever is reading this submits his/her opinion. I believe that this repository is exclusive and rich in content and deserves some sort of automation to keep approved items in the listing updated without official PRs as this introduces some extra hassle 🔥.

🔎 Suggestion

I do not know if this request was proposed before but I believe that we can achieve the same goal of this golden README but through dynamic files and static conventions. Such as JSON files listing corresponding components to be listed within a section of the README.

⚙️ Methodology

As a potential solution for such an automation, I was thinking we can migrate proposed packages to certain metadata files with listing property available in them. ie: metadata/categories/components/ui.json will accordingly show the list of UI elements mentioned in the README. Also including GitHub Pages to this will also properly handle each section on its own and introduce new potential styling and modularity.

Here's how metadata/categories/components/ui.json may look like:

{
  "intro": "Here will be listed all the UI components:",
  "list": [
     "lotties-react-native",
     "https://github.com/lottie-react-native/lottie-react-native" // just to be specific which package
   ]
}

Afterwards, this file can be parsed via a service that fetch the actual package via GitHub API (I know that GitHub API is limiting non authenticated users to approx 5 requests per hour but we can assign a secret to authenticate the network requests). Then after parsing the package we will receive something like the following:

const list = {
  "lottie-react-native": {
    "link": "https://github.com/lottie-react-native/lottie-react-native",
    "stars": 14420,
    "description": "Lottie wrapper for React Native.",
    "tags": [..]
  }
}

I believe that if we could translate this package listing to something dynamic as proposed, this repository will survive scalability issues and be well enough maintainable.

Hopefully this gets some positive or negative constructive feedback. If approved, I will be glad to personally orchestrate the config files and move this project towards the new architecture.

Cheers 🥂