# Setting up the dhis2/analytics app for local development

**URL:** <https://community.dhis2.org/t/setting-up-the-dhis2-analytics-app-for-local-development/57119>\
**Category:** App Development\
**Created:** [19 February 2024 11:26 UTC](https://community.dhis2.org/t/setting-up-the-dhis2-analytics-app-for-local-development/57119 "2024-02-19T11:26:54Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![abdimohammed](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/abdimohammed/32/45361_2.png) [@abdimohammed](https://community.dhis2.org/u/abdimohammed)\
**Post date:** [19 February 2024 11:26 UTC](https://community.dhis2.org/t/setting-up-the-dhis2-analytics-app-for-local-development/57119/1 "2024-02-19T11:26:54Z")

</div>

Hello  
I am working on some development for the DHIS2 UI, and I would like to set up the DHIS2/UI for my local development environment. Specifically, I want to test some functionality on the data visualizer. How can I link the two codebases so that changes made in the DHIS2/UI reflect on the data visualizer app?

cc: @Gassim @hendrik @kpvandivier,

Mohammed

---

<div class="post-metadata">

**Author:** ![Gassim](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/gassim/32/35347_2.png) [@Gassim](https://community.dhis2.org/u/Gassim)\
**Post date:** [19 February 2024 15:19 UTC](https://community.dhis2.org/t/setting-up-the-dhis2-analytics-app-for-local-development/57119/2 "2024-02-19T15:19:02Z")

</div>

Hi @abdimohammed

I believe it’d be the same process as creating a new app. You can fork the Data Visualizer app repository and then follow the same steps as linking the app to ‘localhost’ for dev purposes ([Environment Setup | DHIS2 Developer Portal](https://developers.dhis2.org/docs/tutorials/setup-env)).

Check out the read-me instructions in the repository: [GitHub - dhis2/data-visualizer-app: DHIS2 Data Visualizer App](https://github.com/dhis2/data-visualizer-app?tab=readme-ov-file#data-visualizer-app-and-plugin)

Hope this helps!

---

<div class="post-metadata">

**Author:** ![abdimohammed](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/abdimohammed/32/45361_2.png) [@abdimohammed](https://community.dhis2.org/u/abdimohammed)\
**Post date:** [21 February 2024 22:14 UTC](https://community.dhis2.org/t/setting-up-the-dhis2-analytics-app-for-local-development/57119/3 "2024-02-21T22:14:05Z")

</div>

Thanks for replying @Gassim .  
I have already setup the data visualizer app for my local development. However, I would like to setup the **@dhis2/ui app** so that I can tweak it for it to be used with the data visualizer app.  
The data visualizer app depends on the dhis2/ui for the frontend components ie dhis2/ui is added as a dependency in the data visualizer app.  
My question is, **how do I setup up the @dhis2/ui to work with the data visualizer?**

Mohammed

---

<div class="post-metadata">

**Author:** ![Gassim](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/gassim/32/35347_2.png) [@Gassim](https://community.dhis2.org/u/Gassim)\
**Post date:** [27 February 2024 01:31 UTC](https://community.dhis2.org/t/setting-up-the-dhis2-analytics-app-for-local-development/57119/4 "2024-02-27T01:31:37Z")

</div>

> [@abdimohammed](#):
>
> My question is, **how do I setup up the @dhis2/ui to work with the data visualizer?**

Okay, I think I understand your question now. Thanks for the clarification. You’ll need to use yarn in the same app directory to install the dependency. As explained in [DHIS2 UI Library | DHIS2 Developer Portal](https://developers.dhis2.org/docs/tutorials/ui-library#installation:)

> To get started using the DHIS2 UI library, navigate to your project and add `@dhis2/ui` as a dependency:
> 
> ```auto
> yarn add @dhis2/ui
> 
> ```

---

<div class="post-metadata">

**Author:** ![abdimohammed](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/abdimohammed/32/45361_2.png) [@abdimohammed](https://community.dhis2.org/u/abdimohammed)\
**Post date:** [29 February 2024 07:08 UTC](https://community.dhis2.org/t/setting-up-the-dhis2-analytics-app-for-local-development/57119/5 "2024-02-29T07:08:17Z")

</div>

Hi @Gassim,  
How do I make changes the the dhis2/analytics app for my local development?

Mohammed

---

<div class="post-metadata">

**Author:** ![abdimohammed](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/abdimohammed/32/45361_2.png) [@abdimohammed](https://community.dhis2.org/u/abdimohammed)\
**Post date:** [6 March 2024 07:36 UTC](https://community.dhis2.org/t/setting-up-the-dhis2-analytics-app-for-local-development/57119/6 "2024-03-06T07:36:42Z")

</div>

Hello @edoardo,  
Kindly assist me in setting up @dhis2/analytics for my local development.

Mohammed

---

<div class="post-metadata">

**Author:** ![tzemp](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/tzemp/32/36236_2.png) [@tzemp](https://community.dhis2.org/u/tzemp)\
**Post date:** [6 March 2024 09:21 UTC](https://community.dhis2.org/t/setting-up-the-dhis2-analytics-app-for-local-development/57119/7 "2024-03-06T09:21:24Z")

</div>

Hi @abdimohammed : the analytics repo is available here: [GitHub - dhis2/analytics: Shared components and modules for building DHIS 2 analytics apps](https://github.com/dhis2/analytics).  
If you’d like, you can fork it and run it locally.

If you have suggestions for improving the functionality for the analytics library, perhaps you’d like to open a feature request in our Jira ([DHIS 2 Software - Issues - Jira](https://dhis2.atlassian.net/jira/software/c/projects/DHIS2/issues))?

---

<div class="post-metadata">

**Author:** ![abdimohammed](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/abdimohammed/32/45361_2.png) [@abdimohammed](https://community.dhis2.org/u/abdimohammed)\
**Post date:** [6 March 2024 12:04 UTC](https://community.dhis2.org/t/setting-up-the-dhis2-analytics-app-for-local-development/57119/8 "2024-03-06T12:04:52Z")

</div>

Thanks @tzemp ,  
I would like to run it locally. I have already forked the repo. How do I configure it locally? I would like to know how to link it with the data visualizer app for local development.

Mohammed

---

<div class="post-metadata">

**Author:** ![edoardo](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/edoardo/32/35735_2.png) [@edoardo](https://community.dhis2.org/u/edoardo)\
**Post date:** [7 March 2024 15:27 UTC](https://community.dhis2.org/t/setting-up-the-dhis2-analytics-app-for-local-development/57119/9 "2024-03-07T15:27:21Z")

</div>

Hi @abdimohammed,

at the moment we don’t have documentation on how to contribute to the analytics library codebase.  
It is considered an internal library used by the analytics apps.

If you have a specific issue you’d like to see fixed and you think the problem is in the analytics library, you can open a ticket in JIRA about it.

---

<div class="post-metadata">

**Author:** ![abdimohammed](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/abdimohammed/32/45361_2.png) [@abdimohammed](https://community.dhis2.org/u/abdimohammed)\
**Post date:** [8 March 2024 10:12 UTC](https://community.dhis2.org/t/setting-up-the-dhis2-analytics-app-for-local-development/57119/10 "2024-03-08T10:12:40Z")

</div>

Hi @edoardo, Thanks for letting me know.

Mohammed
