Skip to content

Commit

Permalink
Merge pull request #481 from xeptagondev/pipeline-modifications
Browse files Browse the repository at this point in the history
Read me refactored
  • Loading branch information
tharindugayanga authored Aug 30, 2024
2 parents e316052 + f9f44ec commit c90bea2
Showing 1 changed file with 5 additions and 47 deletions.
52 changes: 5 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ The system has 3 key features, and to be uploaded by the third quarter of 2024.
* **GHG Inventory:** Maintains a comprehensive inventory of greenhouse gas (GHG) emissions with ease. The system allows for accurate data collection (with Excel integration), automated calculations, and reporting, supporting informed decision-making.
* **Reporting Module:** Pulls together data collected and managed across the above two modules into a format that is required for reporting to UNFCCCC. The standard codebase uses the recently approved Common Tabular Format and can be configured to any other format.

<!-- **The National MRV System can be interoperable with the [National Carbon Registry DPG](https://github.com/undp/carbon-registry)** -->

## Index
Below contents are planned to be updated by the third quarter of 2024 based on user feedback and recent change in international requirements.
* [About](#about)
Expand Down Expand Up @@ -63,17 +61,6 @@ System services can deploy in 2 ways.

All the external services access through a generic interface. It will decouple the system implementation from the external services and enable extendability to multiple services.

<!-- #### Geo Location Service
Currently implemented for 2 options.
1. File based approach. User has to manually add the regions with the geo coordinates. [Sample File](./backend/services/regions.csv). To apply new file changes, replicator service needs to restart.
2. [Mapbox](https://mapbox.com). Dynamically query geo coordinates from the Mapbox API.
Can add more options by implementing [location interface](./backend/services/src/shared/location/location.interface.ts)
Change by environment variable `LOCATION_SERVICE`. Supported types are `FILE` (default) and `MAPBOX`. -->

#### File Service

Implemented 2 options for static file hosting.
Expand All @@ -100,8 +87,6 @@ Change by environment variable `FILE_SERVICE`. Supported types are `LOCAL` (defa
├── stats-api # Statistics API [NestJS module]
├── async-operations-handler # Async Operations Handler [NestJS module]
├── serverless.yml # Service deployment scripts [Serverless + AWS Lambda]
├── libs
├── carbon-credit-calculator # Implementation for the Carbon credit calculation library [Node module + Typescript]
├── web # System web frontend implementation [ReactJS]
├── .gitignore
├── docker-compose.yml # Docker container definitions
Expand All @@ -122,17 +107,16 @@ Change by environment variable `FILE_SERVICE`. Supported types are `LOCAL` (defa
* `SMTP_PASSWORD`
* Use `DB_PASSWORD` env variable to change PostgreSQL database password
* Configure system root account email by updating environment variable `ROOT EMAIL`. If the email service is enabled, on the first docker start, this email address will receive a new email with the root user password.
<!-- * By default frontend does not show map images on dashboard and programme view. To enable them please update `REACT_APP_MAP_TYPE` env variable to `Mapbox` and add new env variable `REACT_APP_MAPBOXGL_ACCESS_TOKEN` with [MapBox public access token](https://docs.mapbox.com/help/tutorials/get-started-tokens-api/) in web container. -->
* Add user data
<!-- * Update [organisations.csv](./organisations.csv) file to add organisations. -->
* Update [users.csv](./users.csv) file to add users.
* When updating file keep the header and replace existing dummy data with your data.
* These users will be added to the system each docker restart.
* Run `docker-compose up -d --build`. This will build and start containers for following services:
* PostgresDB container
* National service
* Analytics service
* Replicator service
* Async Operations Handler service
* Migration service (This service will shutdown automatically once db migration script execution is completed)
* React web server with Nginx.
* Web frontend on <http://localhost:9030/>
* API Endpoints,
Expand All @@ -144,27 +128,6 @@ Change by environment variable `FILE_SERVICE`. Supported types are `LOCAL` (defa
* Swagger documentation will be available on <http://localhost:9000/local/national>

## Run Services Locally
<!--
* Setup postgreSQL locally and create a new database.
* Update following DB configurations in the `.env.local` file (If the file does not exist please create a new `.env.local`)
* `DB_HOST` (default `localhost`)
* `DB_PORT` (default `5432`)
* `DB_USER` (default `root`)
* `DB_PASSWORD`
* `DB_NAME` (default `carbondbdev`)
* Move to folder `cd backend/service`
* Run `yarn run sls:install` -->
<!-- * Initial user data setup
```sh
serverless invoke local --stage=local --function setup --data '{"rootEmail": "<Root user email>","systemCountryCode": "<System country Alpha 2 code>", "name": "<System country name>", "logoBase64": "<System country logo base64>"}'
```
* Start all the services by executing
```sh
sls offline --stage=local
``` -->

Follow same steps mentioned above to run the services locally using docker.

Expand Down Expand Up @@ -198,10 +161,6 @@ aws lambda invoke \

## Modules

### Carbon Credit Calculator

Carbon credit calculation is implemented in a separate node module. [Please refer to this](./libs/carbon-credit-calculator/README.md) for more information.

### UNDP Platform for Voluntary Bilateral Cooperation

UNDP Platform for Voluntary Bilateral Cooperation generation is implemented in a separate node module. [Please refer this](./modules/Platform%20for%20Voluntary%20Bilateral%20Cooperation/README.md) for more information.
Expand All @@ -219,18 +178,17 @@ Web frontend implemented using ReactJS framework. Please refer [getting started
* Languages (Current): English
* Languages (In progress): French, Spanish

For updating translations or adding new ones, reference <https://github.com/undp/carbon-registry/tree/main/web/public/Assets/i18n>
For updating translations or adding new ones, reference <https://github.com/undp/climate-transparency/tree/main/web/public/locales/i18n>

<a name="api"></a>

### API (Application Programming Interface)

For integration, reference RESTful Web API Documentation documentation via Swagger. To access

* National API: `api.APP_URL`/national
* Status API: `api.APP_URL`/stats
* National API: `APP_URL`/national
* Status API: `APP_URL`/stats

Our [Data Dictionary](./Data%20Dictionary.csv) is available for field analysis.

<a name="resource"></a>

Expand Down

0 comments on commit c90bea2

Please sign in to comment.