The onboarding tool is a hapi web application that allows Italian Public Administrations to register their code repositories in Developers Italia.
The repositories are scanned by the crawler that feeds the reuse catalog.
-
A Public Administration inserts its data into the system.
-
After clicking Registra, the application sends a confirmation PEC to the address from IndicePA
-
The Public Administration confirms the registration clicking on the link from the PEC.
A single Public Administration can register multiple code repositories.
The application uses of a directory named private/data
, which should contain:
-
A private key, used to generate tokens sent during the registration. If no private keys are present while the application starts, a new one is automatically created
-
whitelist.db.json
, with the list of the registered Public Administrations. If no database file is present while the application starts, a new one is automatically created.
For security reasons, that directory:
-
is not committed by default. To run the application, you'll need to create one manually
-
is added to the
.gitignore
file of this repository
The format of whitelist.db.json
is:
{
"registrati": [
{
"referente": "John Smith",
"ipa": "c_a123",
"url": "https://github.com/undefined",
"pec": "protocollo.comunemaramao@pec.it"
},
{
"referente": "Mario Rossi",
"ipa": "c_a123",
"url": "https://gitlab.com/undefined",
"pec": "protocollo.comunemaramao@pec.it"
}
]
}
An example file is available here.
GET https://onboarding.developers.italia.it/repo-list
returns the list
of currently registered Public Administrations, in YAML form:
---
registrati:
-
timestamp: "2019-05-27T09:45:00.770Z"
ipa: "c_a123"
url: "https://github.com/undefined"
pec: "protocollo.comunemaramao@pec.it"
-
timestamp: "2019-05-28T09:45:00.770Z"
ipa: "c_a123"
url: "https://gitlab.com/undefined"
pec: "protocollo.comunemaramao@pec.it"
-
mkdir private/data
-
npm install
-
npm run dev
The server will listen to http://localhost:3000
.
-
Copy the
.env.example
file into.env
and edit the environment variables as it suits you.cp .env.example .env
-
Build the container:
docker-compose up
Once the container is up, the content will be served at http://localhost:3000
The project is distributed under BSD-3 license (SPDX code: BSD-3-Clause). For more information, have a look at the LICENSE file.