{"id":23413165,"url":"https://github.com/datopian/datapub","last_synced_at":"2025-07-21T16:32:57.622Z","repository":{"id":51191361,"uuid":"284952425","full_name":"datopian/datapub","owner":"datopian","description":"📝 React-based framework for building data publishing workflows (esp for CKAN)","archived":false,"fork":false,"pushed_at":"2025-04-01T16:11:56.000Z","size":8893,"stargazers_count":21,"open_issues_count":6,"forks_count":4,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-07-05T01:44:21.102Z","etag":null,"topics":["ckan","data","datahub","reactjs"],"latest_commit_sha":null,"homepage":"https://tech.datopian.com/publish/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datopian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2020-08-04T10:53:38.000Z","updated_at":"2023-05-20T20:13:28.000Z","dependencies_parsed_at":"2025-04-12T05:11:30.417Z","dependency_job_id":"2137f3b1-d812-4bda-ab06-82577c66afd8","html_url":"https://github.com/datopian/datapub","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/datopian/datapub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datopian%2Fdatapub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datopian%2Fdatapub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datopian%2Fdatapub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datopian%2Fdatapub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datopian","download_url":"https://codeload.github.com/datopian/datapub/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datopian%2Fdatapub/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266334501,"owners_count":23912988,"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-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["ckan","data","datahub","reactjs"],"created_at":"2024-12-22T19:25:47.693Z","updated_at":"2025-07-21T16:32:57.598Z","avatar_url":"https://github.com/datopian.png","language":"JavaScript","readme":"\u003cdiv align=\"center\"\u003e\n\n# Datapub\n\n[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/datopian/datapub/issues)\n![build](https://github.com/datopian/datapub/workflows/datapub%20actions/badge.svg)\n[![The MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](http://opensource.org/licenses/MIT)\n\nDataPub is a React-based framework for rapidly building modern data publishing flows (esp for CKAN). It provides a variety of core components as well as example apps and flows.\n\n\u003c/div\u003e\n\n## Background\n\nThis is a brief summary from https://tech.datopian.com/publish/ -- read that for more detail.\n\n### What do we mean by data publishing?\n\nThe process of publishing data files and datasets (collections of files).\n\nSpecifically, the process of getting your data files stored and described in a data portal or other platform. Usually it involves steps like:\n\n* Uploading or linking the files into the platform\n* Describing thoese files with high level metadata e.g. the name and description of the dataset or files, their license etc\n* Specific metadata about the data e.g. its structure, what fields there are and their types (e.g. integer, string)\n\n### Why DataPub?\n\nAt Datopian we have been building data publishing flows for nearly 15 years both in tools like CKAN and OpenSpending and in custom applications. Our experience has taught us two things:\n\n* Data Publishing flows almost always have some custom aspect. Whether it is a small tweak like adding a specific metadata field or a complex change like add data validation.\n* There are many common components e.g. file upload and common patterns to many overall flows e.g. add a file, add metadata, save!\n\nThis indicates the need for a **framework** -- rather than a single one-size-fits-all application.\n\n### The DataPub approach\n\n* **🏗️ React-based**: individual data publishing flows will be React apps that you can boot with standard tools like `create-react-app` and where you can use the full ecosystem of React tooling and components\n* **📦 Core components**: provide a suite of tried and tested core components common to many publishing flows such as file upload, table schema editor etc\n* **🚂 [Template apps](./examples/)**: provide examples of full-scale apps which developers building new flows can use for inspiration and instruction e.g. copy and paste an example and then modify it\n\n## Components\n\nComponents include:\n\n* [File Upload](https://datopian.github.io/datapub/iframe.html?id=components-upload--idle)\n* [File Input](https://datopian.github.io/datapub/iframe.html?id=components-input-file--drag-and-drop)\n* [File Input Url](https://datopian.github.io/datapub/iframe.html?id=components-input-url--default)\n* [Table Schema](https://datopian.github.io/datapub/iframe.html?id=components-tableschema--idle)\n* [Metadata](https://datopian.github.io/datapub/iframe.html?id=components-metadata--idle)\n* ProgressBar\n* Switcher\n\n\nTo see all the available components visit our Storybook:\n\nhttps://datopian.github.io/datapub\n\n## Example Apps\n\nSee the [`examples`][ex] directory.\n\nFor other full scale apps using DataPub in the wild see:\n\n* https://github.com/datopian/datapub-nhs\n\n[ex]: ./examples/\n\n## Getting started\n\nThere are two ways to get started\n\n* Copy an existing example app from the [`examples`][ex] directory and then modify it\n* Add DataPub components into either an existing React App or into a newly created a React app created from scratch using e.g. `create-react-app`\n\nOf these two options the former is better when experimenting or for small changes. The latter is better if you are building a more complex application or integrating into an existing application.\n\nIn order to add DataPub components into a newly created React application, follow the steps below:\n\n**Step 1:** create a new react application:\n```bash\n    create-react-app datapub-extend\n```\nChange directory into datapub-extend and run the application to ensure it was created successfully:\n```bash\n    cd datapub-extend\n    yarn start\n```\n**Step 2:** Install Datapub \n\n```bash\n   yarn add datapub\n```\n**Step 3:** In the App.js, initialises your app with the Resource editor\n\n```javascript\n...\nexport class ResourceEditor extends React.Component {\n  constructor(props) {\n    super(props);\n    this.state = {\n      datasetId: this.props.config.datasetId,\n      resourceId: \"\",\n      resource: this.props.resource || {},\n     ...\n    };\n  }\n  ...\n\n```\n\n**Step 4:** Also in App.js, import the components you need. For instance in the code below we import Upload and TableSchema component. \n\n```javascript\n...\nimport { Upload, TableSchema } from \"datapub\";\n...\n```\n**Step 5:** In the render section of your resource editor, add the Upload and TableSchema components you just imported. \n\n```javascript\n...\n \u003cdiv className=\"upload-edit-area\"\u003e\n\n    {this.state.resource.schema \u0026\u0026 (\n      \u003cTableSchema\n        schema={this.state.resource.schema}\n        data={this.state.resource.sample || []}\n      /\u003e\n    )}\n\n    {!this.state.isResourceEdit ? (\n      \u003cbutton disabled={!success} className=\"btn\"\u003e\n        Save and Publish\n      \u003c/button\u003e\n    ) : (\n      \u003cdiv className=\"resource-edit-actions\"\u003e\n        \u003cbutton\n          type=\"button\"\n          className=\"btn btn-delete\"\n          onClick={this.deleteResource}\n        \u003e\n          Delete\n        \u003c/button\u003e\n        \u003cbutton className=\"btn\"\u003eUpdate\u003c/button\u003e\n      \u003c/div\u003e\n    )}\n  \u003c/div\u003e\n  ...\n```\n\nSee the full example with code and explanations [here](examples/table-schema)\n\n---\n\n## Developers\n\n### Install\n\nInstall a recent [Node](https://nodejs.org/en/) version.\n\nFirst, clone the repo via git:\n\n```bash\n$ git clone git@github.com:datopian/datapub.git\n```\n\nAnd then install dependencies with npm.\n\n```bash\n$ cd datapub\n$ npm install\n```\n\n### Run\n\nRun the app in the development mode.\n\n```bash\n$ npm run start\n```\n\nThen open [http://localhost:3000/](http://localhost:3000/) to view it in the browser.\n\nThe page will reload if you make edits.\n\n### Storybook\n\nStorybook is a tool that prepares a development environment for UI components. It allows you to develop and design your graphical interfaces quickly, isolated, and independently. Making it possible to define different states for components, thus documenting their states.\n\n**Note**: Every push will run GitHub actions to deploy in GitHub pages. You can check online at https://datopian.github.io/datapub\n\n#### Run storybook\n\n```bash\n$ npm run storybook\n```\n\nor\n\n```bash\n$ yarn storybook\n```\n\n### Run Tests\n\n```bash\n$ npm test\n```\n\nor\n\n```bash\n$ yarn test\n```\n\nTo run tests + coverage\n\n```bash\n$ yarn test:watch\n```\n\n## Contributing\n\nPlease make sure to read the [CONTRIBUTING.md](CONTRIBUTING.md) Guide before making a pull request.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](License) file for details\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatopian%2Fdatapub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatopian%2Fdatapub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatopian%2Fdatapub/lists"}