{"id":15516745,"url":"https://github.com/sferadev/dhis2-bridge","last_synced_at":"2025-03-28T19:29:40.948Z","repository":{"id":71478047,"uuid":"190376727","full_name":"SferaDev/dhis2-bridge","owner":"SferaDev","description":"[DEPRECATED] See https://github.com/EyeSeeTea/d2-api","archived":false,"fork":false,"pushed_at":"2019-06-17T06:09:59.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-02T21:29:07.879Z","etag":null,"topics":["dhis2","unmaintaned"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SferaDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-05T10:43:46.000Z","updated_at":"2021-02-14T20:48:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"db232e12-4296-46ce-ba75-22136901255e","html_url":"https://github.com/SferaDev/dhis2-bridge","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SferaDev%2Fdhis2-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SferaDev%2Fdhis2-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SferaDev%2Fdhis2-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SferaDev%2Fdhis2-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SferaDev","download_url":"https://codeload.github.com/SferaDev/dhis2-bridge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246088051,"owners_count":20721618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dhis2","unmaintaned"],"created_at":"2024-10-02T10:09:48.763Z","updated_at":"2025-03-28T19:29:40.928Z","avatar_url":"https://github.com/SferaDev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dhis2-bridge\nFast and simple d2 replacement written in TypeScript\n\n## Initial notes\n\nThis project is still in the early works, once the project is ready for public usage it will be released on a npm registry.\n\nDevelopment Status:\n\n| Feature              |      Status      |  Notes                    |\n|----------------------|------------------|---------------------------|\n| Multiple Instance    | Not implemeneted |                           |\n| Cache                | Basic support    | Consistence still pending |\n| Update subscriptions | Not implemented  |                           |\n| Preheating           | Basic support    |                           |\n| Schemas browsing     | Basic support    |                           |\n| Search and look-up   | Not implemented  |                           |\n\n\n## Key concepts\n\n### Multiple instance support\n\nYou can use the Bridge library on different DHIS2 instances, including the current instance of a React App or external instances with basic authentication. \n\nWhen using the init method you receive a different Bridge Class Instance with independent cache/preheat/subscriptions...\n\nYou can always retrieve all the existing Bridge Class Instances through an static method. \n\n### Cache and consistence\n\nThe main goal for the Bridge library is to be ```fast```, that's why one of our core principles is to re-use metadata.\n\nOnce we ask the API for an item we store it in a cache, so that if you re-request the same item the local version is used.\n\nTo preserve consistence over time, the cache updates any metadata element modified in the instance during the previous ```5 minutes```.\n\nCache is enabled by default but can be disabled with a flag during the configuration process.\n\n### Metadata update subscription \n\nSince we keep consistency of the Metadata of remote instances, we can offer a subscription pattern so you can be notified when there are changes for either any element or an specific one. \n\nYou can either wait for the consistency background task to detect the changes, reduce the wait time of the consistency task or even invalidate the cache to force a reload. \n\nThis is different from the RabbitMQ or Kafka features from DHIS2 and only depends on the ```/metadata``` endpoint. \n\n### Preheating\n\nBut we do not stop by adding an intelligent cache, we introduce the core concept of **preheat**.\n\nBased on the metadata previously loaded in Bridge, we automatically pre-load or ```preheat``` the dependencies found in the element.\nWith that ```preheat``` we determine what will you need next and make it available in the cache before you even need it.\n\nAlso during the cache-consistence clean-up, we **preheat** any recently metadata modified in the instance even if it wasn't called on Bridge.\n\nPreheat is disabled by default because it's a network greedy feature, it can be enabled during the configuration process.\nEven if you disable the automatic **preheat**, we expose the API so you can manually use the feature.\n\n### Schema browsing with model independence\n\nThe main difference of Bridge and d2, is the model independence. We use an agnostic approach to obtain the metadata.\nInstead of using the ```/api/xxx/uid.json``` endpoint we rely on the ```/api/metadata.json``` alternative.\n\nThis allows to mix metadata types in the same request and define generic model implementations.\n\nYou can still browse the **schemas** directly and list their elements with ease as you used in d2.\n\n### Search and look-up\n\nWe are still working on the look-up implementation, some of the ideas include storing internally all the ids and names.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsferadev%2Fdhis2-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsferadev%2Fdhis2-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsferadev%2Fdhis2-bridge/lists"}