Skip to content
Snippets Groups Projects
Commit 9e924db5 authored by FORESTIER Fabien's avatar FORESTIER Fabien Committed by ncastejon
Browse files

Add documentation for reuses service.

parent 754c99a7
No related branches found
No related tags found
1 merge request!14Doc webapp
docs/assets/reuses-service.png

54.9 KiB

......@@ -22,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 with the id of the corresponding entry in the mongo database.
The uploaded file keeps its original name but is prefixed with the id of the corresponding entry in the mongo database.
......@@ -2,8 +2,34 @@
## Features
The Metropolitan area of Lyon promotes the reuse of territorial data: analysis, map, site, service, application... This service provides a list of those reuses.
A record in the underlying database includes the following information:
* `_id`: a technical unique identifier (automatically generated);
* `name`: the name of the reuse;
* `uuid`: a business unique identifier (automatically generated if not provided);
* `creator`: the name of the entity that created the reuse;
* `logo`: the url of the reuse's logo;
* `website`: the website url of the reuse;
* `reuseTypes`: an array of the types of the reuse (mobile app, website, article);
* `datasetsUsed`: an array containing the `slugs` of the datasets being reused;
* `createDate`: the date on which the reuse has been created;
* `updateDate`: the date on which the reuse has been updated for the last time;
* `published`: a boolean flag, indicating whether the record is published or not (draft);
## Dependencies
This service has no dependency on other components.
## Endpoints
This service exposes one single endpoint, `/reuses`, supporting all the CRUD methods in a RESTful fashion. An healthcheck endpoint is exposed as well, `/health`, returning a `200` HTTP code when all indicators are healthy, `503` in the opposite case. The service is considered to be healthy if the underlying database is up.
## Implementation
![reuses-service](../../assets/reuses-service.png)
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 the latter framework and the features it provides.
[MongoDB](https://www.mongodb.com/) is used for data persistence. Data modeling as well as connections to MongoDB are performed with [Mongoose](https://github.com/Automattic/mongoose).
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment