{"id":20246650,"url":"https://github.com/civicdatalab/opub-2","last_synced_at":"2026-06-20T21:31:43.804Z","repository":{"id":98522843,"uuid":"528326701","full_name":"CivicDataLab/opub-2","owner":"CivicDataLab","description":null,"archived":false,"fork":false,"pushed_at":"2022-08-25T11:07:28.000Z","size":250,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-01-26T21:37:19.662Z","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":"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":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-08-24T08:10:04.000Z","updated_at":"2022-08-24T08:11:43.000Z","dependencies_parsed_at":"2023-04-18T11:55:57.093Z","dependency_job_id":null,"html_url":"https://github.com/CivicDataLab/opub-2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CivicDataLab/opub-2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CivicDataLab%2Fopub-2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CivicDataLab%2Fopub-2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CivicDataLab%2Fopub-2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CivicDataLab%2Fopub-2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CivicDataLab","download_url":"https://codeload.github.com/CivicDataLab/opub-2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CivicDataLab%2Fopub-2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34586666,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"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":"2024-11-14T09:31:40.916Z","updated_at":"2026-06-20T21:31:43.788Z","avatar_url":"https://github.com/CivicDataLab.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eOPub\u003c/h1\u003e\n\u003cp align=\"center\"\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- 🚀 StitchesJs: 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\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 [Stitchesjs](https://github.com/stitchesjs/stitches) to handle all of the stylings. It provides lots of features to improve the developer experience.\n\nTo make the styling scalable, we use a `stitches.config.ts` file in the root directory. It contains all the colors and gradients, etc 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[Official documentation](https://nextjs.org/docs/basic-features/pages)\n\nDirectory is available at `/src/pages` and by default contains these pages:\n\n- Home `/index.tsx`\n- Datasets `/datasets`\n- Datasets Explorer `/datasets/[explorer]`\n\n### Directory Structure\n\nOPub uses `/src` to store code instead of root directory. [Official documentation](https://nextjs.org/docs/advanced-features/src-directory).\n\nIt is done to keep the root level clean and make the repo more scalable. [Check out src README](/src/README.md) to learn more about the structure.\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-2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcivicdatalab%2Fopub-2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcivicdatalab%2Fopub-2/lists"}