dkan icon indicating copy to clipboard operation
dkan copied to clipboard

Need Help with DKAN Decouplrd Frontend Module.

Open 200496110 opened this issue 2 years ago • 1 comments

Hi I am new to this framework, and I want to implement a custom frontend in this framework, currently the sample frontend that I have is developed using Angular. But I am not able to find the docs related to how to approach with a custom frontend, also I need a list of APIs to be able to integrate the frontend with the backend, of which only a few are given in the dkan demo page. ( https://demo.getdkan.org/api ). I am aware that the dkan supports only the react frameworks, and I am ready to move to react if needed. Can someone help me figure this out please?

200496110 avatar Jun 28 '22 16:06 200496110

@200496110 We are still working on better documentation but to start you can find general info on the README here: https://github.com/GetDKAN/dkan/tree/2.x/modules/dkan_js_frontend

Some important endpoints: Search: https://demo.getdkan.org/api/1/search Dataset: https://demo.getdkan.org/api/1/metadata/schemas/dataset/item/{dataset-uuid}

Query docs https://github.com/GetDKAN/dkan/blob/2.x/modules/datastore/docs/query.json

janette avatar Jul 08 '22 21:07 janette

The dkan_js_frontendmodule searches through the js_folder and css_folder added to the module's config file and adds the files to Drupal's library system and renders the included template whenever one of the paths in the config file is rendered from Drupal. In my React app I just target the div and load the React app there.

If you needed to change up the html some for Angular, you could add a simple theme to your site and override that template there with the mark up you need. I'm not sure on Angular's build process but if you can get all the compiled JS files into a single folder, you should be able to load it the same way.

dgading avatar Aug 26 '22 17:08 dgading