DEPRECATED - please use data-catalog-app
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.
- 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:
- Install the Gatsby CLI
npm install -g gatsby-cli
- Clone this repository in your docroot
git clone https://github.com/GetDKAN/data-catalog-frontend.git
- Install the dependencies with npm:
cd data-catalog-frontend
npm install
- Edit the
.env.production
file to change the GATSBY_API_URL to reflect your site url - Run the server:
npm start
orgatsby develop
- Your site is now running at
http://localhost:8000
- Your site is now running at
- Build the public files
npm run build
orgatsby 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
- Edit the
src/assets/config.json
file to change the site title, slogan, logo, and container class. - Edit the
src/theme/styles/_variables.scss
file to change the colors and fonts of your site. - Add custom .scss files to
src/theme/styles/
to override the default css classes with your new color variables and other changes. - Import your .scss files to
src/theme/styles/index.scss
- Run
gatsby develop
to preview, thennpm run build
to generate the public files. - Edit the cypress.json file to update the
baseUrl
to match your site.
Update cypress tests to not use ids or classes as identifying elements. These can change without warning.