Source code

DHIS 2 is open source software and the source code is hosted on Github. The core server-side code is found in the dhis2-core repository and the client-side apps are found in individual app repositories. If you would like to contribute, please fork our repositories and open a pull request.

Quick start

This section provides a quick guide to get up to speed with DHIS 2 development.

  • Download and install Java SDK 8, Git and Maven.
  • Clone the source code from Github. The core source code repo is dhis2-core.
  • To build the source code with Maven navigate to the /dhis-2 directory and invoke mvn install Then navigate to the /dhis-2/dhis-web directory and invoke mvn install -U.
  • Each project in the /dhis-2/dhis-web directory is an individual web module. The dhis-web-portal project is an assembly of all the individual web modules. All of these modules can be started by invoking mvn jetty:run The web application can then be accessed at http://localhost:8080

Continuous integration

The DHIS 2 continuous integration server where you can find the latest builds of DHIS 2 artefacts is located at

Issue tracking

DHIS 2 user JIRA for issue tracking. You can report bugs, suggest a feature and browse existing requirements from the issue search screen.

App development

To get started with DHIS 2 Web app development you can check out these resources.

  • The Way of Work document for DHIS 2 front end development.
  • The documentation for the Web API which you can use to interact with the DHIS 2 system.
  • Our Github repositories where you can find all of the web apps in DHIS 2.

Eclipse tips & tricks

Eclipse is the favoured IDE of the DHIS 2 development team. You can get it from here.

  • Import the DHIS 2 code style by downloading the profile from here. In Eclipse navigate to Window - Preferences - Java - Code Style - Formatter, then import the profile by clicking Import, locate your downloaded file and click Open. Then in Eclipse you can format your Java code with Shift-Ctrl-F.
  • DHIS 2 is built with Maven so installing the m2eclipse plugin is strongly recommended as it makes building and importing dependency libraries much simpler. Install from within Eclipse from Help -> Install New Software and use as update site.
  • To improve your coding environment navigate to Window - Preferences - General - Editors - Text Editors, then tick Show print margin and Show line numbers.
  • To change the text font navigate to Window - Preferences - General - Appearance - Colors and Fonts - Basic - Text Font - Edit.
  • To speed up building the source code by omitting the test phase invoke mvn clean install -DskipTests=true
  • A useful Eclipse plugin for Velocuty templates is Velocity Web Edit which can be downloaded here. A good plugin for XML files is XmlBuddy which can be downloaded here. Installation instructions for a useful plugin for Javascript files called JSEclipse can be found here. A good plugin for CSS files is CSS Editor which can be found here.

Intellij IDEA tips & tricks

Intellij IDEA is a nice IDE for Java development. You can get an approximate dhis code style from this link.

Maven tips & tricks

Maven is the build tool used by DHIS 2.

  • Run with no tests and no WAR file compression to reduce build time: mvn install -DskipTests=true -DuseWarCompression=false
  • Run a specific test to reduce test time: mvn test -Dtest=OrganisationUnitStoreTest

Web browsers

DHIS 2 can be used with all major browsers. For Internet Explorer version 11 or higher is recommended. For development purposes, Chrome is recommended due to its high performance and developer console. Click F12 to open it and use the Elements, Network and Console actively.