{"id":15688195,"url":"https://github.com/cdrani/zora","last_synced_at":"2025-09-15T14:20:20.478Z","repository":{"id":67712857,"uuid":"566428931","full_name":"cdrani/zora","owner":"cdrani","description":"express app connected to zora api \u0026 nextjs app to display data retrieved from express api","archived":false,"fork":false,"pushed_at":"2022-11-15T18:06:07.000Z","size":87,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-02-05T13:47:43.978Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cdrani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-15T16:49:27.000Z","updated_at":"2022-11-15T16:50:29.000Z","dependencies_parsed_at":"2023-07-15T11:17:25.978Z","dependency_job_id":null,"html_url":"https://github.com/cdrani/zora","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdrani%2Fzora","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdrani%2Fzora/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdrani%2Fzora/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdrani%2Fzora/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdrani","download_url":"https://codeload.github.com/cdrani/zora/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246314114,"owners_count":20757457,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T17:56:11.767Z","updated_at":"2025-03-30T11:45:23.127Z","avatar_url":"https://github.com/cdrani.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zora\n\u003e [express](https://expressjs.com) app connected to [zora](https://docs.zora.co/docs/zora-api/intro) api \u0026amp; [nextjs](https://nextjs.org) \napp to display data retrieved from express api\n\n![image](https://user-images.githubusercontent.com/18746599/201979188-9fae8701-b74d-40f9-bf86-415be34b44a2.png)\n\n## Usage\n### Installation\nInstall the dependencies for the **api** \u0026\u0026 **app** via `yarn` (preferable) or `npm`:\n```sh\ncd api \u0026\u0026 yarn \u0026\u0026 cd ..\n\ncd app \u0026\u0026 yarn \u0026\u0026 cd ..\n```\n\n### Dev\nStart the servers for both **api** and **app** to run at the same time\n#### API\n```sh\ncd api\ncp .env.example .env\nyarn start\n```\nThis will start a server on `http://localhost:3001`. The **PORT** and other env variables can be be configured in the **.env** file. \n\n#### App\n```sh\ncd app\nyarn dev\n```\n\n## Architecture\n\n#### Express App\nSimple express app with 2 routes:\n1. **/** is simply for a test and displays a message as such\n2. **/api/nft/:address** is the one used to send the following query to the Zora api based on the provided **address**:\n\n```ts\nconst query = `\n    query($ownerAddresses: [String!]) {\n        tokens(networks: [{ network: ETHEREUM, chain: MAINNET }],\n        where: { ownerAddresses: $ownerAddresses }) {\n            nodes {\n                token {\n                    tokenId\n                    metadata\n                }\n            }\n        }\n    }\n`\n```\n\nThe shape of the successResponse \u0026 failResponse is defined in the [methods](/api/helpers/methods.js) file.\nAdditionally, logs are captured within the [logs](/api/logs/) folder.\n\n#### Nextjs App\nThis is a Nextjs generated typescript SPA with a single page :sweat_smile:.\n\n### Directories of Interest\n\n**[components](/app/components/)**: distinct piecemeal ui\n\n**[commands](/app/commands/)**: Executes user actions. For example, the SearchCommand is executed on user form submission (SearchBar).\n\n**[services](/app/services/)**: Currently limited to just data fetching functions.\n\n**[api](/app/api/)**: Defines interfaces for APIResponse and handling of responses.  \n\n**[stores](/app/stores/)**: Notably the ZoraStore is used to request data from the api route with the given address if cache is invalid, \notherwise it retrieves cached data from localStorage\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdrani%2Fzora","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdrani%2Fzora","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdrani%2Fzora/lists"}