NEARBuilders / gateway

Gateway designed to support builders in a multi-chain ecosystem.
https://nearbuilders.org
The Unlicense
6 stars 8 forks source link

Separate project data from project metadata #418

Open elliotBraem opened 4 months ago

elliotBraem commented 4 months ago

Currently, we duplicate the project metadata inside the stringified value, and in the metadata itself.

{
  "devs.near": {
    "project": {
      "build-gateway": {
        "": "{\"title\":\"Build Gateway\",\"description\":\"Building the site\",\"profileImage\":\"\",\"backgroundImage\":\"\",\"tags\":{\"community\":\"\",\"open-source\":\"\",\"dao\":\"\"},\"linktree\":{\"twitter\":\"NearBuilders\",\"github\":\"nearbuilders/gateway\",\"telegram\":\"builddao\",\"website\":\"https://www.nearbuilders.org\"},\"contributors\":[\"devs.near\"],\"tabs\":[\"overview\",\"tasks\",\"activity\"],\"projectAccountId\":\"builddao.near\",\"teamSize\":\"\",\"location\":\"\"}",
        "metadata": {
          "name": "Build Gateway",
          "description": "Building the site",
          "image": "",
          "backgroundImage": "",
          "tags": {
            "community": "",
            "open-source": "",
            "dao": ""
          },
          "linktree": {
            "twitter": "https://twitter.com/NearBuilders",
            "github": "https://github.com/nearbuilders/gateway",
            "telegram": "https://t.me/builddao",
            "website": "https://www.nearbuilders.org"
          }
        }
      }
    },
    "builddao.near": {
      "project": {
        "devs.near_project_build-gateway": ""
      }
    }
  }
}

We should no longer duplicate this data and reference the respective origins. Project cards, quickview, and profile will need to be updated to reflect this

Megha-Dev-19 commented 4 months ago

@elliotBraem so we want to have to only inside metadata? and not inside stringified value, or the other way around?

elliotBraem commented 4 months ago

I think metadata fields should only be inside metadata

Social.get([ ${accountId}/project/${projectId}, ${accountId}/project/${projectId}/metadata/** ]);

While project specific data like contributors should be in the project itself

Although I think this is a ticket to implement after tests have been completed for project card, project quickview, and project page