diff --git a/docs/assets/resources-service.png b/docs/assets/resources-service.png new file mode 100644 index 0000000000000000000000000000000000000000..5f308487208091c10899f5687377c3d062d75681 Binary files /dev/null and b/docs/assets/resources-service.png differ diff --git a/docs/components/proxies/web-mapping-services.md b/docs/components/proxies/web-mapping-services.md index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0e169a68b6ca037bf160349af27b08596a7652e7 100644 --- a/docs/components/proxies/web-mapping-services.md +++ b/docs/components/proxies/web-mapping-services.md @@ -0,0 +1,9 @@ +# Reuses + +## Features + +## Dependencies + +## Endpoints + +## Implementation diff --git a/docs/components/services/credits.md b/docs/components/services/credits.md index be9b74c9d4750416a31f6b167076efd069886a88..68e5b421ee2f8fe094bdd2a5a88aeaa2e02ceaee 100644 --- a/docs/components/services/credits.md +++ b/docs/components/services/credits.md @@ -23,11 +23,10 @@ This service has no dependency on other components. The service provides two endpoints, 1. `/credits`; -2. `/links`, -allowing one to perform CRUD operations on credits and links in a RESTful manner. Moreover, an healtcheck endpoint is provided, +allowing one to perform CRUD operations on credits in a RESTful manner. Moreover, an healtcheck endpoint is provided, -3. `/health`, +2. `/health`, returning a `200` HTTP code if the API is healthy, `503` otherwise. For the service to be healthy, the underlying database must be up. diff --git a/docs/components/services/media-library.md b/docs/components/services/media-library.md index a89c0facf526a6f6f233128606407c5f2b67f29f..2224d8df1d6bfb6de16b7f8f936dc815acd51a8a 100644 --- a/docs/components/services/media-library.md +++ b/docs/components/services/media-library.md @@ -2,10 +2,12 @@ ## Features -This service allows you to upload a file on the [Minio](https://min.io/) instance (compatible with S3) of your choice. The file will be stored in the bucket defined in the configuration of the service. +This service allows you to upload a file on the [Minio](https://min.io/) instance (compatible with S3) of your choice. The file will be stored in the bucket defined in the configuration of the service. It also stores some metadataabout the file in a mongo database. ## Dependencies +This service needs a running instance of Minio in order to work. + ## Endpoints For this service we implemented a custom health indicator that checks the connection to MinIO giving the total number of buckets when the connection is succesful. @@ -20,4 +22,4 @@ Before uploading the file, it makes sure that the specified bucket is created. I The files are folded in sub-buckets as following `/<specified-bucket-name>/<year-YYYY>/<month-MM>/`. -The uploaded file keep its original name but is prefixed by an md5 computed based on its content witch gives the following pattern for file names: `<md5>-<original-name>`. This means that if we upload twice the exact same file, with the same name there will be only one file stored in MinIO. \ No newline at end of file +The uploaded file keep its original name but is prefixed with the id of the corresponding entry in the mongo database. diff --git a/docs/components/services/organizations.md b/docs/components/services/organizations.md index 23b9676b9a31f613df7f5eb9efbc3de1ece06cf3..ef1f5a7f8abbe6df1953de35de3bee851b1d5df2 100644 --- a/docs/components/services/organizations.md +++ b/docs/components/services/organizations.md @@ -5,12 +5,37 @@ This service provides a list of organizations with different information about it (such as description, logo..etc). In our application, one organization is usually a provider of data, used in the Portal Open Data. It can be a public actor or a private one. +Each record of the catalog includes the following information: + +* `id`: a technical unique identifier acting as primary key in the underlying database +* `uuid`: a business unique identifier +* `name`: the name of the credited initiative +* `description`: a short description of the credited initiative, in particular of the role the latter plays in this project +* `links`: a collection of URLs related to the organization, modeled as a One-To-Many relationship +* `logo`: the URL of the organization's logo +* `published`: a boolean flag, indicating whether the record is published or not (draft) +* `elasticSearchName`: name of the organization in elasticsearc, it can be found in the metadata of a dataset under `responsibleParty[0].organisationName`. + ## Dependencies +This service has no dependency on other components. + ## Endpoints +The service provides two endpoints, + +1. `/organizations`; + +allowing one to perform CRUD operations on credits and links in a RESTful manner. Moreover, an healtcheck endpoint is provided, + +2. `/health`, + +returning a `200` HTTP code if the API is healthy, `503` otherwise. For the service to be healthy, the underlying database must be up. + ## Implementation  -The entrypoint of the service is a REST API provided by a [NestJS](https://github.com/nestjs/nest) application. This backend application interacts with a PostgresSQL database through an ORM called [TypeORM](https://github.com/typeorm/typeorm). \ No newline at end of file +The service is implemented using the [NestJS](https://nestjs.com/) framework. We refer the reader to the [NestJS-based micro-services](../../miscellaneous/nestjs-micro-services.md) page for further details concerning NestJS and the features it provides. + +Data persistence is achieved by using [PostgreSQL](https://www.postgresql.org/) and [TypeORM](https://github.com/typeorm/typeorm). diff --git a/docs/components/services/resources-helper.md b/docs/components/services/resources-helper.md index c516bd39c0f304d0c6309eb536f286a59327ef17..14c0a8c68ed59b664b364596eff0aa14425ad980 100644 --- a/docs/components/services/resources-helper.md +++ b/docs/components/services/resources-helper.md @@ -11,12 +11,27 @@ the output of a Web Feature Service (WFS), standard service providing an interfa ## Dependencies +This service has no dependency on other components. + ## Endpoints -For this service we declared an health indicator that verifies that it can connect to the database. +The service provides five endpoints, + +1. `/resources`; +2. `/resourceformats`; +3. `/projections`; +4. `/formats`; + +allowing one to perform CRUD operations in a RESTful manner. Moreover, an healtcheck endpoint is provided, + +5. `/health`, + +returning a `200` HTTP code if the API is healthy, `503` otherwise. For the service to be healthy, the underlying database must be up. ## Implementation - + + +The service is implemented using the [NestJS](https://nestjs.com/) framework. We refer the reader to the [NestJS-based micro-services](../../miscellaneous/nestjs-micro-services.md) page for further details concerning NestJS and the features it provides. -The entrypoint of the service is a REST API provided by a [NestJS](https://github.com/nestjs/nest) application. This backend application interacts with a PostgresSQL database through an ORM called [TypeORM](https://github.com/typeorm/typeorm). +Data persistence is achieved by using [PostgreSQL](https://www.postgresql.org/) and [TypeORM](https://github.com/typeorm/typeorm).