Best way to contribute

Hi. I am looking to contribute. Does anyone have any advice on the best way for me to do that?

So far, I have set up cht-core on my computer for development. I have also gotten a CHT project running on my computer using the instructions here: App Developer Hosting in CHT 4.x | Community Health Toolkit

I have about 8 years of experience as a full-stack java developer, including about 4 years of experience with Vue.js. I haven’t used Angular before, but I ran through the tutorial on Angular’s website. I also read through the documentation on XLSForms.

Does anyone have any advice on how I could contribute, or what I should try to learn next, so that I can get closer to being able to contribute?

2 Likes

Hi @Fenedara, welcome to the CHT community; we are glad to have you here and it is great to hear the great progress you have made in setting up CHT. Here are additional details on how you can contribute to the CHT.

Hello @Fenedara and welcome! I just wanted to add a bit to what Antony has noted.

First, just a bit of clarification. The docs you followed to setup a local CHT instance are intended for folks who are deploying a CHT instance, but not for people who want to make code changes to the core application code. It is accurate to think of the CHT as a robust framework that can be extensively configured and customized to meet the requirements of specific deployments. In CHT lingo, the term “App Development” refers to creating and maintaining the configuration code that is specific to a particular deployment. Much of the documentation on the docs site is intended to support app development, and so is related to how organizations can configure their particular business logic.

“Core Development”, on the other hand, is usually what we say when talking about making code improvements to the core framework. Our primary code repo is medic/cht-core. To setup your development environment for contributing to cht-core, you need to follow these docs.

If you are not already familiar with Docker, that would be a good thing to have a basic understanding of.

As noted in the docs that Antony linked to, the “Help Wanted” issues are a great place to start. Just look through those for one that seems interesting to you! If/when you have questions or need clarification on something, just add a comment on the issue or open a thread out here on the forum. (As you can see from existing issues/PRs, much of the development discussion for the CHT happens publicly out on GitHub.) I think you will find that in some places the CHT code can be confusing and poorly documented :sweat_smile:, but the community here is very helpful and open to answering any kind of question you may run into!

3 Likes

Thanks for all the info and the suggestions @jkuester.

I did set up my development environment already, and I have the app building and running locally that way.
I also have some experience with Docker. I recently set up a personal website on Google Cloud Run using Docker.
I also looked through the contribute page before and the help wanted issues.

I found this help wanted issue that I think I might be able to take care of: Add password reveal to change password form · Issue #9354 · medic/cht-core · GitHub . The current roadblock I have encountered with it is that I can’t figure out how to test my code changes. I have my development environment set up, but the default CHT app that I’m running in my development environment is not fleshed out enough for me to test my code changes. More specifically, I don’t have a way to reach the screen where a user can change their password. I can reach that screen (edit_user.html/edit_user.js) if I run the app that I set up using these instructions: App Developer Hosting in CHT 4.x | Community Health Toolkit , but that won’t let me test my code changes.

Do you have any suggestions about how I could get past this roadblock? Do you think I should post on that help wanted issue page instead of asking here?

Once you have made it to this step and you have run the build-dev-watch, dev-api and dev-sentinel you should be able to access the the app built with your local code in a browser at http://localhost:5988/. You should login with medic:password.

However, the medic user is an admin user and we do not support that password reset functionality for admin users. So, you just need to add a health facility with a person. Then from the hamburger menu > App Management > Users you can create a new user associated with your new place and person. (Can use the Program Officer role, but probably any of the other ones would work too.) Then, you should be able to access the password change page via Gareth’s instructions from the GitHub issue:

To get to the page in question,

  • Login as a non-admin user (admin’s aren’t allowed to change their password for technical reasons)
  • Go to the hamburger menu > User Settings
    Select “Change password”

The build-dev-watch script should leave a process running that watches for changes to the webapp files and will automatically re-build the Angular app when anything changes (letting your see your updates in the browser).

As a side note on seeing local changes reflected in the app in the browser, it is important to be aware if you are logged in as an “online” or “offline” user. The online or offline categorization of a user is determined by their role configuration. (If you are running with the default config, the Program Officer will be an “online” user while a CHW will be an “offline” user.) When the build-dev-watch command builds a new version of the app, a dialog will appear for the user stating “Update available”, with a button allowing the user to refresh their app. However, because of the nature of “offline” users, the Update modal will not be immediately displayed (because offline users only sync periodically with the server). An offline user can force a sync by using the “Sync now” button in the hamburger menu.

1 Like