This is a REACT frontend designed to utilize the latest stable version of DKAN 2.x as a backend.
This application serves as a starter app, or example of how to use the data-catalog-components library to easily create open data catalogs.
1) Follow the DKAN Tools README to stand up the backend. Include the --demo
flag to have the frontend installed and example pages built as well.
If you have a backend already running and just need the frontend:
1) Install the Gatsby CLI npm install -g gatsby-cli
1) Clone this repository in your docroot git clone https://github.com/GetDKAN/data-catalog-frontend.git
1) Install the dependencies with npm:
1) cd data-catalog-frontend
1) npm install
1) Edit the .env.production
file to change the GATSBY_API_URL to reflect your site url
1) Run the server: npm start
or gatsby develop
1) Your site is now running at http://localhost:8000
1) Build the public files npm run build
or gatsby build
You can learn more in the Gatsby.js documentation.
To learn React, check out the React documentation.
This is meant to be a blueprint for your frontend, from which you can make minor color and logo changes or major component or page layout customizations.
├── cypress # Integration tests
├── public # The output of the build process
├── src # This directory will contain all of the source code
| ├── assets # Place to store images and content/config files
| ├── components # Configure your page structure with the layout component
│ ├── pages # Components in this directory become pages automatically with paths based on their file name
│ ├── services # Provides the connections to the backend api
| └── templates # Ideas for how to assemble components to display the data
│ └── theme # Add custom fonts, colors, and css here
├── .env.development # Local environment variables
├── .env.production # Production environment variables
├── gatsby-browser.js # Customizations affecting the browser
├── gatsby-config.js # The main configuration file
├── gatsby-node.js # Customizations affecting the site build process
├── gatsby-ssr.js # Customizations affecting server-side rendering
├── package.json # App dependencies
└── providers.js # Component that wraps the root element
src/assets/config.json
file to change the site title, slogan, logo, and container class.src/theme/styles/_variables.scss
file to change the colors and fonts of your site.src/theme/styles/
to override the default css classes with your new color variables and other changes.src/theme/styles/index.scss
gatsby develop
to preview, then npm run build
to generate the public files.baseUrl
to match your site.Update cypress tests to not use ids or classes as identifying elements. These can change without warning.