Skip to content

Commit

Permalink
Update CSN references to OHCN
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Aug 28, 2024
1 parent e86a3ac commit 8ac30dd
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 20 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 CoronaSafe Network
Copyright (c) 2024 Open Healthcare Network

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@

_This repository stores the configurations for various deployments of CARE._

[![Validate Configurations](https://github.com/coronasafe/care_deploy_configs/actions/workflows/test.yaml/badge.svg)](https://github.com/coronasafe/care_deploy_configs/actions/workflows/test.yaml)
[![Validate Configurations](https://github.com/ohcnetwork/care_deploy_configs/actions/workflows/test.yaml/badge.svg)](https://github.com/ohcnetwork/care_deploy_configs/actions/workflows/test.yaml)

## ⚙️ How it works?

The [CARE front-end](https://github.com/coronasafe/care_fe) attempts to fetch configurations from `/config.json` endpoint.
The [CARE front-end](https://github.com/ohcnetwork/care_fe) attempts to fetch configurations from `/config.json` endpoint.
> :bulb: This endpoint can be overriden by defining `REACT_APP_CONFIG_URL` to the desired URL that serves a valid configuration file.
For every deployment, a reverse proxy is set-up for the `/config.json` endpoint which is proxied the raw JSON configuration file stored in this repo.

![image](https://user-images.githubusercontent.com/25143503/209959094-ac877475-835c-42ee-8c2a-cd71faa6791f.png)

All configurations follow a specific schema as defined in the [`config-schema.yaml`](https://github.com/coronasafe/care_deploy_configs/blob/main/config_schema.yaml).
The [Validate Configurations](https://github.com/coronasafe/care_deploy_configs/actions/workflows/test.yaml) workflow attempts to validate all configurations (JSON files)
All configurations follow a specific schema as defined in the [`config-schema.yaml`](https://github.com/ohcnetwork/care_deploy_configs/blob/main/config_schema.yaml).
The [Validate Configurations](https://github.com/ohcnetwork/care_deploy_configs/actions/workflows/test.yaml) workflow attempts to validate all configurations (JSON files)
present inside the `configs/` directory.

## ☑️ Checklist for adding a new key to existing deployments configurations
Let's say a new key `EXAMPLE_KEY` is to be introduced to the configurations.
1. Update the `config-schema.yaml` for the validation workflow to pass when the new key is present.
2. Define the `EXAMPLE_KEY` for all configurations present inside the `configs/` directory.
3. Run `npm test` to validate the new configurations.
4. Update the [`IConfig`](https://github.com/coronasafe/care_fe/blob/develop/src/Common/hooks/useConfig.ts) interface in coronasafe/care_fe repo to match the new configurations schema.
4. Update the [`IConfig`](https://github.com/ohcnetwork/care_fe/blob/develop/src/Common/hooks/useConfig.ts) interface in ohcnetwork/care_fe repo to match the new configurations schema.

## ☑️ Checklist for adding a configuration for a new deployment
Let's say a new deployment `example-deployment` is to be added.
Expand Down
5 changes: 2 additions & 3 deletions config_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: object

required:
- github_url
- coronasafe_url
- ohcn_url
- site_url
- analytics_server_url
- header_logo
Expand All @@ -28,7 +28,7 @@ properties:
github_url:
type: string

coronasafe_url:
ohcn_url:
type: string

site_url:
Expand Down Expand Up @@ -94,4 +94,3 @@ properties:

jwt_token_refresh_interval:
type: integer

16 changes: 8 additions & 8 deletions configs/staging.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"github_url": "https://github.com/coronasafe",
"coronasafe_url": "https://coronasafe.network?ref=care",
"site_url": "care.coronasafe.in",
"github_url": "https://github.com/ohcnetwork",
"ohcnetwork": "https://ohc.network?ref=care",
"site_url": "care.ohc.network",
"analytics_server_url": "https://plausible.10bedicu.in",
"header_logo": {
"light":"https://cdn.coronasafe.network/header_logo.png",
"dark":"https://cdn.coronasafe.network/header_logo.png"
"light": "https://cdn.ohc.network/header_logo.png",
"dark": "https://cdn.ohc.network/header_logo.png"
},
"main_logo": {
"light":"https://cdn.coronasafe.network/light-logo.svg",
"dark":"https://cdn.coronasafe.network/black-logo.svg"
"light": "https://cdn.ohc.network/light-logo.svg",
"dark": "https://cdn.ohc.network/black-logo.svg"
},
"gmaps_api_key": "AIzaSyDsBAc3y7deI5ZO3NtK5GuzKwtUzQNJNUk",
"gov_data_api_key": "579b464db66ec23bdd000001cdd3946e44ce4aad7209ff7b23ac571b",
Expand All @@ -24,4 +24,4 @@
"enable_abdm": true,
"enable_hcx": true,
"jwt_token_refresh_interval": 300000
}
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/coronasafe/care_deploy_configs.git"
"url": "git+https://github.com/ohcnetwork/care_deploy_configs.git"
},
"author": "",
"license": "MIT",
"bugs": {
"url": "https://github.com/coronasafe/care_deploy_configs/issues"
"url": "https://github.com/ohcnetwork/care_deploy_configs/issues"
},
"homepage": "https://github.com/coronasafe/care_deploy_configs#readme",
"homepage": "https://github.com/ohcnetwork/care_deploy_configs#readme",
"precommit": "test",
"devDependencies": {
"chai": "^4.3.7",
Expand Down

0 comments on commit 8ac30dd

Please sign in to comment.