{"id":28481610,"url":"https://github.com/insightsoftwareconsortium/cmake-w3-externaldata-upload","last_synced_at":"2025-08-30T12:38:38.422Z","repository":{"id":62969458,"uuid":"564103647","full_name":"InsightSoftwareConsortium/cmake-w3-externaldata-upload","owner":"InsightSoftwareConsortium","description":"CMake Web3 ExternalData Upload UI","archived":false,"fork":false,"pushed_at":"2025-05-13T19:40:49.000Z","size":362,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-08-28T06:52:57.674Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://content-link-upload.netlify.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/InsightSoftwareConsortium.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2022-11-10T01:56:12.000Z","updated_at":"2025-05-13T19:45:13.000Z","dependencies_parsed_at":"2024-01-21T19:29:50.433Z","dependency_job_id":"0c5a8c0c-8680-4345-abcf-1b307398e6c7","html_url":"https://github.com/InsightSoftwareConsortium/cmake-w3-externaldata-upload","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/InsightSoftwareConsortium/cmake-w3-externaldata-upload","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InsightSoftwareConsortium%2Fcmake-w3-externaldata-upload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InsightSoftwareConsortium%2Fcmake-w3-externaldata-upload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InsightSoftwareConsortium%2Fcmake-w3-externaldata-upload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InsightSoftwareConsortium%2Fcmake-w3-externaldata-upload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InsightSoftwareConsortium","download_url":"https://codeload.github.com/InsightSoftwareConsortium/cmake-w3-externaldata-upload/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InsightSoftwareConsortium%2Fcmake-w3-externaldata-upload/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272852281,"owners_count":25004053,"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","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-06-07T20:07:48.956Z","updated_at":"2025-08-30T12:38:38.417Z","avatar_url":"https://github.com/InsightSoftwareConsortium.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cmake-w3-externaldata-upload\n\n[![screenshot](./screenshot.png)](https://content-link-upload.netlify.app)\n\n[CMake Web3 ExternalData Upload UI](https://content-link-upload.netlify.app)\n\nBased on [the web3.storage browser client](https://web3.storage/docs/reference/js-client-library/#store-files) and [w3ui](https://github.com/web3-storage/w3ui).\n\n## About\n\nSince every local [Git](https://git-scm.com/) repository contains a copy\nof the entire project history, it is important to avoid adding large\nbinary files directly to the repository. Large binary files added and\nremoved throughout a project\\'s history will cause the repository to\nbecome bloated, take up too much disk space, require excessive time and\nbandwidth to download, etc.\n\nA [solution to this\nproblem](https://blog.kitware.com/cmake-externaldata-using-large-files-with-distributed-version-control/)\nwhich has been adopted by this project, is to store binary files such as\nimages in a separate location outside the Git repository. Then, download\nthe files at build time with [CMake](https://cmake.org/).\n\nA \\\"content link\\\" file contains an identifying [Content Identifier\n(CID)](https://proto.school/anatomy-of-a-cid). The content link is\nstored in the [Git](https://git-scm.com/) repository at the path where\nthe file would exist, but with a \\\".cid\\\" extension appended to the file\nname. CMake will find these content link files at *build* time, download\nthem from a list of HTTP server resources, and create symlinks or copies of\nthe original files at the corresponding location in the *build tree*.\n\nThe [Content Identifier (CID)](https://proto.school/anatomy-of-a-cid) is\nself-describing hash following the [multiformats\n](https://multiformats.io/) standard created by the Interplanetary\nFilesystem ([IPFS](https://ipfs.io/)) community. A file with a CID for\nits filename is content verifable. Locating files according to their CID\nmakes content-addressed, as opposed to location-addressed, data exchange\npossible. This practice is the foundation of the decentralized web, also\nknown as the dWeb or Web3. By adopting Web3, we gain:\n\n-   Permissionless data uploads\n-   Robust, redundant storage\n-   Local and peer-to-peer storage\n-   Scalability\n-   Sustainability\n\nContributors to upload their data through an easy-to-use,\npermissionless, free service, [web3.storage](https://web3.storage/).\n\nData used in the Git repository is periodically tracked in a\ndedicated [Datalad\nrepository](https://datalad.org)\nand stored across redundant locations so it can be retrieved from any of\nthe following:\n\n-   Local [IPFS](https://ipfs.io/) nodes\n-   Peer [IPFS](https://ipfs.io/) nodes\n-   [web3.storage](https://web3.storage/)\n-   [pinata.cloud](https://pinata.cloud)\n\n*Note: This currently requires an extended version of the ExternalData.cmake module developed in the [CMakeIPFSExternalData repository](https://github.com/InsightSoftwareConsortium/CMakeIPFSExternalData). This has not been integrated into upstream CMake due to the availability of C++ CID verification code to complete the feature set in a\nportable way.* \n\n## Development\n\n### Clone, install dependencies:\n\n```sh\ngit clone https://github.com/InsightSoftwareConsortium/cmake-w3-externaldata-upload\ncd cmake-w3-externaldata-upload\n```\n\nInstall [pixi](https://pixi.sh/) if not already installed:\n\n```sh\ncurl -fsSL https://pixi.sh/install.sh | sh\n```\n\nStart with an empty database:\n\n```sh\ncp data.duckdb.empty data.duckdb\n```\n\n### Populate .env\n\nPopulate a *.env* file in the repository with environmental variables used by application services in the format `\u003cVAR\u003e=\u003cVALUE\u003e`.\n\n#### web3.storage\n\nPopulate `DID`, `KEY`, and `PROOF` as [described in the web3.storage documentation on creation of delegations](https://web3.storage/docs/how-to/upload/#bring-your-own-delegations).\n\n### mailjet\n\nFor monitor emails, set the [MailJet](https://mailjet.com) keys `MJ_APIKEY_PUBLIC`, `MJ_APIKEY_PRIVATE`. Also `SENDER_EMAIL` and `RECIPIENT_EMAIL`. Note that DNS records should be set for the sender and the sender configured in MailJet.\n\n### Run the dev server\n\n```sh\npixi run start\n```\n\nThis starts, a [hypha server](https://ha.amun.ai/#/), a hypha Python service, and the client side build, and serves them locally.\n\nVisit [http://localhost:9000/app/index.html](http://localhost:9000/app/index.html) to view the application.\n\n### Production service\n\nThe production server currently runs on a cloud VM with\n\n```sh\npixi run start-hypha-service\n```\n\nRunning under [supervisord](https://supervisord.org/).\n\nThe content-link-upload.itk.org is served on\nhttps://content-link-upload.netlify.app and built via `pnpm run build`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsightsoftwareconsortium%2Fcmake-w3-externaldata-upload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finsightsoftwareconsortium%2Fcmake-w3-externaldata-upload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsightsoftwareconsortium%2Fcmake-w3-externaldata-upload/lists"}