Giter VIP home page Giter VIP logo

angular10-migration's Introduction

The Core Framework of the Community Health Toolkit (CHT)

This is the repository of the CHT Core Framework, a technical resource of the Community Health Toolkit (CHT) contributed by Medic.

Medic is a nonprofit organization on a mission to improve health in the hardest-to-reach communities through open-source software. Medic serves as the technical steward of the Community Health Toolkit.

For the latest changes and release announcements see our release notes. Our exact support matrix (including older app versions) can be found in our docs.

Overview

The CHT's Core Framework is a software architecture that makes it faster to build full-featured, scalable digital health apps that equip health workers to provide better care in their communities. To learn more about building an application with the Core Framework, visit our guide for developing community health apps.

The Core Framework addresses complexities like health system roles and reporting hierarchies, and its features are flexible enough to support a range of health programs and local care provider workflows.

Mobile and web applications built with the Core Framework support a team-based approach to healthcare delivery and management. Health workers can use SMS messages or mobile applications to submit health data that can then be viewed and exported using a web application. These web applications are fully responsive with a mobile-first design, and support localization using any written language. They can be installed locally or in the cloud by setting up the individual components or as a Docker container.

For more information about Medic's architecture and how the pieces fit together, see Architecture Overview. For more information about the format of docs in the database, see Database Schema. For more information about the SMS exchange protocol between webapp and gateway, see Message States.

Using the Core Framework

If you are a developer looking to contribute to the Core Framework itself, you should follow the development setup instructions.

If you wish to evaluate the Core Framework, or you are a developer looking to create or modify applications built with the Core Framework, you can instead follow the easy deployment instructions, which will get the latest stable release running locally via Docker.

You will need to also familiarise yourself with cht-conf, a tool to manage and configure your apps built using the Core Framework. A brief guide for modifying the config is available alongside the config. A more detailed guide is available in cht-docs.

Supported Browsers

Currently, the latest versions of Chrome, Chrome for Android and Firefox are functionally supported. We do not support Safari (unreliable implementations of necessary web APIs) and the generic android browser (unreliable implementations in general). Our webapp code, which includes any code written as configuration, is still ES5. Our exact support matrix (including older app versions) can be found in our docs.

Contributing

The Core Framework of the Community Health Toolkit is powered by people like you. We appreciate your contributions, and are dedicated to supporting the developers who improve our tools whenever possible.

To setup a development environment to contribute to the Core Framework follow the development instructions.

First time contributor? Issues labeled help wanted are a great place to start.

Looking for other ways to help? You can also:

  • Improve documentation. Check out our style guide here
  • Review or add a translation
  • Find and mark duplicate issues
  • Try to reproduce issues and help with troubleshooting
  • Or share a new idea or question with us!

The easiest ways to get in touch are by raising issues in the medic Github repo or joining our Community Forum.

For more information check out our contributor guidelines.

Build Status

Builds brought to you courtesy of GitHub Actions.

Build Status

Copyright

Copyright 2013-2022 Medic Mobile, Inc. [email protected]

License

The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.

angular10-migration's People

Contributors

dianabarsan avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular10-migration's Issues

Add a logging service for Webapp

We used to use AngularJS $log before.
I couldn't find a consensus about how to log stuff in Android apps (ngx-logger, our custom logging service, other?) when I was migrating the 1st parts of the app, so I just default to console..

We already have a console interceptor (https://github.com/medic/cht-core/blob/4750-angular-10-take-2/webapp/src/ts/services/feedback.service.ts) so we're already somewhat in control.

Evaluate which option to use (addressing needs and not just bloating with functionalities we don't care about).

Document final version of grunt tasks for webapp

During migration we had to create and modify some grunt tasks for building the app and running unit test.

Once the migration is almost complete and we're confident of our grunt configuration, document the final version in the readme files, cht-docs and any other necessary place.

Adding a new report

This includes the migration of Enketo and Geolocation, forms should work like before.

Modernise code in Enketo widgets when possible

-- For next iteration of enhancements for this migration --
This is already working and this request is more of an improvement.

See if it's possible to modernise some of the Enketo widgets that are currently in old JS:
js/enketo/widgets/android-datepicker.js
js/enketo/widgets/bikram-sambat-datepicker.js
etc...

Some ideas of what can be done:

  • Use class instead of function to define Androiddatepicker
  • Change the case from "Androiddatepicker" to "AndroidDatepicker"? But if this is used by clients (out of our control) then it's gonna be challenging to change the name, unless we add backward compatibility with alias.
  • See if it's possible extend from Widget (and avoid some repetitions)
  • Use arrow function in the callbacks

Screen Shot 2021-03-30 at 12 01 10 pm

Check build pipeline

Update and check build pipeline to:

- [ ] Run linting

  • Run bindlesize
  • Upload production build to staging
  • Install build via horti

Because `routerLinkActive` is very slow, replace with better performing alternatives

I jumped to using routerLinkActive because it felt like the most elegant way of changing the class on a list item when the activated route matches the route of the item.
We use it in content-row-list-item.component.html and in messages.component.html.

Removing it from content-row-list-item cuts reports list rendering time by 10-15% (in development mode)

Rendering time with routerLinkActive without routerLinkActive diff
HIghest 250ms 225ms 10%
Lowest 185ms 160ms 15%

Check for better performing alternatives.

Migrate reports left actionbar

image

This should include:

  • submit new report accurate and correct forms list (that responds to updated from the server)
  • select mode
  • export
  • bulk delete

Migration of analytics reporting rates

We've scheduled to remove this feature in the next major: medic/cht-core#6248 .

Because it's an ancient, undocumented and bears a quite heavy load (d3), we're considering not migrating it (at least in this iteration). I've marked related files as blocked in the progress spreadsheet.

Before deciding, check known configurations and ask app builders for confirmation.

Investigate if we can reduce bundle-size

We've had occurrences in the past where dependencies were loaded twice (either because of different versions requirements or just because of nonexistent tree-shaking).
Once the migration is complete, we should check if tree-shaking is working as expected, we have no performance bail-outs and our bundle is the smallest possible.

Error when replicating after migration of RulesEngineService

Every time I replicate as an offline user, I see errors in the console about replication being aborted.
It was hard to track down the error (as it's not part of the PouchDB error structure), so I edited PouchDB source to log it and this is what it looks like:

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.