{"id":20246666,"url":"https://github.com/civicdatalab/opub","last_synced_at":"2026-04-05T22:31:34.837Z","repository":{"id":37695299,"uuid":"450424331","full_name":"CivicDataLab/opub","owner":"CivicDataLab","description":"An open-source Data Publishing Platform","archived":false,"fork":false,"pushed_at":"2022-10-11T13:30:19.000Z","size":7039,"stargazers_count":1,"open_issues_count":3,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-12-03T06:26:18.968Z","etag":null,"topics":["nextjs","react","styled-components"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/CivicDataLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-21T09:09:54.000Z","updated_at":"2022-10-27T03:32:46.000Z","dependencies_parsed_at":"2023-01-19T13:02:19.220Z","dependency_job_id":null,"html_url":"https://github.com/CivicDataLab/opub","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CivicDataLab/opub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CivicDataLab%2Fopub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CivicDataLab%2Fopub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CivicDataLab%2Fopub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CivicDataLab%2Fopub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CivicDataLab","download_url":"https://codeload.github.com/CivicDataLab/opub/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CivicDataLab%2Fopub/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31452899,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"ssl_error","status_checked_at":"2026-04-05T21:22:51.943Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["nextjs","react","styled-components"],"created_at":"2024-11-14T09:31:49.913Z","updated_at":"2026-04-05T22:31:34.176Z","avatar_url":"https://github.com/CivicDataLab.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eOPub\u003c/h1\u003e\n\u003c!-- \u003ch2 align=\"center\"\u003ePart of the \u003ca href=\"https://openbudgetsindia.org/\"\u003eOpen Budgets India\u003c/a\u003e Project\u003c/h2\u003e --\u003e\n\u003c!-- \u003cbr/\u003e --\u003e\n\u003cp align=\"center\"\u003e\n\u003c!-- \u003cimg alt=\"\" src=\"https://github.com/CivicDataLab/opub/raw/constituency/public/assets/images/readme.png\"  /\u003e --\u003e\n\u003c!-- \u003cbr/\u003e\n\u003cbr/\u003e --\u003e\n\u003ca href=\"https://github.com/CivicDataLab/opub/blob/main/LICENSE\"\u003e\n\u003cimg alt=\"MIT License\" src=\"https://img.shields.io/apm/l/atomic-design-ui.svg?\"/\u003e\n\u003c/a\u003e\u0026nbsp;\u0026nbsp; \n\u003ca href=\"https://github.com/CivicDataLab/opub/actions/workflows/node.js.yml\"\u003e\n\u003cimg alt=\"MIT License\" src=\"https://github.com/CivicDataLab/opub/actions/workflows/node.js.yml/badge.svg\"/\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003eA platform to speed up the development of open data dashboards.\u003c/p\u003e\n\n- [Features](#features)\n- [Getting Started](#getting-started)\n- [Guide](#guide)\n  - [Styling](#styling)\n  - [Backend](#backend)\n  - [Pages](#pages)\n  - [Directory Structuce](#directory-structuce)\n  - [Data fetching](#data-fetching)\n    - [Pre-fetch data in the server-side](#pre-fetch-data-in-the-server-side)\n  - [ESLint](#eslint)\n- [Developers](#developers)\n  - [Boot the local instance](#boot-the-local-instance)\n  - [Architecture](#architecture)\n- [Contributing](#contributing)\n\n## Features\n\n- ♿ Accessible: The platform is screen-reader friendly and keyboard accessible.\n- 👩‍💻 Developer friendly: built with NextJS, CSS-in-JS, and REST API to make the developer experience a treat.\n- 🚀 Styled-components: CSS-in-JS to get styling on steroids with fantastic developer experience.\n- 📋 Typescript: Developed using typescript to improve development experience by catching errors and providing fixes.\n- 🧱 Extensible: quickly extend and develop/import your own React components\n- 📝 Well documented: complete set of documentation plus the documentation of NextJS and CKAN\n\n## Getting Started\n\n- Install a recent version of Node.\n- After cloning the repo, create an `.env.local` file in the root of directory.\n- If using VSCode, install the recommened extensions.\n\n## Guide\n\n### Styling\n\nThis project uses [styled-components]('https://github.com/styled-components/styled-components') to handle all of the stylings. It provides lots of features to improve the developer experience.\n\nPages and most component styles are available in the same file, although some components have a separate file, e.g.: `ButtonComp.ts.`\n\nTo make the styling scalable, we use a `theme.ts` file in the `/config` directory. It contains all the colors and gradients from the Design System.\n\n### Backend\n\nThe project requires a CKAN URL to fetch datasets. You can save them in the `.env.local` file in the following format. [Read more about env]('https://nextjs.org/docs/basic-features/environment-variables#loading-environment-variables').\n\n\u003e We can also pass a Google Analytics Id in the same file\n\u003e\n\u003e We also need a KEYCLOAK_URL in the env file for authentication to work\n\n```js\nCKAN_URL = 'CKAN_URL/api/3/action';\nNEXT_PUBLIC_GOOGLE_ANALYTICS = '';\nKEYCLOAK_URL = 'http://localhost:8080';\n```\n\n### Pages\n\n- Home `/`\n- Datasets `/datasets`\n- Datasets Explorer `/datasets/[explorer]`\n- Organisations `/orgs`\n- Org Datasets `/orgs/[datasets]`\n- Org Explorer `/orgs/[datasets]/[explorer]`\n- About `/about`\n- Wiki Listing `/wiki`\n- Wikipage `/wiki/[wikiPage]`\n\n### Directory Structure\n\nThe component directory contains all the components required to build the platform. The components are categorized depending on their purpose. You can [read more about components](/components/README.md).\n\nEach directory contains an `index.ts` file to manage Default Exports.\n\n### Data fetching\n\nThe project uses [REST APIs provided by CKAN]('http://docs.ckan.org/en/2.9/api/') to access, filter, sort, and search datasets.\n\nWe can find data fetching functions at `/utils/fetch.ts.` [Read more in utils](/utils/README.md)\n\n#### Pre-fetch data in the server-side\n\nWhen visiting a page, you may want to fetch the data on the server side. To do so, you can use `getServerSideProps` function from NextJS:\n\n```javascript\nimport { GetServerSideProps } from 'next';\nimport { stateSchemeFetch } from 'utils/fetch';\n\n...\n\nexport const getServerSideProps: GetServerSideProps = async (context) =\u003e {\n  export const getServerSideProps: GetServerSideProps = async () =\u003e {\n  const stateData = await stateSchemeFetch();\n\n  return {\n    props: {\n      stateData,\n    },\n  };\n};\n};\n```\n\n### ESLint\n\nThe project uses the ESLint config provided by Next.js, [eslint-config-next]('https://nextjs.org/docs/basic-features/eslint'). We can modify the rules on a project basis in the `.eslintrc.js` file.\n\n## Developers\n\n### Boot the local instance\n\nInstall the dependencies:\n\n```bash\nnpm i\n```\n\nBoot the demo frontend:\n\n```console\nnpm run dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) to see the home page 🎉\n\nYou can start editing the page by modifying `/pages/index.tsx`. The page auto-updates as you edit the file.\n\n### Architecture\n\n- Language: Javascript\n- Framework: [Next.js](https://nextjs.com/)\n- Styling: [styled-components](https://github.com/styled-components/styled-components/)\n\n## Contributing\n\nFor any new feature or bug reports, please request them in [issues](https://github.com/CivicDataLab/opub/issues).\n\nSee [CONTRIBUTING.md](https://github.com/CivicDataLab/opub/blob/main/CONTRIBUTING.md) for ways to get started.\n\nPlease adhere to [Code of Conduct](https://github.com/CivicDataLab/opub/blob/main/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcivicdatalab%2Fopub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcivicdatalab%2Fopub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcivicdatalab%2Fopub/lists"}